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