• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
        • Define
        • Defmapping
        • Defenum
        • Add-io-pairs
        • Defalist
        • Defmapappend
        • Returns-specifiers
        • Defarbrec
        • Defines
        • Define-sk
        • Error-value-tuples
        • Defmax-nat
        • Defmin-int
        • Deftutorial
        • Extended-formals
        • Defrule
        • Defval
        • Defsurj
        • Defiso
        • Defconstrained-recognizer
        • Deffixer
        • Defmvtypes
        • Defconsts
        • Defthm-unsigned-byte-p
        • Support
          • Extract-keywords
          • Dumb-string-sublis
          • Raise
          • Look-up-return-vals
          • Logic-mode-p
          • Look-up-wrapper-args
          • Look-up-formals
          • Legal-kwds-p
          • Split-///
          • Keyword-legality
          • Getarg+
            • Var-is-stobj-p
            • Look-up-guard
            • Getarg
            • Cons-listp
            • Tuplep
            • Tuple-listp
            • Ends-with-period-p
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
        • Theories
        • Rule-classes
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
          • Make-event
          • Defmacro
          • Untranslate-patterns
          • Tc
          • Trans*
          • Macro-aliases-table
          • Macro-args
          • Defabbrev
          • User-defined-functions-table
          • Trans
          • Untranslate-for-execution
          • Add-macro-fn
          • Check-vars-not-free
          • Safe-mode
          • Macro-libraries
            • B*
            • Defunc
            • Fty
            • Apt
            • Std/util
              • Defprojection
              • Deflist
              • Defaggregate
              • Define
              • Defmapping
              • Defenum
              • Add-io-pairs
              • Defalist
              • Defmapappend
              • Returns-specifiers
              • Defarbrec
              • Defines
              • Define-sk
              • Error-value-tuples
              • Defmax-nat
              • Defmin-int
              • Deftutorial
              • Extended-formals
              • Defrule
              • Defval
              • Defsurj
              • Defiso
              • Defconstrained-recognizer
              • Deffixer
              • Defmvtypes
              • Defconsts
              • Defthm-unsigned-byte-p
              • Support
                • Extract-keywords
                • Dumb-string-sublis
                • Raise
                • Look-up-return-vals
                • Logic-mode-p
                • Look-up-wrapper-args
                • Look-up-formals
                • Legal-kwds-p
                • Split-///
                • Keyword-legality
                • Getarg+
                  • Var-is-stobj-p
                  • Look-up-guard
                  • Getarg
                  • Cons-listp
                  • Tuplep
                  • Tuple-listp
                  • Ends-with-period-p
                • Defthm-signed-byte-p
                • Defthm-natp
                • Defund-sk
                • Defmacro+
                • Defsum
                • Defthm-commutative
                • Definj
                • Defirrelevant
                • Defredundant
              • Defdata
              • Defrstobj
              • Seq
              • Match-tree
              • Defrstobj
              • With-supporters
              • Def-partial-measure
              • Template-subst
              • Soft
              • Defthm-domain
              • Event-macros
              • Def-universal-equiv
              • Def-saved-obligs
              • With-supporters-after
              • Definec
              • Sig
              • Outer-local
              • Data-structures
            • Trans1
            • Defmacro-untouchable
            • Set-duplicate-keys-action
            • Add-macro-alias
            • Magic-macroexpand
            • Defmacroq
            • Trans!
            • Remove-macro-fn
            • Remove-macro-alias
            • Add-binop
            • Untrans-table
            • Trans*-
            • Remove-binop
            • Tcp
            • Tca
          • Interfacing-tools
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Support

      Getarg+

      Get a value from the keyword-value alist produced by extract-keywords, with default-value support, and additionally return a flag saying whether the key was bound. Returns (mv value boundp).

      Definitions and Theorems

      Function: getarg+

      (defun getarg+ (arg default alist)
        (declare (xargs :guard (and (eqlablep arg) (alistp alist))))
        (b* ((look (assoc arg alist)))
          (if look (mv (cdr look) t)
            (mv default nil))))