Get the value from a resolved expression.
Guaranteed to return a natural number.
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__)) (vl-constint->value (vl-atom->guts x))))
Theorem:
(defthm natp-of-vl-resolved->val (b* ((val (vl-resolved->val x))) (natp 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)