Check the assignments of a module for self-assignments to bits.
(vl-module-check-selfassigns x) → new-x
(vl-module-check-selfassigns x) checks all of the assignments
in the module
Function:
(defun vl-module-check-selfassigns (x) (declare (xargs :guard (vl-module-p x))) (let ((__function__ 'vl-module-check-selfassigns)) (declare (ignorable __function__)) (b* ((assigns (vl-module->assigns x)) ((unless assigns) x) (ialist (vl-make-moditem-alist x)) (warnings (vl-assignlist-check-selfassigns assigns x ialist)) (- (fast-alist-free ialist)) ((unless warnings) x)) (change-vl-module x :warnings (append warnings (vl-module->warnings x))))))
Theorem:
(defthm vl-module-p-of-vl-module-check-selfassigns (implies (and (force (vl-module-p x))) (b* ((new-x (vl-module-check-selfassigns x))) (vl-module-p new-x))) :rule-classes :rewrite)