Look for duplicated rhses in a module, and add warnings about them.
(vl-module-duperhs-check x) → new-x
Function:
(defun vl-module-duperhs-check (x) (declare (xargs :guard (vl-module-p x))) (let ((__function__ 'vl-module-duperhs-check)) (declare (ignorable __function__)) (b* (((vl-module x) x) (alist (vl-make-duperhs-alist x.assigns)) (warnings (vl-warnings-for-duperhs-alist alist x.warnings))) (change-vl-module x :warnings warnings))))
Theorem:
(defthm vl-module-p-of-vl-module-duperhs-check (b* ((new-x (vl-module-duperhs-check x))) (vl-module-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-module-duperhs-check-of-vl-module-fix-x (equal (vl-module-duperhs-check (vl-module-fix x)) (vl-module-duperhs-check x)))
Theorem:
(defthm vl-module-duperhs-check-vl-module-equiv-congruence-on-x (implies (vl-module-equiv x x-equiv) (equal (vl-module-duperhs-check x) (vl-module-duperhs-check x-equiv))) :rule-classes :congruence)