• 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
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
          • Vl-load
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
            • Vl-filter-warnings-by-loc
            • Vl-descriptionlist-inject-warnings
            • Vl-description-inject-warnings
            • Vl-description-add-warnings
            • Vl-warning->loc
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Inject-warnings

    Vl-warning->loc

    Return the location of a warning, if it obeys the location convention.

    Signature
    (vl-warning->loc x) → loc?
    Arguments
    x — Guard (vl-warning-p x).
    Returns
    loc? — Type (iff (vl-location-p loc?) loc?).

    Definitions and Theorems

    Function: vl-warning->loc

    (defun vl-warning->loc (x)
      (declare (xargs :guard (vl-warning-p x)))
      (let ((__function__ 'vl-warning->loc))
        (declare (ignorable __function__))
        (b* ((args (vl-warning->args x)))
          (and (consp args)
               (vl-location-p (car args))
               (car args)))))

    Theorem: return-type-of-vl-warning->loc

    (defthm return-type-of-vl-warning->loc
      (b* ((loc? (vl-warning->loc x)))
        (iff (vl-location-p loc?) loc?))
      :rule-classes :rewrite)

    Theorem: vl-warning->loc-of-vl-warning-fix-x

    (defthm vl-warning->loc-of-vl-warning-fix-x
      (equal (vl-warning->loc (vl-warning-fix x))
             (vl-warning->loc x)))

    Theorem: vl-warning->loc-vl-warning-equiv-congruence-on-x

    (defthm vl-warning->loc-vl-warning-equiv-congruence-on-x
      (implies (vl-warning-equiv x x-equiv)
               (equal (vl-warning->loc x)
                      (vl-warning->loc x-equiv)))
      :rule-classes :congruence)