• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
            • Vl-lintconfig-p
              • Parse-vl-lintconfig
                • Parse-vl-lintconfig-long
                  • Parse-vl-lintconfig-aux
                  • Parse-vl-lintconfig-bundle
                  • Parse-vl-lintconfig-short->long
                  • Parse-vl-lintconfig-short->long-list
                • Vl-lintconfig
                • *vl-lintconfig-usage*
                • Make-vl-lintconfig
                • Change-vl-lintconfig
                • Honsed-vl-lintconfig
                • Make-honsed-vl-lintconfig
                • Vl-lintconfig->topmods
                • Vl-lintconfig->strict
                • Vl-lintconfig->stmt-limit
                • Vl-lintconfig->start-files
                • Vl-lintconfig->shell
                • Vl-lintconfig->search-path
                • Vl-lintconfig->search-exts
                • Vl-lintconfig->readme
                • Vl-lintconfig->quiet
                • Vl-lintconfig->post-shell
                • Vl-lintconfig->plusargs
                • Vl-lintconfig->no-typo
                • Vl-lintconfig->no-sv-use-set
                • Vl-lintconfig->no-html
                • Vl-lintconfig->mem
                • Vl-lintconfig->include-dirs
                • Vl-lintconfig->ignore-files
                • Vl-lintconfig->ignore
                • Vl-lintconfig->help
                • Vl-lintconfig->global-packages
                • Vl-lintconfig->elab-limit
                • Vl-lintconfig->edition
                • Vl-lintconfig->dropmods
                • Vl-lintconfig->defines
                • Vl-lintconfig->debug
                • Vl-lintconfig->cclimit
              • 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
    • Parse-vl-lintconfig

    Parse-vl-lintconfig-long

    Signature
    (parse-vl-lintconfig-long getopt::longname getopt::explicit-val 
                              args getopt::acc getopt::seen) 
     
      → 
    (mv getopt::errmsg getopt::acc rest)
    Arguments
    getopt::longname — Longname we've just found, e.g., "foo" if we've just seen --foo=bar.
        Guard (stringp getopt::longname).
    getopt::explicit-val — Any explicit value passed to this option, e.g., "bar" if we've just seen --foo=bar, or NIL if we've just seen --foo.
        Guard (or (not getopt::explicit-val) (stringp getopt::explicit-val)).
    args — Remaining arguments past longname.
        Guard (string-listp args).
    getopt::acc — Structure we're updating.
        Guard (vl-lintconfig-p getopt::acc).
    getopt::seen — List of longnames that we've seen so far.
        Guard (string-listp getopt::seen).
    Returns
    getopt::errmsg — NIL on success or an error message.
    getopt::acc — Updated structure.
        Type (vl-lintconfig-p getopt::acc), given (force (vl-lintconfig-p getopt::acc)).
    rest — Rest after this one.
        Type (string-listp rest), given (force (string-listp args)).

    Definitions and Theorems

    Function: parse-vl-lintconfig-long

    (defun parse-vl-lintconfig-long
           (getopt::longname getopt::explicit-val
                             args getopt::acc getopt::seen)
     (declare (xargs :guard (and (stringp getopt::longname)
                                 (or (not getopt::explicit-val)
                                     (stringp getopt::explicit-val))
                                 (string-listp args)
                                 (vl-lintconfig-p getopt::acc)
                                 (string-listp getopt::seen))))
     (let ((__function__ 'parse-vl-lintconfig-long))
      (declare (ignorable __function__))
      (cond
        ((equal getopt::longname "help")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :help value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "readme")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :readme value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "search")
         (b*
           (((mv getopt::err value rest)
             (getopt::parse-string (cat "--" getopt::longname)
                                   getopt::explicit-val args))
            ((when getopt::err)
             (mv getopt::err getopt::acc args))
            (getopt::old-value (vl-lintconfig->search-path getopt::acc))
            (value (acl2::rcons value getopt::old-value))
            (getopt::acc (change-vl-lintconfig getopt::acc
                                               :search-path value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "searchext")
         (b*
           (((mv getopt::err value rest)
             (getopt::parse-string (cat "--" getopt::longname)
                                   getopt::explicit-val args))
            ((when getopt::err)
             (mv getopt::err getopt::acc args))
            (getopt::old-value (vl-lintconfig->search-exts getopt::acc))
            (value (acl2::rcons value getopt::old-value))
            (getopt::acc (change-vl-lintconfig getopt::acc
                                               :search-exts value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "incdir")
         (b*
          (((mv getopt::err value rest)
            (getopt::parse-string (cat "--" getopt::longname)
                                  getopt::explicit-val args))
           ((when getopt::err)
            (mv getopt::err getopt::acc args))
           (getopt::old-value (vl-lintconfig->include-dirs getopt::acc))
           (value (acl2::rcons value getopt::old-value))
           (getopt::acc (change-vl-lintconfig getopt::acc
                                              :include-dirs value)))
          (mv nil getopt::acc rest)))
        ((equal getopt::longname "topmod")
         (b* (((mv getopt::err value rest)
               (getopt::parse-string (cat "--" getopt::longname)
                                     getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::old-value (vl-lintconfig->topmods getopt::acc))
              (value (cons value getopt::old-value))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :topmods value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "quiet")
         (b* (((mv getopt::err value rest)
               (getopt::parse-string (cat "--" getopt::longname)
                                     getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::old-value (vl-lintconfig->quiet getopt::acc))
              (value (cons value getopt::old-value))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :quiet value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "drop")
         (b* (((mv getopt::err value rest)
               (getopt::parse-string (cat "--" getopt::longname)
                                     getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::old-value (vl-lintconfig->dropmods getopt::acc))
              (value (cons value getopt::old-value))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :dropmods value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "ignore")
         (b* (((mv getopt::err value rest)
               (getopt::parse-string (cat "--" getopt::longname)
                                     getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::old-value (vl-lintconfig->ignore getopt::acc))
              (value (cons value getopt::old-value))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :ignore value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "ignore-file")
         (b*
          (((mv getopt::err value rest)
            (getopt::parse-string (cat "--" getopt::longname)
                                  getopt::explicit-val args))
           ((when getopt::err)
            (mv getopt::err getopt::acc args))
           (getopt::old-value (vl-lintconfig->ignore-files getopt::acc))
           (value (cons value getopt::old-value))
           (getopt::acc (change-vl-lintconfig getopt::acc
                                              :ignore-files value)))
          (mv nil getopt::acc rest)))
        ((equal getopt::longname "define")
         (b* (((mv getopt::err value rest)
               (getopt::parse-string (cat "--" getopt::longname)
                                     getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::old-value (vl-lintconfig->defines getopt::acc))
              (value (cons value getopt::old-value))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :defines value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "cclimit")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-nat (cat "--" getopt::longname)
                                  getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :cclimit value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "global-package")
         (b*
           (((mv getopt::err value rest)
             (getopt::parse-string (cat "--" getopt::longname)
                                   getopt::explicit-val args))
            ((when getopt::err)
             (mv getopt::err getopt::acc args))
            (getopt::old-value
                 (vl-lintconfig->global-packages getopt::acc))
            (value (cons value getopt::old-value))
            (getopt::acc (change-vl-lintconfig getopt::acc
                                               :global-packages value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "elab-limit")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-nat (cat "--" getopt::longname)
                                  getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :elab-limit value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "stmt-limit")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-nat (cat "--" getopt::longname)
                                  getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :stmt-limit value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "no-typo")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :no-typo value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "no-html")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :no-html value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "no-sv-use-set")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :no-sv-use-set value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "edition")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (vl-parse-edition (cat "--" getopt::longname)
                                 getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :edition value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "strict")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :strict value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "mem")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-pos (cat "--" getopt::longname)
                                  getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :mem value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "debug")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :debug value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "shell")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :shell value)))
           (mv nil getopt::acc rest)))
        ((equal getopt::longname "post-shell")
         (b* (((when (member-equal getopt::longname getopt::seen))
               (mv (msg "Option --~s0 given multiple times"
                        getopt::longname)
                   getopt::acc args))
              ((mv getopt::err value rest)
               (getopt::parse-plain (cat "--" getopt::longname)
                                    getopt::explicit-val args))
              ((when getopt::err)
               (mv getopt::err getopt::acc args))
              (getopt::acc (change-vl-lintconfig getopt::acc
                                                 :post-shell value)))
           (mv nil getopt::acc rest)))
        (t (mv (msg "Unrecognized option --~s0"
                    getopt::longname)
               getopt::acc args)))))

    Theorem: vl-lintconfig-p-of-parse-vl-lintconfig-long.acc

    (defthm vl-lintconfig-p-of-parse-vl-lintconfig-long.acc
     (implies
      (force (vl-lintconfig-p getopt::acc))
      (b*
       (((mv getopt::?errmsg
             getopt::?acc common-lisp::?rest)
         (parse-vl-lintconfig-long getopt::longname getopt::explicit-val
                                   args getopt::acc getopt::seen)))
       (vl-lintconfig-p getopt::acc)))
     :rule-classes :rewrite)

    Theorem: string-listp-of-parse-vl-lintconfig-long.rest

    (defthm string-listp-of-parse-vl-lintconfig-long.rest
     (implies
      (force (string-listp args))
      (b*
       (((mv getopt::?errmsg
             getopt::?acc common-lisp::?rest)
         (parse-vl-lintconfig-long getopt::longname getopt::explicit-val
                                   args getopt::acc getopt::seen)))
       (string-listp rest)))
     :rule-classes :rewrite)

    Theorem: parse-vl-lintconfig-long-makes-progress

    (defthm parse-vl-lintconfig-long-makes-progress
     (<=
      (len
       (mv-nth
         2
         (parse-vl-lintconfig-long getopt::longname getopt::explicit-val
                                   args getopt::acc getopt::seen)))
      (len args))
     :rule-classes ((:rewrite) (:linear)))