Finds the struct members of x when it is a struct or union.
(vl-datatype->structmembers x) → (mv ok members)
Function:
(defun vl-datatype->structmembers (x) (declare (xargs :guard (vl-datatype-p x))) (let ((__function__ 'vl-datatype->structmembers)) (declare (ignorable __function__)) (vl-datatype-case x :vl-struct (mv t x.members) :vl-union (mv t x.members) :otherwise (mv nil nil))))
Theorem:
(defthm vl-structmemberlist-p-of-vl-datatype->structmembers.members (b* (((mv ?ok ?members) (vl-datatype->structmembers x))) (vl-structmemberlist-p members)) :rule-classes :rewrite)
Theorem:
(defthm vl-structmemberlist-resolved-p-of-vl-datatype->structmembers (implies (vl-datatype-resolved-p x) (vl-structmemberlist-resolved-p (mv-nth 1 (vl-datatype->structmembers x)))))
Theorem:
(defthm vl-datatype->structmembers-of-vl-datatype-fix-x (equal (vl-datatype->structmembers (vl-datatype-fix x)) (vl-datatype->structmembers x)))
Theorem:
(defthm vl-datatype->structmembers-vl-datatype-equiv-congruence-on-x (implies (vl-datatype-equiv x x-equiv) (equal (vl-datatype->structmembers x) (vl-datatype->structmembers x-equiv))) :rule-classes :congruence)