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 (cdr x))))))) (params (car (cdr (car (car (car (cdr x))))))) (imports (vl-importlist-fix (cdr (cdr (car (car (car (cdr x)))))))) (ports (vl-portlist-fix (car (cdr (car (car (cdr x))))))) (portdecls (vl-portdecllist-fix (car (cdr (cdr (car (car (cdr x)))))))) (vardecls (vl-vardecllist-fix (cdr (cdr (cdr (car (car (cdr x)))))))) (paramdecls (vl-paramdecllist-fix (car (car (cdr (car (cdr x))))))) (fundecls (vl-fundecllist-fix (car (cdr (car (cdr (car (cdr x)))))))) (taskdecls (vl-taskdecllist-fix (cdr (cdr (car (cdr (car (cdr x)))))))) (assigns (vl-assignlist-fix (car (cdr (cdr (car (cdr x))))))) (aliases (vl-aliaslist-fix (car (cdr (cdr (cdr (car (cdr x)))))))) (modinsts (vl-modinstlist-fix (cdr (cdr (cdr (cdr (car (cdr x)))))))) (gateinsts (vl-gateinstlist-fix (car (car (car (cdr (cdr x))))))) (alwayses (vl-alwayslist-fix (car (cdr (car (car (cdr (cdr x)))))))) (initials (vl-initiallist-fix (cdr (cdr (car (car (cdr (cdr x)))))))) (genvars (vl-genvarlist-fix (car (cdr (car (cdr (cdr x))))))) (generates (vl-genelementlist-fix (car (cdr (cdr (car (cdr (cdr x)))))))) (atts (vl-atts-fix (cdr (cdr (cdr (car (cdr (cdr x)))))))) (minloc (vl-location-fix (car (car (cdr (cdr (cdr x))))))) (maxloc (vl-location-fix (car (cdr (car (cdr (cdr (cdr x)))))))) (origname (str-fix (cdr (cdr (car (cdr (cdr (cdr x)))))))) (warnings (vl-warninglist-fix (car (car (cdr (cdr (cdr (cdr x)))))))) (comments (vl-commentmap-fix (cdr (car (cdr (cdr (cdr (cdr x)))))))) (loaditems (vl-genelementlist-fix (car (cdr (cdr (cdr (cdr (cdr x)))))))) (esim (cdr (cdr (cdr (cdr (cdr (cdr x)))))))) (cons :vl-module (cons (cons (cons (cons name (cons params imports)) (cons ports (cons portdecls vardecls))) (cons (cons paramdecls (cons fundecls taskdecls)) (cons assigns (cons aliases modinsts)))) (cons (cons (cons gateinsts (cons alwayses initials)) (cons genvars (cons generates atts))) (cons (cons minloc (cons maxloc origname)) (cons (cons warnings comments) (cons loaditems esim))))))) :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)