• 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-lintconfig-p
            • Condcheck
            • Lint-warning-suppression
            • Lucid
            • Lvaluecheck
            • Vl-interfacelist-alwaysstyle
            • Truncation-warnings
            • Vl-modulelist-alwaysstyle
            • Skip-detection
            • Vl-lint-report
            • Vl-lintresult
            • Vl::vl-design-sv-use-set
            • Oddexpr-check
            • Leftright-check
            • Duplicate-detect
            • Selfassigns
            • *vl-lint-help*
            • Arith-compare-check
            • Dupeinst-check
            • Qmarksize-check
            • Lint-whole-file-suppression
            • Run-vl-lint-main
            • Logicassign
            • Run-vl-lint
            • Vl-print-certain-warnings
            • Duperhs-check
            • Vl-lint-top
              • Sd-filter-problems
              • Vl-modulelist-add-svbad-warnings
              • Vl-module-add-svbad-warnings
              • Check-case
              • Vl-lint-extra-actions
              • Drop-lint-stubs
              • Vl-lint-print-warnings
              • Drop-user-submodules
              • Check-namespace
              • Vl-lintconfig-loadconfig
              • Vl-lint-design->svex-modalist-wrapper
              • Vl-delete-sd-problems-for-modnames-aux
              • Vl-collect-new-names-from-orignames
              • Vl-lint-print-all-warnings
              • Vl-design-remove-unnecessary-modules
              • Vl-delete-sd-problems-for-modnames
              • Vl-always-check-style
              • Vl-vardecllist-svbad-warnings
              • Vl-vardecl-svbad-warnings
              • Vl-reportcard-remove-suppressed
              • Vl-reportcard-keep-suppressed
              • Vl-alwayslist-check-style
              • Vl-remove-nameless-descriptions
              • Vl-lint-apply-quiet
              • Vl-warninglist-remove-suppressed
              • Vl-warninglist-keep-suppressed
              • Vl-print-eliminated-descs
              • Vl-module-alwaysstyle
              • Vl-jp-reportcard-aux
              • Vl-interface-alwaysstyle
              • Vl-design-alwaysstyle
              • Vl-jp-description-locations
              • Vl-jp-reportcard
              • Vl-pp-stringlist-lines
              • Vl-jp-design-locations
              • Vl-datatype-svbad-p
              • Unpacked-range-check
              • Sd-problem-major-p
              • Vl-alwaysstyle
            • Vl-server
            • Vl-gather
            • Vl-zip
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-lint

    Vl-lint-top

    Top-level vl lint command.

    Signature
    (vl-lint-top args &key (state 'state)) → state
    Arguments
    args — Guard (string-listp args).

    Definitions and Theorems

    Function: vl-lint-top-fn

    (defun vl-lint-top-fn (args state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (string-listp args)))
     (let ((__function__ 'vl-lint-top))
      (declare (ignorable __function__))
      (b*
       (((mv errmsg config start-files-and-plusargs)
         (parse-vl-lintconfig args))
        ((when errmsg)
         (die "~@0~%" errmsg)
         state)
        ((mv start-files plusargs)
         (split-plusargs start-files-and-plusargs))
        (config (change-vl-lintconfig config
                                      :plusargs plusargs
                                      :start-files start-files))
        ((vl-lintconfig config) config)
        (- (set-max-mem (* (expt 2 30) config.mem)))
        (- (set-vl-gc-threshold (floor (* 6 (expt 2 30) config.mem)
                                       10)))
        (- (set-vl-gc-baseline))
        ((when config.help)
         (vl-cw-ps-seq (vl-print *vl-lint-help*))
         (exit-ok)
         state)
        ((when config.readme)
         (vl-cw-ps-seq (vl-print *vl-lint-readme*))
         (exit-ok)
         state)
        (- (or (not config.debug)
               (vl-cw-ps-seq (vl-cw "Raw args: ~x0~%" args)
                             (vl-cw "Start-files: ~x0~%" start-files))))
        ((unless (consp config.start-files))
         (die "No files to process.")
         state)
        (state (must-be-regular-files! config.start-files))
        (state (must-be-directories! config.search-path))
        (state (must-be-directories! config.include-dirs))
        ((when config.shell)
         (vl-shell-entry
              (cons (cons 'defconst
                          (cons '*vl-user-lintconfig*
                                (cons (cons 'quote (cons config 'nil))
                                      'nil)))
                    'nil)))
        ((mv result loadres loadconfig state)
         (cwtime (run-vl-lint config)
                 :name vl-lint))
        (state (cwtime (vl-lint-report config loadres result state)))
        ((when config.post-shell)
         (b* ((print (and (boundp-global 'ld-pre-eval-print state)
                          (f-get-global 'ld-pre-eval-print
                                        state))))
          (vl-shell-entry
           (cons
            '(set-ld-pre-eval-print nil state)
            (cons
             (cons 'defconst
                   (cons '*vl-user-lintconfig*
                         (cons (cons 'quote (cons config 'nil))
                               'nil)))
             (cons
              (cons 'defconst
                    (cons '*vl-user-loadconfig*
                          (cons (cons 'quote (cons loadconfig 'nil))
                                'nil)))
              (cons
               (cons 'defconst
                     (cons '*vl-user-loadres*
                           (cons (cons 'quote (cons loadres 'nil))
                                 'nil)))
               (cons
                '(defconst *vl-user-design*
                   (vl-loadresult->design *vl-user-loadres*))
                (cons (cons 'defconst
                            (cons '*vl-user-lintresult*
                                  (cons (cons 'quote (cons result 'nil))
                                        'nil)))
                      (cons (cons 'set-ld-pre-eval-print
                                  (cons (cons 'quote (cons print 'nil))
                                        '(state)))
                            'nil)))))))))))
       (exit-ok)
       state)))