Get the val field from a vl-literal.
(vl-literal->val x) → val
This is an ordinary field accessor created by defprod.
Function:
(defun vl-literal->val$inline (x) (declare (xargs :guard (vl-expr-p x))) (declare (xargs :guard (equal (vl-expr-kind x) :vl-literal))) (let ((__function__ 'vl-literal->val)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (vl-expr-kind x) :vl-literal) x))) (vl-value-fix (std::prod-car (cdr x)))) :exec (std::prod-car (cdr x)))))
Theorem:
(defthm vl-value-p-of-vl-literal->val (b* ((val (vl-literal->val$inline x))) (vl-value-p val)) :rule-classes :rewrite)
Theorem:
(defthm vl-literal->val$inline-of-vl-expr-fix-x (equal (vl-literal->val$inline (vl-expr-fix x)) (vl-literal->val$inline x)))
Theorem:
(defthm vl-literal->val$inline-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-literal->val$inline x) (vl-literal->val$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-literal->val-when-wrong-kind (implies (not (equal (vl-expr-kind x) :vl-literal)) (equal (vl-literal->val x) (vl-value-fix nil))))