Construct an vl-idexpr-p.
(vl-idexpr name) constructs a simple identifier expression with the given name, width, and type.
I didn't always hons these, but now it seems like a good idea since the same identifier may be needed in several contexts, and since we often want to construct fast alists binding identifiers to things, etc.
Function:
(defun vl-idexpr$inline (name) (declare (xargs :guard (stringp name))) (let ((__function__ 'vl-idexpr)) (declare (ignorable __function__)) (hons-copy (make-vl-index :scope (vl-idscope name) :indices nil :part (make-vl-partselect-none)))))
Theorem:
(defthm vl-expr-p-of-vl-idexpr (b* ((expr (vl-idexpr$inline name))) (vl-expr-p expr)) :rule-classes :rewrite)
Theorem:
(defthm vl-idexpr-p-of-vl-idexpr (vl-idexpr-p (vl-idexpr name)))
Theorem:
(defthm vl-idexpr->name-of-vl-idexpr (equal (vl-idexpr->name (vl-idexpr name)) (str-fix name)))
Theorem:
(defthm vl-expr-kind-of-vl-idexpr (equal (vl-expr-kind (vl-idexpr name)) :vl-index))
Theorem:
(defthm vl-idexpr$inline-of-str-fix-name (equal (vl-idexpr$inline (str-fix name)) (vl-idexpr$inline name)))
Theorem:
(defthm vl-idexpr$inline-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-idexpr$inline name) (vl-idexpr$inline name-equiv))) :rule-classes :congruence)