• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
          • Vl-server
            • Vls-scannedalist-p
            • Vls-loadedalist-p
            • Vls-commands
            • Vls-data-p
            • Vl-server-opts-p
            • Vl-descriptionlist-summaries
            • Vls-transdb
            • Vl-describe
            • Ts-queue
            • Vls-get-plainsrc
            • Vl-description->warnings
            • Vls-showloc
              • File-layout
              • Vls-remove-from-scannedalist
              • Vls-describe
              • Vl-server-top
              • Vls-port-table
              • Vl-find-description-insensitive
              • Vls-get-warnings
              • Vls-get-summary
              • Vls-get-origsrc
              • Vl-ppc-description
              • Vls-get-parents
              • Vls-get-children
              • Vls-data-origname-reportcard
              • Vls-data-from-zip
              • Start
              • Vls-make-scannedalist
              • Vls-get-summaries
              • Vls-get-unloaded-json
              • Vls-get-desctypes
              • Vls-scannedalist-to-json
              • Vls-loadedalist-to-json
              • Vl-description-summary
              • *vl-server-help*
              • Vl-descalist->descriptions/types
              • Stop
            • Vl-gather
            • Vl-zip
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-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)