(vl-warn-about-negative-indices constantp orig-x new-x warnings) → new-warnings
Function:
(defun vl-warn-about-negative-indices (constantp orig-x new-x warnings) (declare (xargs :guard (and (vl-expr-p orig-x) (vl-expr-p new-x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-warn-about-negative-indices)) (declare (ignorable __function__)) (b* (((unless (and constantp (vl-expr-resolved-p new-x) (< (vl-resolved->val new-x) 0) (not (vl-expr-equiv new-x orig-x)))) (ok))) (warn :type :vl-negative-index :msg "Index expression ~a0 resolved to ~a1, where a nonnegative value was expected" :args (list (vl-expr-fix orig-x) (vl-expr-update-atts new-x nil))))))
Theorem:
(defthm vl-warninglist-p-of-vl-warn-about-negative-indices (b* ((new-warnings (vl-warn-about-negative-indices constantp orig-x new-x warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-warn-about-negative-indices-of-vl-expr-fix-orig-x (equal (vl-warn-about-negative-indices constantp (vl-expr-fix orig-x) new-x warnings) (vl-warn-about-negative-indices constantp orig-x new-x warnings)))
Theorem:
(defthm vl-warn-about-negative-indices-vl-expr-equiv-congruence-on-orig-x (implies (vl-expr-equiv orig-x orig-x-equiv) (equal (vl-warn-about-negative-indices constantp orig-x new-x warnings) (vl-warn-about-negative-indices constantp orig-x-equiv new-x warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-about-negative-indices-of-vl-expr-fix-new-x (equal (vl-warn-about-negative-indices constantp orig-x (vl-expr-fix new-x) warnings) (vl-warn-about-negative-indices constantp orig-x new-x warnings)))
Theorem:
(defthm vl-warn-about-negative-indices-vl-expr-equiv-congruence-on-new-x (implies (vl-expr-equiv new-x new-x-equiv) (equal (vl-warn-about-negative-indices constantp orig-x new-x warnings) (vl-warn-about-negative-indices constantp orig-x new-x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-about-negative-indices-of-vl-warninglist-fix-warnings (equal (vl-warn-about-negative-indices constantp orig-x new-x (vl-warninglist-fix warnings)) (vl-warn-about-negative-indices constantp orig-x new-x warnings)))
Theorem:
(defthm vl-warn-about-negative-indices-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-warn-about-negative-indices constantp orig-x new-x warnings) (vl-warn-about-negative-indices constantp orig-x new-x warnings-equiv))) :rule-classes :congruence)