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