• 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
        • Transforms
        • Lint
        • Mlib
        • Server
          • Vls-commands
          • Vl-descriptionlist-summaries
          • Vls-transdb
          • File-layout
          • Vls-data-p
          • Ts-queue
          • Vls-showloc
            • Vls-get-plainsrc
            • Vl-description->warnings
            • Vl-describe
            • Vls-port-table
            • Vls-describe
            • Vls-data-from-translation
            • Vl-find-description-insensitive
            • Vls-get-warnings
            • Vls-get-summary
            • Vls-get-origsrc
            • Vls-data-origname-reportcard
            • Vls-get-parents
            • Vls-get-children
            • Vls-get-summaries
            • Vl-ppc-description
            • Vls-get-desctypes
            • Vl-description-summary
            • Start
            • Vl-descalist->descriptions/types
            • Stop
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Server

    Vls-showloc

    Signature
    (vls-showloc file line col data) → ans
    Arguments
    file — Guard (stringp file).
    line — Guard (stringp line).
    col — Guard (stringp col).
    data — Guard (vls-data-p data).
    Returns
    ans — Type (stringp ans).

    Definitions and Theorems

    Function: vls-showloc

    (defun vls-showloc (file line col data)
     (declare (xargs :guard (and (stringp file)
                                 (stringp line)
                                 (stringp col)
                                 (vls-data-p data))))
     (let ((__function__ 'vls-showloc))
      (declare (ignorable __function__))
      (b* (((vls-data data))
           (line (str::strval line))
           (col (str::strval col))
           ((unless (posp line))
            "Error: Invalid line number")
           ((unless (natp col))
            "Error: Invalid column number")
           (loc (make-vl-location :filename file
                                  :line line
                                  :col col))
           (contents (cdr (hons-assoc-equal file data.filemap)))
           ((unless contents)
            (cat "No filemap binding for " file))
           (desc (vl-find-description-for-loc
                      loc
                      (alist-vals (vls-data->orig-descalist data))))
           ((unless desc)
            (cat "No description found for location ~x0."))
           (min (vl-location->line (vl-description->minloc desc)))
           (max (vl-location->line (vl-description->maxloc desc))))
       (with-local-ps
           (vl-ps-seq (vl-ps-update-htmlp t)
                      (vls-showloc-print contents min max line col))))))

    Theorem: stringp-of-vls-showloc

    (defthm stringp-of-vls-showloc
      (b* ((ans (vls-showloc file line col data)))
        (stringp ans))
      :rule-classes :type-prescription)