• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
          • Vl-warninglist->types
          • Vl-warning
          • Propagating-errors
          • Vl-reportcard
            • Vl-reportcard-p
            • Vl-apply-reportcard
            • Vl-reportcard-fix
            • Vl-extend-reportcard-list
            • Vl-design-origname-reportcard
            • Vl-design-reportcard
            • Vl-extend-reportcard
            • Vl-reportcard-revive-invalid-warnings
            • Vl-clean-reportcard
            • Vl-reportcard-equiv
            • Vl-print-reportcard
              • Vl-elide-warnings
                • Vl-elide-warnings-main
              • Vl-print-reportcard-aux
            • Vl-reportcard-to-string
            • Vl-keep-from-reportcard
            • Vl-reportcard-types
            • Vl-reportcardkey-p
          • Vl-warning-sort
          • Lint-warning-suppression
          • Clean-warnings
          • Warn
          • Vl-print-warnings-with-header
          • Vl-some-warning-fatalp
          • Vl-print-warnings-with-named-header
          • Flat-warnings
          • Vl-remove-warnings
          • Vl-keep-warnings
          • Vl-print-warnings
          • Vl-some-warning-of-type-p
          • Vl-clean-warnings
          • Vl-warnings-to-string
          • Vl-warninglist
          • Vl-print-warning
          • Ok
          • Vl-trace-warnings
          • Fatal
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Vl-print-reportcard

Vl-elide-warnings

Cut down excessive warnings of certain types.

Signature
(vl-elide-warnings warnings cutoff) → new-warnings
Arguments
warnings — Warnings to filter.
    Guard (vl-warninglist-p warnings).
cutoff — Max warnings of each type to permit, or NIL for no eliding.
    Guard (maybe-natp cutoff).
Returns
new-warnings — Type (vl-warninglist-p new-warnings).

Definitions and Theorems

Function: vl-elide-warnings

(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: vl-warninglist-p-of-vl-elide-warnings

(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: vl-elide-warnings-of-vl-warninglist-fix-warnings

(defthm vl-elide-warnings-of-vl-warninglist-fix-warnings
  (equal (vl-elide-warnings (vl-warninglist-fix warnings)
                            cutoff)
         (vl-elide-warnings warnings cutoff)))

Theorem: vl-elide-warnings-vl-warninglist-equiv-congruence-on-warnings

(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: vl-elide-warnings-of-maybe-natp-fix-cutoff

(defthm vl-elide-warnings-of-maybe-natp-fix-cutoff
  (equal (vl-elide-warnings warnings (maybe-natp-fix cutoff))
         (vl-elide-warnings warnings cutoff)))

Theorem: vl-elide-warnings-maybe-nat-equiv-congruence-on-cutoff

(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)

Subtopics

Vl-elide-warnings-main