• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
          • Vl-lintconfig-p
          • Lucid
          • Skip-detection
          • Vl-lintresult-p
          • Lint-warning-suppression
          • Condcheck
          • Selfassigns
          • Leftright-check
          • Dupeinst-check
          • Oddexpr-check
          • Remove-toohard
          • Qmarksize-check
          • Portcheck
          • Duplicate-detect
            • Vl-modulelist-duplicate-detect
            • Vl-duplicate-assign-warnings
            • Vl-duplicate-modinst-warnings
            • Vl-duplicate-gateinst-warnings
            • Vl-duplicate-modinst-locations
            • Vl-duplicate-gateinst-locations
            • Vl-duplicate-assign-locations
            • Vl-module-duplicate-detect
            • Vl-make-duplicate-warning
              • Vl-locationlist-string
            • Vl-design-duplicate-detect
          • Vl-print-certain-warnings
          • Duperhs-check
          • *vl-lint-help*
          • Lint-stmt-rewrite
          • Drop-missing-submodules
          • Check-case
          • Drop-user-submodules
          • Check-namespace
          • Vl-lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Duplicate-detect

Vl-make-duplicate-warning

Signature
(vl-make-duplicate-warning type locs modname) → warning
Arguments
type — Guard (stringp type).
locs — Guard (vl-locationlist-p locs).
modname — Guard (stringp modname).
Returns
warning — Type (vl-warning-p warning).

Definitions and Theorems

Function: vl-make-duplicate-warning

(defun vl-make-duplicate-warning (type locs modname)
  (declare (xargs :guard (and (stringp type)
                              (vl-locationlist-p locs)
                              (stringp modname))))
  (let ((__function__ 'vl-make-duplicate-warning))
    (declare (ignorable __function__))
    (b* ((locs (list-fix locs))
         (elide-p (> (len locs) 9))
         (elided-locs (if elide-p (take 9 locs) locs)))
      (make-vl-warning
           :type :vl-warn-duplicates
           :msg (cat "In module ~m0, found duplicated "
                     type " at "
                     (vl-locationlist-string (len elided-locs))
                     (if elide-p " (and other locations)."
                       "."))
           :args (cons modname elided-locs)
           :fatalp nil
           :fn 'vl-make-duplicate-warning))))

Theorem: vl-warning-p-of-vl-make-duplicate-warning

(defthm vl-warning-p-of-vl-make-duplicate-warning
  (b* ((warning (vl-make-duplicate-warning type locs modname)))
    (vl-warning-p warning))
  :rule-classes :rewrite)

Subtopics

Vl-locationlist-string