Optimize sub-expressions throughout an expression.
(vl-expr-optimize x ss) → (mv changedp new-x)
The use of
Theorem:
(defthm return-type-of-vl-expr-optimize.changedp (b* (((mv ?changedp ?new-x) (vl-expr-optimize x ss))) (booleanp changedp)) :rule-classes :type-prescription)
Theorem:
(defthm return-type-of-vl-expr-optimize.new-x (b* (((mv ?changedp ?new-x) (vl-expr-optimize x ss))) (vl-expr-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-exprlist-optimize.changedp (b* (((mv ?changedp ?new-x) (vl-exprlist-optimize x ss))) (booleanp changedp)) :rule-classes :type-prescription)
Theorem:
(defthm return-type-of-vl-exprlist-optimize.new-x (b* (((mv ?changedp ?new-x) (vl-exprlist-optimize x ss))) (and (vl-exprlist-p new-x) (equal (len new-x) (len x)))) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-optimize-of-vl-expr-fix-x (equal (vl-expr-optimize (vl-expr-fix x) ss) (vl-expr-optimize x ss)))
Theorem:
(defthm vl-expr-optimize-of-vl-scopestack-fix-ss (equal (vl-expr-optimize x (vl-scopestack-fix ss)) (vl-expr-optimize x ss)))
Theorem:
(defthm vl-exprlist-optimize-of-vl-exprlist-fix-x (equal (vl-exprlist-optimize (vl-exprlist-fix x) ss) (vl-exprlist-optimize x ss)))
Theorem:
(defthm vl-exprlist-optimize-of-vl-scopestack-fix-ss (equal (vl-exprlist-optimize x (vl-scopestack-fix ss)) (vl-exprlist-optimize x ss)))
Theorem:
(defthm vl-expr-optimize-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-expr-optimize x ss) (vl-expr-optimize x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-expr-optimize-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-expr-optimize x ss) (vl-expr-optimize x ss-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-optimize-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-exprlist-optimize x ss) (vl-exprlist-optimize x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-optimize-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-exprlist-optimize x ss) (vl-exprlist-optimize x ss-equiv))) :rule-classes :congruence)