Optimize expressions throughout a vl-assignlist-p.
(vl-assignlist-optimize x ss) → (mv changedp new-x)
Function:
(defun vl-assignlist-optimize (x ss) (declare (xargs :guard (and (vl-assignlist-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-assignlist-optimize)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv nil nil)) ((mv car-changedp car-prime) (vl-assign-optimize (car x) ss)) ((mv cdr-changedp cdr-prime) (vl-assignlist-optimize (cdr x) ss))) (mv (or car-changedp cdr-changedp) (cons car-prime cdr-prime)))))
Theorem:
(defthm booleanp-of-vl-assignlist-optimize.changedp (b* (((mv ?changedp ?new-x) (vl-assignlist-optimize x ss))) (booleanp changedp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-assignlist-p-of-vl-assignlist-optimize.new-x (b* (((mv ?changedp ?new-x) (vl-assignlist-optimize x ss))) (vl-assignlist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-assignlist-optimize-mvtypes-1 (true-listp (mv-nth 1 (vl-assignlist-optimize x ss))) :rule-classes :type-prescription)
Theorem:
(defthm vl-assignlist-optimize-of-vl-assignlist-fix-x (equal (vl-assignlist-optimize (vl-assignlist-fix x) ss) (vl-assignlist-optimize x ss)))
Theorem:
(defthm vl-assignlist-optimize-vl-assignlist-equiv-congruence-on-x (implies (vl-assignlist-equiv x x-equiv) (equal (vl-assignlist-optimize x ss) (vl-assignlist-optimize x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-assignlist-optimize-of-vl-scopestack-fix-ss (equal (vl-assignlist-optimize x (vl-scopestack-fix ss)) (vl-assignlist-optimize x ss)))
Theorem:
(defthm vl-assignlist-optimize-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-assignlist-optimize x ss) (vl-assignlist-optimize x ss-equiv))) :rule-classes :congruence)