Construct an vl-idexpr-p.
(vl-idexpr name finalwidth finaltype) → expr
(vl-idexpr name finalwidth finaltype) 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 finalwidth finaltype) (declare (xargs :guard (and (stringp name) (maybe-natp finalwidth) (vl-maybe-exprtype-p finaltype)))) (let ((__function__ 'vl-idexpr)) (declare (ignorable __function__)) (hons-copy (make-vl-atom :guts (make-vl-id :name name) :finalwidth finalwidth :finaltype finaltype))))
Theorem:
(defthm vl-expr-p-of-vl-idexpr (b* ((expr (vl-idexpr$inline name finalwidth finaltype))) (vl-expr-p expr)) :rule-classes :rewrite)
Theorem:
(defthm vl-idexpr-p-of-vl-idexpr (vl-idexpr-p (vl-idexpr name finalwidth finaltype)))
Theorem:
(defthm vl-idexpr->name-of-vl-idexpr (equal (vl-idexpr->name (vl-idexpr name finalwidth finaltype)) (str-fix name)))
Theorem:
(defthm vl-expr->finalwidth-of-vl-idexpr (equal (vl-expr->finalwidth (vl-idexpr name finalwidth finaltype)) (maybe-natp-fix finalwidth)))
Theorem:
(defthm vl-expr->finaltype-of-vl-idexpr (equal (vl-expr->finaltype (vl-idexpr name finalwidth finaltype)) (vl-maybe-exprtype-fix finaltype)))
Theorem:
(defthm vl-expr-kind-of-vl-idexpr (equal (vl-expr-kind (vl-idexpr name finalwidth finaltype)) :atom))
Theorem:
(defthm vl-idexpr$inline-of-str-fix-name (equal (vl-idexpr$inline (str-fix name) finalwidth finaltype) (vl-idexpr$inline name finalwidth finaltype)))
Theorem:
(defthm vl-idexpr$inline-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-idexpr$inline name finalwidth finaltype) (vl-idexpr$inline name-equiv finalwidth finaltype))) :rule-classes :congruence)
Theorem:
(defthm vl-idexpr$inline-of-maybe-natp-fix-finalwidth (equal (vl-idexpr$inline name (maybe-natp-fix finalwidth) finaltype) (vl-idexpr$inline name finalwidth finaltype)))
Theorem:
(defthm vl-idexpr$inline-maybe-nat-equiv-congruence-on-finalwidth (implies (acl2::maybe-nat-equiv finalwidth finalwidth-equiv) (equal (vl-idexpr$inline name finalwidth finaltype) (vl-idexpr$inline name finalwidth-equiv finaltype))) :rule-classes :congruence)
Theorem:
(defthm vl-idexpr$inline-of-vl-maybe-exprtype-fix-finaltype (equal (vl-idexpr$inline name finalwidth (vl-maybe-exprtype-fix finaltype)) (vl-idexpr$inline name finalwidth finaltype)))
Theorem:
(defthm vl-idexpr$inline-vl-maybe-exprtype-equiv-congruence-on-finaltype (implies (vl-maybe-exprtype-equiv finaltype finaltype-equiv) (equal (vl-idexpr$inline name finalwidth finaltype) (vl-idexpr$inline name finalwidth finaltype-equiv))) :rule-classes :congruence)