Scopesubstitute into a vl-module-p.
(vl-module-scopesubst x ss) → new-x
Function:
(defun vl-module-scopesubst (x ss) (declare (xargs :guard (and (vl-module-p x) (vl-scopestack-p ss)))) (declare (ignorable x ss)) (let ((__function__ 'vl-module-scopesubst)) (declare (ignorable __function__)) (b* (((vl-module x) (vl-module-fix x)) (ss (vl-scopestack-push x ss))) (change-vl-module x :ports (vl-portlist-scopesubst x.ports ss) :portdecls (vl-portdecllist-scopesubst x.portdecls ss) :assigns (vl-assignlist-scopesubst x.assigns ss) :vardecls (vl-vardecllist-scopesubst x.vardecls ss) :fundecls (vl-fundecllist-scopesubst x.fundecls ss) :paramdecls (vl-paramdecllist-scopesubst x.paramdecls ss) :modinsts (vl-modinstlist-scopesubst x.modinsts ss) :gateinsts (vl-gateinstlist-scopesubst x.gateinsts ss) :alwayses (vl-alwayslist-scopesubst x.alwayses ss) :initials (vl-initiallist-scopesubst x.initials ss)))))
Theorem:
(defthm vl-module-p-of-vl-module-scopesubst (b* ((new-x (vl-module-scopesubst x ss))) (vl-module-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-module-scopesubst-of-vl-module-fix-x (equal (vl-module-scopesubst (vl-module-fix x) ss) (vl-module-scopesubst x ss)))
Theorem:
(defthm vl-module-scopesubst-vl-module-equiv-congruence-on-x (implies (vl-module-equiv x x-equiv) (equal (vl-module-scopesubst x ss) (vl-module-scopesubst x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-module-scopesubst-of-vl-scopestack-fix-ss (equal (vl-module-scopesubst x (vl-scopestack-fix ss)) (vl-module-scopesubst x ss)))
Theorem:
(defthm vl-module-scopesubst-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-module-scopesubst x ss) (vl-module-scopesubst x ss-equiv))) :rule-classes :congruence)