Cut down excessive warnings of certain types.
(vl-elide-warnings warnings cutoff) → new-warnings
Function:
(defun vl-elide-warnings (warnings cutoff) (declare (xargs :guard (and (vl-warninglist-p warnings) (maybe-natp cutoff)))) (let ((__function__ 'vl-elide-warnings)) (declare (ignorable __function__)) (b* (((unless cutoff) (vl-warninglist-fix warnings)) ((mv warnings counts-fal suppressed) (vl-elide-warnings-main warnings cutoff nil nil nil)) (- (fast-alist-free counts-fal)) ((unless (consp suppressed)) warnings)) (warn :type :vl-elided-warnings :msg "Eliding ~x0 additional warning~s1 (type~s1 ~&2)." :args (list (len suppressed) (if (vl-plural-p suppressed) "s" "") (mergesort suppressed))))))
Theorem:
(defthm vl-warninglist-p-of-vl-elide-warnings (b* ((new-warnings (vl-elide-warnings warnings cutoff))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-elide-warnings-of-vl-warninglist-fix-warnings (equal (vl-elide-warnings (vl-warninglist-fix warnings) cutoff) (vl-elide-warnings warnings cutoff)))
Theorem:
(defthm vl-elide-warnings-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-elide-warnings warnings cutoff) (vl-elide-warnings warnings-equiv cutoff))) :rule-classes :congruence)
Theorem:
(defthm vl-elide-warnings-of-maybe-natp-fix-cutoff (equal (vl-elide-warnings warnings (maybe-natp-fix cutoff)) (vl-elide-warnings warnings cutoff)))
Theorem:
(defthm vl-elide-warnings-maybe-nat-equiv-congruence-on-cutoff (implies (acl2::maybe-nat-equiv cutoff cutoff-equiv) (equal (vl-elide-warnings warnings cutoff) (vl-elide-warnings warnings cutoff-equiv))) :rule-classes :congruence)