Remove all assignments to these wires (we do this after we've propagated the assignments.
(remove-simple-assigns-to names assigns) → new-assigns
Function:
(defun remove-simple-assigns-to (names assigns) (declare (xargs :guard (and (string-listp names) (vl-assignlist-p assigns)))) (let ((__function__ 'remove-simple-assigns-to)) (declare (ignorable __function__)) (b* (((when (atom assigns)) nil) (x1 (car assigns)) ((vl-assign x1) x1) ((when (and (vl-idexpr-p x1.lvalue) (member-equal (vl-idexpr->name x1.lvalue) names))) (remove-simple-assigns-to names (cdr assigns)))) (cons (car assigns) (remove-simple-assigns-to names (cdr assigns))))))
Theorem:
(defthm vl-assignlist-p-of-remove-simple-assigns-to (implies (and (force (string-listp names)) (force (vl-assignlist-p assigns))) (b* ((new-assigns (remove-simple-assigns-to names assigns))) (vl-assignlist-p new-assigns))) :rule-classes :rewrite)