Split up complex expressions throughout a module's assignments, module instances, and gate instances.
(vl-module-split x) → new-x
Function:
(defun vl-module-split (x) (declare (xargs :guard (vl-module-p x))) (let ((__function__ 'vl-module-split)) (declare (ignorable __function__)) (b* (((vl-module x) x) ((when (vl-module->hands-offp x)) x) (delta (vl-starting-delta x)) (delta (change-vl-delta delta :vardecls x.vardecls)) ((mv assigns delta) (vl-assignlist-split x.assigns delta)) ((mv modinsts delta) (vl-modinstlist-split x.modinsts delta)) ((mv gateinsts delta) (vl-gateinstlist-split x.gateinsts delta)) ((vl-delta delta) (vl-free-delta delta))) (change-vl-module x :vardecls delta.vardecls :assigns (revappend-without-guard delta.assigns assigns) :modinsts modinsts :gateinsts gateinsts :warnings delta.warnings))))
Theorem:
(defthm vl-module-p-of-vl-module-split (implies (and (force (vl-module-p x))) (b* ((new-x (vl-module-split x))) (vl-module-p new-x))) :rule-classes :rewrite)