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 (implies (and (force (vl-module-p x))) (b* ((new-x (vl-module-duperhs-check x))) (vl-module-p new-x))) :rule-classes :rewrite)