(vl-datatype-$dimensions x) → *
Function:
(defun vl-datatype-$dimensions (x) (declare (xargs :guard (vl-datatype-p x))) (declare (xargs :guard (vl-datatype-resolved-p x))) (let ((__function__ 'vl-datatype-$dimensions)) (declare (ignorable __function__)) (+ (len (vl-datatype->udims x)) (len (vl-datatype->pdims x)) (vl-datatype-case x :vl-coretype (b* (((vl-coredatatype-info info) (vl-coretypename->info x.name))) (if (or (eq x.name :vl-string) (and info.size (not (eql info.size 1)))) 1 0)) :vl-struct (if x.packedp 1 0) :vl-union (if x.packedp 1 0) :vl-enum 1 :vl-usertype (mbe :logic (if x.res (vl-datatype-$dimensions x.res) 0) :exec (vl-datatype-$dimensions x.res))))))
Theorem:
(defthm vl-datatype-$dimensions-of-vl-datatype-fix-x (equal (vl-datatype-$dimensions (vl-datatype-fix x)) (vl-datatype-$dimensions x)))
Theorem:
(defthm vl-datatype-$dimensions-vl-datatype-equiv-congruence-on-x (implies (vl-datatype-equiv x x-equiv) (equal (vl-datatype-$dimensions x) (vl-datatype-$dimensions x-equiv))) :rule-classes :congruence)