• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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-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-duplicate-assign-warnings

    Signature
    (vl-duplicate-assign-warnings dupes fixed orig modname) 
      → 
    warnings
    Arguments
    dupes — The assigns that were duplicated. (fixed).
        Guard (vl-assignlist-p dupes).
    fixed — Fixed versions of orig.
        Guard (vl-assignlist-p fixed).
    orig — Original mod instances, i.e., before fixing.
        Guard (vl-assignlist-p orig).
    modname — Guard (stringp modname).
    Returns
    warnings — Warnings for each duplicate assign.
        Type (vl-warninglist-p warnings).

    Definitions and Theorems

    Function: vl-duplicate-assign-warnings

    (defun vl-duplicate-assign-warnings (dupes fixed orig modname)
      (declare (xargs :guard (and (vl-assignlist-p dupes)
                                  (vl-assignlist-p fixed)
                                  (vl-assignlist-p orig)
                                  (stringp modname))))
      (declare (xargs :guard (same-lengthp fixed orig)))
      (let ((__function__ 'vl-duplicate-assign-warnings))
        (declare (ignorable __function__))
        (b* (((when (atom dupes)) nil)
             (locs (vl-duplicate-assign-locations (car dupes)
                                                  fixed orig))
             (lvalue (vl-assign->lvalue (car dupes)))
             (type (if (vl-idexpr-p lvalue)
                       (cat "assignments to "
                            (vl-idexpr->name lvalue))
                     (let ((lvalue-str (vl-pps-origexpr lvalue)))
                       (if (< (length lvalue-str) 40)
                           (cat "assignments to " lvalue-str)
                         (cat "assignments to \""
                              (subseq lvalue-str 0 40)
                              "...\"")))))
             (warning (vl-make-duplicate-warning type locs modname))
             (rest (vl-duplicate-assign-warnings (cdr dupes)
                                                 fixed orig modname)))
          (cons warning rest))))

    Theorem: vl-warninglist-p-of-vl-duplicate-assign-warnings

    (defthm vl-warninglist-p-of-vl-duplicate-assign-warnings
     (b* ((warnings
               (vl-duplicate-assign-warnings dupes fixed orig modname)))
       (vl-warninglist-p warnings))
     :rule-classes :rewrite)