Rewrite operators throughout a vl-assign-p
(vl-assign-oprewrite x warnings) → (mv warnings new-x)
Function:
(defun vl-assign-oprewrite (x warnings) (declare (xargs :guard (and (vl-assign-p x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-assign-oprewrite)) (declare (ignorable __function__)) (b* ((x (vl-assign-fix x))) (b* (((vl-assign x) x) ((mv warnings lvalue-prime) (vl-expr-oprewrite x.lvalue warnings)) ((mv warnings expr-prime) (vl-expr-oprewrite x.expr warnings))) (mv warnings (change-vl-assign x :lvalue lvalue-prime :expr expr-prime))))))
Theorem:
(defthm vl-warninglist-p-of-vl-assign-oprewrite.warnings (b* (((mv ?warnings ?new-x) (vl-assign-oprewrite x warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-assign-p-of-vl-assign-oprewrite.new-x (b* (((mv ?warnings ?new-x) (vl-assign-oprewrite x warnings))) (vl-assign-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-assign-oprewrite-of-vl-assign-fix-x (equal (vl-assign-oprewrite (vl-assign-fix x) warnings) (vl-assign-oprewrite x warnings)))
Theorem:
(defthm vl-assign-oprewrite-vl-assign-equiv-congruence-on-x (implies (vl-assign-equiv x x-equiv) (equal (vl-assign-oprewrite x warnings) (vl-assign-oprewrite x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-assign-oprewrite-of-vl-warninglist-fix-warnings (equal (vl-assign-oprewrite x (vl-warninglist-fix warnings)) (vl-assign-oprewrite x warnings)))
Theorem:
(defthm vl-assign-oprewrite-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-assign-oprewrite x warnings) (vl-assign-oprewrite x warnings-equiv))) :rule-classes :congruence)