• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-find-file
          • Vl-read-files
          • Extended-characters
            • Vl-echar-p
            • Vl-location
              • Vl-location-p
              • Vl-location-fix
              • Vl-string-between-locs
              • Vl-location-between-p
              • Vl-string-findloc
              • Vl-location-equiv
              • Make-vl-location
              • Vl-location-string
                • Vl-location->filename
                • Vl-location->line
                • Change-vl-location
                • Vl-location->col
                • *vl-fakeloc*
              • Vl-echarlist->chars
              • Vl-echarlist-from-chars
              • Vl-echarlist-from-str
              • Vl-echarlist-unsigned-value
              • Vl-change-echarlist-locations
              • Vl-echar-digit-value
              • Vl-echarlist->string
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-location

    Vl-location-string

    Convert an vl-location-p into a string.

    Signature
    (vl-location-string loc) → str
    Arguments
    loc — Guard (vl-location-p loc).
    Returns
    str — Type (stringp str).

    (vl-location-string loc) is often useful in generating warning or error messages. It converts a vl-location-p object into a string of the form filename:line:col.

    Definitions and Theorems

    Function: vl-location-string

    (defun vl-location-string (loc)
      (declare (xargs :guard (vl-location-p loc)))
      (let ((__function__ 'vl-location-string))
        (declare (ignorable __function__))
        (cat (vl-location->filename loc)
             ":" (natstr (vl-location->line loc))
             ":" (natstr (vl-location->col loc)))))

    Theorem: stringp-of-vl-location-string

    (defthm stringp-of-vl-location-string
      (b* ((str (vl-location-string loc)))
        (stringp str))
      :rule-classes :type-prescription)

    Theorem: vl-location-string-of-vl-location-fix-loc

    (defthm vl-location-string-of-vl-location-fix-loc
      (equal (vl-location-string (vl-location-fix loc))
             (vl-location-string loc)))

    Theorem: vl-location-string-vl-location-equiv-congruence-on-loc

    (defthm vl-location-string-vl-location-equiv-congruence-on-loc
      (implies (vl-location-equiv loc loc-equiv)
               (equal (vl-location-string loc)
                      (vl-location-string loc-equiv)))
      :rule-classes :congruence)