• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
          • Vl-lintconfig-p
            • Parse-vl-lintconfig
              • Parse-vl-lintconfig-long
                • Parse-vl-lintconfig-aux
                • Parse-vl-lintconfig-bundle
                • Parse-vl-lintconfig-short->long-list
                • Parse-vl-lintconfig-short->long
              • Vl-lintconfig
              • Make-vl-lintconfig
              • Change-vl-lintconfig
              • Honsed-vl-lintconfig
              • *vl-lintconfig-usage*
              • Make-honsed-vl-lintconfig
              • Vl-lintconfig->topmods
              • Vl-lintconfig->strict
              • Vl-lintconfig->start-files
              • Vl-lintconfig->search-path
              • Vl-lintconfig->search-exts
              • Vl-lintconfig->readme
              • Vl-lintconfig->quiet
              • Vl-lintconfig->mem
              • Vl-lintconfig->include-dirs
              • Vl-lintconfig->ignore
              • Vl-lintconfig->help
              • Vl-lintconfig->edition
              • Vl-lintconfig->dropmods
              • Vl-lintconfig->debug
              • Vl-lintconfig->cclimit
            • Lucid
            • Skip-detection
            • Vl-lintresult-p
            • Lint-warning-suppression
            • Condcheck
            • Selfassigns
            • Leftright-check
            • Dupeinst-check
            • Oddexpr-check
            • Remove-toohard
            • Qmarksize-check
            • Portcheck
            • Duplicate-detect
            • Vl-print-certain-warnings
            • Duperhs-check
            • *vl-lint-help*
            • Lint-stmt-rewrite
            • Drop-missing-submodules
            • Check-case
            • Drop-user-submodules
            • Check-namespace
            • Vl-lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • 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 "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 "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)))
        (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)))