• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
          • Lint-warning-suppression
            • Vl-mash-warning-strings
            • Vl-design-lint-ignoreall
            • Vl-design-suppress-lint-warnings
            • Vl-ctxelement-scan-for-ignore
            • Vl-modelement-scan-for-ignore
            • Vl-warninglist-lint-ignoreall
            • Vl-function-specialization-map-scan-for-ignore
            • Vl-portdecl-or-blockitem-list-scan-for-ignore
            • Vl-portdecl-or-blockitem-scan-for-ignore
            • Vl-maybe-delayoreventcontrol-scan-for-ignore
            • Vl-fundecl-scan-for-ignore
            • Vl-function-specialization-scan-for-ignore
            • Vl-taskdecl-scan-for-ignore
            • Vl-modport-portlist-scan-for-ignore
            • Vl-delayoreventcontrol-scan-for-ignore
            • Vl-repeateventcontrol-scan-for-ignore
            • Vl-lint-suppress-warnings-att-compare-default
            • Vl-clkdecl-scan-for-ignore
            • Vl-vardecllist-scan-for-ignore
            • Vl-typedeflist-scan-for-ignore
            • Vl-taskdecllist-scan-for-ignore
            • Vl-sequencelist-scan-for-ignore
            • Vl-propportlist-scan-for-ignore
            • Vl-propertylist-scan-for-ignore
            • Vl-portdecllist-scan-for-ignore
            • Vl-plainarglist-scan-for-ignore
            • Vl-paramtype-scan-for-ignore
            • Vl-paramdecllist-scan-for-ignore
            • Vl-namedarglist-scan-for-ignore
            • Vl-modport-port-scan-for-ignore
            • Vl-modinstlist-scan-for-ignore
            • Vl-maybe-gatedelay-scan-for-ignore
            • Vl-maybe-exprdist-scan-for-ignore
            • Vl-lint-scan-for-ignore
            • Vl-lint-atts-say-ignore
            • Vl-lint-attname-says-ignore
            • Vl-fundecllist-scan-for-ignore
            • Vl-exprdistlist-scan-for-ignore
            • Vl-defaultdisable-scan-for-ignore
            • Vl-clkassignlist-scan-for-ignore
            • Vl-class-scan-for-ignore
            • Vl-blockitemlist-scan-for-ignore
            • Vl-blockitem-scan-for-ignore
            • Vl-vardecl-scan-for-ignore
            • Vl-sequence-scan-for-ignore
            • Vl-repetition-scan-for-ignore
            • Vl-regularport-scan-for-ignore
            • Vl-propspec-scan-for-ignore
            • Vl-propport-scan-for-ignore
            • Vl-property-scan-for-ignore
            • Vl-portdecl-scan-for-ignore
            • Vl-modinst-scan-for-ignore
            • Vl-maybe-clkskew-scan-for-ignore
            • Vl-interfaceport-scan-for-ignore
            • Vl-importlist-scan-for-ignore
            • Vl-gateinst-scan-for-ignore
            • Vl-gatedelay-scan-for-ignore
            • Vl-eventcontrol-scan-for-ignore
            • Vl-dpiimport-scan-for-ignore
            • Vl-distlist-scan-for-ignore
            • Vl-distitem-scan-for-ignore
            • Vl-delaycontrol-scan-for-ignore
            • Vl-typedef-scan-for-ignore
            • Vl-plainarg-scan-for-ignore
            • Vl-paramdecl-scan-for-ignore
            • Vl-namedarg-scan-for-ignore
            • Vl-modport-scan-for-ignore
            • Vl-maybe-rhs-scan-for-ignore
            • Vl-letdecl-scan-for-ignore
            • Vl-initial-scan-for-ignore
            • Vl-gclkdecl-scan-for-ignore
            • Vl-fwdtypedef-scan-for-ignore
            • Vl-exprdist-scan-for-ignore
            • Vl-elabtask-scan-for-ignore
            • Vl-dpiexport-scan-for-ignore
            • Vl-covergroup-scan-for-ignore
            • Vl-context1-scan-for-ignore
            • Vl-clkassign-scan-for-ignore
            • Vl-assign-scan-for-ignore
            • Vl-arguments-scan-for-ignore
            • Vl-rhs-scan-for-ignore
            • Vl-import-scan-for-ignore
            • Vl-genvar-scan-for-ignore
            • Vl-final-scan-for-ignore
            • Vl-clkskew-scan-for-ignore
            • Vl-bind-scan-for-ignore
            • Vl-always-scan-for-ignore
            • Vl-alias-scan-for-ignore
            • Vl-mash-warning-string
              • Vl-lint-suppress-warnings
              • Vl-warning-type-mash
              • Vl-lint-ignore-att-p
              • Vl-lint-ignore-att-mash
            • Warning-basics
            • Vl-warning
            • Vl-warninglist-add-ctx
            • Vl-warninglist->types
            • Propagating-errors
            • Vl-reportcard
            • Vl-some-warning-fatalp
            • Clean-warnings
            • Lint-whole-file-suppression
            • Warn
            • Vl-warninglist
            • Vl-remove-warnings
            • Vl-keep-warnings
            • Flat-warnings
            • Vl-some-warning-of-type-p
            • Vl-msg
            • Vl-warning-add-ctx
            • Vl-print-warning
            • Vmsg-binary-concat
            • Ok
            • Vl-trace-warnings
            • Fatal
            • Vmsg
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Lint-warning-suppression

    Vl-mash-warning-string

    Do basic string mashing to allow the user to refer to warnings in either upper or lower case, treating - and _ as equivalent, and with or without vl_warn_ prefixes.

    Signature
    (vl-mash-warning-string x) → new-x
    Arguments
    x — Guard (stringp x).
    Returns
    new-x — Type (stringp new-x).

    Definitions and Theorems

    Function: vl-mash-warning-string

    (defun vl-mash-warning-string (x)
      (declare (xargs :guard (stringp x)))
      (let ((__function__ 'vl-mash-warning-string))
        (declare (ignorable __function__))
        (b* ((x (str::upcase-string x))
             (x (str::strsubst "-" "_" x))
             (x (if (str::strprefixp "_" x)
                    (subseq x 1 nil)
                  x))
             (x (if (str::strprefixp "VL_" x)
                    (ec-call (subseq x 3 nil))
                  x))
             (x (if (str::strprefixp "WARN_" x)
                    (ec-call (subseq x 5 nil))
                  x)))
          x)))

    Theorem: stringp-of-vl-mash-warning-string

    (defthm stringp-of-vl-mash-warning-string
      (b* ((new-x (vl-mash-warning-string x)))
        (stringp new-x))
      :rule-classes :type-prescription)

    Theorem: vl-mash-warning-string-of-str-fix-x

    (defthm vl-mash-warning-string-of-str-fix-x
      (equal (vl-mash-warning-string (str-fix x))
             (vl-mash-warning-string x)))

    Theorem: vl-mash-warning-string-streqv-congruence-on-x

    (defthm vl-mash-warning-string-streqv-congruence-on-x
      (implies (streqv x x-equiv)
               (equal (vl-mash-warning-string x)
                      (vl-mash-warning-string x-equiv)))
      :rule-classes :congruence)