Fixing function for vl-module structures.
(vl-module-fix x) → new-x
Function:
(defun vl-module-fix$inline (x) (declare (xargs :guard (vl-module-p x))) (let ((__function__ 'vl-module-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (car (car (car (car (car (cdr x)))))))) (minloc (vl-location-fix (cdr (car (car (car (car (cdr x)))))))) (maxloc (vl-location-fix (car (cdr (car (car (car (cdr x)))))))) (origname (str-fix (car (cdr (cdr (car (car (car (cdr x))))))))) (ports (vl-portlist-fix (cdr (cdr (cdr (car (car (car (cdr x))))))))) (portdecls (vl-portdecllist-fix (car (car (cdr (car (car (cdr x)))))))) (vardecls (vl-vardecllist-fix (cdr (car (cdr (car (car (cdr x)))))))) (modinsts (vl-modinstlist-fix (car (cdr (cdr (car (car (cdr x)))))))) (assigns (vl-assignlist-fix (car (cdr (cdr (cdr (car (car (cdr x))))))))) (gateinsts (vl-gateinstlist-fix (cdr (cdr (cdr (cdr (car (car (cdr x))))))))) (paramdecls (vl-paramdecllist-fix (car (car (car (cdr (car (cdr x)))))))) (imports (vl-importlist-fix (cdr (car (car (cdr (car (cdr x)))))))) (atts (vl-atts-fix (car (cdr (car (cdr (car (cdr x)))))))) (warnings (vl-warninglist-fix (car (cdr (cdr (car (cdr (car (cdr x))))))))) (comments (vl-commentmap-fix (cdr (cdr (cdr (car (cdr (car (cdr x))))))))) (timeunit (vl-maybe-timeunitdecl-fix (car (car (cdr (cdr (car (cdr x)))))))) (timeprecision (vl-maybe-timeprecisiondecl-fix (cdr (car (cdr (cdr (car (cdr x)))))))) (alwayses (vl-alwayslist-fix (car (cdr (cdr (cdr (car (cdr x)))))))) (genvars (vl-genvarlist-fix (car (cdr (cdr (cdr (cdr (car (cdr x))))))))) (generates (vl-genelementlist-fix (cdr (cdr (cdr (cdr (cdr (car (cdr x))))))))) (fundecls (vl-fundecllist-fix (car (car (car (car (cdr (cdr x)))))))) (taskdecls (vl-taskdecllist-fix (cdr (car (car (car (cdr (cdr x)))))))) (typedefs (vl-typedeflist-fix (car (cdr (car (car (cdr (cdr x)))))))) (initials (vl-initiallist-fix (car (cdr (cdr (car (car (cdr (cdr x))))))))) (finals (vl-finallist-fix (cdr (cdr (cdr (car (car (cdr (cdr x))))))))) (aliases (vl-aliaslist-fix (car (car (cdr (car (cdr (cdr x)))))))) (assertions (vl-assertionlist-fix (cdr (car (cdr (car (cdr (cdr x)))))))) (cassertions (vl-cassertionlist-fix (car (cdr (cdr (car (cdr (cdr x)))))))) (properties (vl-propertylist-fix (car (cdr (cdr (cdr (car (cdr (cdr x))))))))) (sequences (vl-sequencelist-fix (cdr (cdr (cdr (cdr (car (cdr (cdr x))))))))) (clkdecls (vl-clkdecllist-fix (car (car (car (cdr (cdr (cdr x)))))))) (gclkdecls (vl-gclkdecllist-fix (cdr (car (car (cdr (cdr (cdr x)))))))) (defaultdisables (vl-defaultdisablelist-fix (car (cdr (car (cdr (cdr (cdr x)))))))) (dpiimports (vl-dpiimportlist-fix (car (cdr (cdr (car (cdr (cdr (cdr x))))))))) (dpiexports (vl-dpiexportlist-fix (cdr (cdr (cdr (car (cdr (cdr (cdr x))))))))) (binds (vl-bindlist-fix (car (car (cdr (cdr (cdr (cdr x)))))))) (classes (vl-classlist-fix (car (cdr (car (cdr (cdr (cdr (cdr x))))))))) (covergroups (vl-covergrouplist-fix (cdr (cdr (car (cdr (cdr (cdr (cdr x))))))))) (elabtasks (vl-elabtasklist-fix (car (cdr (cdr (cdr (cdr (cdr x)))))))) (parse-temps (vl-maybe-parse-temps-fix (car (cdr (cdr (cdr (cdr (cdr (cdr x))))))))) (params (cdr (cdr (cdr (cdr (cdr (cdr (cdr x))))))))) (cons :vl-module (cons (cons (cons (cons (cons name minloc) (cons maxloc (cons origname ports))) (cons (cons portdecls vardecls) (cons modinsts (cons assigns gateinsts)))) (cons (cons (cons paramdecls imports) (cons atts (cons warnings comments))) (cons (cons timeunit timeprecision) (cons alwayses (cons genvars generates))))) (cons (cons (cons (cons fundecls taskdecls) (cons typedefs (cons initials finals))) (cons (cons aliases assertions) (cons cassertions (cons properties sequences)))) (cons (cons (cons clkdecls gclkdecls) (cons defaultdisables (cons dpiimports dpiexports))) (cons (cons binds (cons classes covergroups)) (cons elabtasks (cons parse-temps params)))))))) :exec x)))
Theorem:
(defthm vl-module-p-of-vl-module-fix (b* ((new-x (vl-module-fix$inline x))) (vl-module-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-module-fix-when-vl-module-p (implies (vl-module-p x) (equal (vl-module-fix x) x)))
Function:
(defun vl-module-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-module-p acl2::x) (vl-module-p acl2::y)))) (equal (vl-module-fix acl2::x) (vl-module-fix acl2::y)))
Theorem:
(defthm vl-module-equiv-is-an-equivalence (and (booleanp (vl-module-equiv x y)) (vl-module-equiv x x) (implies (vl-module-equiv x y) (vl-module-equiv y x)) (implies (and (vl-module-equiv x y) (vl-module-equiv y z)) (vl-module-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-module-equiv-implies-equal-vl-module-fix-1 (implies (vl-module-equiv acl2::x x-equiv) (equal (vl-module-fix acl2::x) (vl-module-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-module-fix-under-vl-module-equiv (vl-module-equiv (vl-module-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-module-fix-1-forward-to-vl-module-equiv (implies (equal (vl-module-fix acl2::x) acl2::y) (vl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-module-fix-2-forward-to-vl-module-equiv (implies (equal acl2::x (vl-module-fix acl2::y)) (vl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-module-equiv-of-vl-module-fix-1-forward (implies (vl-module-equiv (vl-module-fix acl2::x) acl2::y) (vl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-module-equiv-of-vl-module-fix-2-forward (implies (vl-module-equiv acl2::x (vl-module-fix acl2::y)) (vl-module-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)