Get the value from a resolved expression.
Function:
(defun vl-resolved->val (x) (declare (xargs :guard (vl-expr-p x))) (declare (xargs :guard (vl-expr-resolved-p x))) (let ((__function__ 'vl-resolved->val)) (declare (ignorable __function__)) (b* (((vl-constint x) (vl-literal->val x))) (if (eq x.origsign :vl-signed) (acl2::logext x.origwidth x.value) x.value))))
Theorem:
(defthm integerp-of-vl-resolved->val (b* ((val (vl-resolved->val x))) (integerp val)) :rule-classes :type-prescription)
Theorem:
(defthm vl-resolved->val-of-vl-expr-fix-x (equal (vl-resolved->val (vl-expr-fix x)) (vl-resolved->val x)))
Theorem:
(defthm vl-resolved->val-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-resolved->val x) (vl-resolved->val x-equiv))) :rule-classes :congruence)