• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
        • Symbolic-test-vectors
          • Defstv
          • Stv-compile
          • Symbolic-test-vector-format
          • Stv-implementation-details
          • Compiled-stv-p
          • Stv-run-for-all-dontcares
          • Stv-run
          • Stv-process
          • Stv-run-check-dontcares
          • Symbolic-test-vector-composition
          • Stv-expand
          • Stv-easy-bindings
          • Stv-debug
          • Stv-run-squash-dontcares
          • Stvdata-p
          • Stv-doc
          • Stv2c
            • Stv2c-opts-p
              • Parse-stv2c-opts
                • Parse-stv2c-opts-long
                • Parse-stv2c-opts-aux
                • Parse-stv2c-opts-bundle
                  • Parse-stv2c-opts-short->long-list
                  • Parse-stv2c-opts-short->long
                • Stv2c-opts
                • Make-stv2c-opts
                • Change-stv2c-opts
                • Honsed-stv2c-opts
                • Make-honsed-stv2c-opts
                • *stv2c-opts-usage*
                • Stv2c-opts->stv
                • Stv2c-opts->strict
                • Stv2c-opts->start-files
                • Stv2c-opts->search-path
                • Stv2c-opts->search-exts
                • Stv2c-opts->readme
                • Stv2c-opts->mem
                • Stv2c-opts->help
                • Stv2c-opts->edition
                • Stv2c-opts->defines
              • Stv2c-c-symbol-names
              • Stv2c-outs-structdef
              • Stv2c-ins-structdef
              • Stv2c-c-symbol-name
              • Stv2c-header
              • Stv2c-main
            • Stv-widen
            • Stv-out->width
            • Stv-in->width
            • Stv-number-of-phases
            • Stv->outs
            • Stv->ins
            • Stv-suffix-signals
            • Stv->vars
          • Esim-primitives
          • E-conversion
          • Esim-steps
          • Patterns
          • Mod-internal-paths
          • Defmodules
          • Esim-simplify-update-fns
          • Esim-tutorial
          • Esim-vl
        • Vl2014
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Parse-stv2c-opts

    Parse-stv2c-opts-bundle

    Signature
    (parse-stv2c-opts-bundle getopt::longnames 
                             args getopt::acc getopt::seen) 
     
      → 
    (mv getopt::errmsg getopt::acc getopt::seen rest)
    Arguments
    getopt::longnames — The already-expanded out names of the bundled options, with no dashes.
        Guard (string-listp getopt::longnames).
    args — Remaining arguments past longname.
        Guard (string-listp args).
    getopt::acc — Structure we're updating.
        Guard (stv2c-opts-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 — Type (stv2c-opts-p getopt::acc), given (force (stv2c-opts-p getopt::acc)).
    getopt::seen — Type (string-listp getopt::seen), given (and (force (string-listp getopt::longnames)) (force (string-listp getopt::seen))) .
    rest — Type (string-listp rest), given (force (string-listp args)).

    Definitions and Theorems

    Function: parse-stv2c-opts-bundle

    (defun parse-stv2c-opts-bundle
           (getopt::longnames args getopt::acc getopt::seen)
      (declare (xargs :guard (and (string-listp getopt::longnames)
                                  (string-listp args)
                                  (stv2c-opts-p getopt::acc)
                                  (string-listp getopt::seen))))
      (let ((__function__ 'parse-stv2c-opts-bundle))
        (declare (ignorable __function__))
        (b* (((when (atom getopt::longnames))
              (mv nil getopt::acc getopt::seen args))
             ((mv getopt::err getopt::acc rest)
              (parse-stv2c-opts-long (car getopt::longnames)
                                     nil args getopt::acc getopt::seen))
             ((when getopt::err)
              (mv getopt::err
                  getopt::acc getopt::seen rest))
             (getopt::seen (cons (car getopt::longnames)
                                 getopt::seen)))
          (parse-stv2c-opts-bundle (cdr getopt::longnames)
                                   rest getopt::acc getopt::seen))))

    Theorem: stv2c-opts-p-of-parse-stv2c-opts-bundle.acc

    (defthm stv2c-opts-p-of-parse-stv2c-opts-bundle.acc
     (implies
         (force (stv2c-opts-p getopt::acc))
         (b* (((mv getopt::?errmsg getopt::?acc
                   getopt::?seen common-lisp::?rest)
               (parse-stv2c-opts-bundle getopt::longnames
                                        args getopt::acc getopt::seen)))
           (stv2c-opts-p getopt::acc)))
     :rule-classes :rewrite)

    Theorem: string-listp-of-parse-stv2c-opts-bundle.seen

    (defthm string-listp-of-parse-stv2c-opts-bundle.seen
     (implies
         (and (force (string-listp getopt::longnames))
              (force (string-listp getopt::seen)))
         (b* (((mv getopt::?errmsg getopt::?acc
                   getopt::?seen common-lisp::?rest)
               (parse-stv2c-opts-bundle getopt::longnames
                                        args getopt::acc getopt::seen)))
           (string-listp getopt::seen)))
     :rule-classes :rewrite)

    Theorem: string-listp-of-parse-stv2c-opts-bundle.rest

    (defthm string-listp-of-parse-stv2c-opts-bundle.rest
     (implies
         (force (string-listp args))
         (b* (((mv getopt::?errmsg getopt::?acc
                   getopt::?seen common-lisp::?rest)
               (parse-stv2c-opts-bundle getopt::longnames
                                        args getopt::acc getopt::seen)))
           (string-listp rest)))
     :rule-classes :rewrite)

    Theorem: parse-stv2c-opts-bundle-makes-progress

    (defthm parse-stv2c-opts-bundle-makes-progress
     (<=
      (len
       (mv-nth 3
               (parse-stv2c-opts-bundle getopt::longnames
                                        args getopt::acc getopt::seen)))
      (len args))
     :rule-classes ((:rewrite) (:linear)))