Look for strange conditions throughout an expression.
(vl-expr-condcheck x tests-above) → warnings
We recursively look throughout
The
test ? then : else
Except:
The basic idea is that
Theorem:
(defthm return-type-of-vl-expr-condcheck.warnings (b* ((?warnings (vl-expr-condcheck x tests-above))) (vl-warningtree-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-exprlist-condcheck.warnings (b* ((?warnings (vl-exprlist-condcheck x tests-above))) (vl-warningtree-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-condcheck-of-vl-expr-fix-x (equal (vl-expr-condcheck (vl-expr-fix x) tests-above) (vl-expr-condcheck x tests-above)))
Theorem:
(defthm vl-expr-condcheck-of-vl-exprlist-fix-tests-above (equal (vl-expr-condcheck x (vl-exprlist-fix tests-above)) (vl-expr-condcheck x tests-above)))
Theorem:
(defthm vl-exprlist-condcheck-of-vl-exprlist-fix-x (equal (vl-exprlist-condcheck (vl-exprlist-fix x) tests-above) (vl-exprlist-condcheck x tests-above)))
Theorem:
(defthm vl-exprlist-condcheck-of-vl-exprlist-fix-tests-above (equal (vl-exprlist-condcheck x (vl-exprlist-fix tests-above)) (vl-exprlist-condcheck x tests-above)))
Theorem:
(defthm vl-expr-condcheck-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-expr-condcheck x tests-above) (vl-expr-condcheck x-equiv tests-above))) :rule-classes :congruence)
Theorem:
(defthm vl-expr-condcheck-vl-exprlist-equiv-congruence-on-tests-above (implies (vl-exprlist-equiv tests-above tests-above-equiv) (equal (vl-expr-condcheck x tests-above) (vl-expr-condcheck x tests-above-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-condcheck-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-exprlist-condcheck x tests-above) (vl-exprlist-condcheck x-equiv tests-above))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-condcheck-vl-exprlist-equiv-congruence-on-tests-above (implies (vl-exprlist-equiv tests-above tests-above-equiv) (equal (vl-exprlist-condcheck x tests-above) (vl-exprlist-condcheck x tests-above-equiv))) :rule-classes :congruence)