Main function for rewriting expression lists.
(vl-exprlist-increwrite x loc) → (mv new-x pre post)
Function:
(defun vl-exprlist-increwrite (x loc) (declare (xargs :guard (and (vl-exprlist-p x) (vl-location-p loc)))) (let ((__function__ 'vl-exprlist-increwrite)) (declare (ignorable __function__)) (b* ((x (vl-exprlist-fix x)) ((unless (vl-exprlist-has-incexprs-p x)) (mv x nil nil)) ((mv new-x pre-rev post-rev) (vl-exprlist-increwrite-aux x nil nil loc))) (mv new-x (rev pre-rev) (rev post-rev)))))
Theorem:
(defthm vl-exprlist-p-of-vl-exprlist-increwrite.new-x (b* (((mv ?new-x ?pre ?post) (vl-exprlist-increwrite x loc))) (vl-exprlist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-stmtlist-p-of-vl-exprlist-increwrite.pre (b* (((mv ?new-x ?pre ?post) (vl-exprlist-increwrite x loc))) (vl-stmtlist-p pre)) :rule-classes :rewrite)
Theorem:
(defthm vl-stmtlist-p-of-vl-exprlist-increwrite.post (b* (((mv ?new-x ?pre ?post) (vl-exprlist-increwrite x loc))) (vl-stmtlist-p post)) :rule-classes :rewrite)
Theorem:
(defthm vl-exprlist-increwrite-of-vl-exprlist-fix-x (equal (vl-exprlist-increwrite (vl-exprlist-fix x) loc) (vl-exprlist-increwrite x loc)))
Theorem:
(defthm vl-exprlist-increwrite-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-exprlist-increwrite x loc) (vl-exprlist-increwrite x-equiv loc))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-increwrite-of-vl-location-fix-loc (equal (vl-exprlist-increwrite x (vl-location-fix loc)) (vl-exprlist-increwrite x loc)))
Theorem:
(defthm vl-exprlist-increwrite-vl-location-equiv-congruence-on-loc (implies (vl-location-equiv loc loc-equiv) (equal (vl-exprlist-increwrite x loc) (vl-exprlist-increwrite x loc-equiv))) :rule-classes :congruence)