(vl-gencase-match x y ss warnings) → (mv ok warnings equalp)
Function:
(defun vl-gencase-match (x y ss warnings) (declare (xargs :guard (and (vl-expr-p x) (vl-expr-p y) (vl-scopestack-p ss) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-gencase-match)) (declare (ignorable __function__)) (b* ((eq-expr (make-vl-nonatom :op :vl-binary-ceq :args (list x y))) ((mv ok res) (vl-consteval eq-expr ss)) ((when ok) (mv t (ok) (not (eql 0 (vl-resolved->val res)))))) (mv nil (fatal :type :vl-generate-resolve-fail :msg "Couldn't determine whether test expression ~a0 matched case expression ~a1." :args (list (vl-expr-fix x) (vl-expr-fix y))) nil))))
Theorem:
(defthm vl-warninglist-p-of-vl-gencase-match.warnings (b* (((mv ?ok ?warnings common-lisp::?equalp) (vl-gencase-match x y ss warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-gencase-match-of-vl-expr-fix-x (equal (vl-gencase-match (vl-expr-fix x) y ss warnings) (vl-gencase-match x y ss warnings)))
Theorem:
(defthm vl-gencase-match-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-gencase-match x y ss warnings) (vl-gencase-match x-equiv y ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-gencase-match-of-vl-expr-fix-y (equal (vl-gencase-match x (vl-expr-fix y) ss warnings) (vl-gencase-match x y ss warnings)))
Theorem:
(defthm vl-gencase-match-vl-expr-equiv-congruence-on-y (implies (vl-expr-equiv y y-equiv) (equal (vl-gencase-match x y ss warnings) (vl-gencase-match x y-equiv ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-gencase-match-of-vl-scopestack-fix-ss (equal (vl-gencase-match x y (vl-scopestack-fix ss) warnings) (vl-gencase-match x y ss warnings)))
Theorem:
(defthm vl-gencase-match-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-gencase-match x y ss warnings) (vl-gencase-match x y ss-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-gencase-match-of-vl-warninglist-fix-warnings (equal (vl-gencase-match x y ss (vl-warninglist-fix warnings)) (vl-gencase-match x y ss warnings)))
Theorem:
(defthm vl-gencase-match-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-gencase-match x y ss warnings) (vl-gencase-match x y ss warnings-equiv))) :rule-classes :congruence)