• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
      • 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
        • Deflist
        • Defalist
        • Memory
        • Defstructure
        • Array1
        • Utilities
          • Defloop
          • Get-option
            • Get-option-argument
            • Get-option-member
            • Get-option-check-syntax
            • Get-option-subset
              • Get-option-as-flag
              • Get-option-entries
              • Keyword-option-listp
              • Get-option-entry
              • Get-option-keywords
            • Get-guards-from-body
            • Unique-symbols
            • Pack-intern
            • Pack-string
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Get-option

    Get-option-subset

    Process an option of the form (:OPTION . l), where l must be a SUBSETP of a given set.

    This function checks for an option that is specified as (:OPTION . l), where l must be a proper list and a SUBSETP of the-set. Thus (:OPTION) specifies the empty set, and :OPTION by itself is illegal. If the option is missing then the default value is returned, otherwise the subset l is returned.

    Definitions and Theorems

    Function: get-option-subset

    (defun get-option-subset (ctx option option-list the-set default)
      (declare (xargs :guard (and (keywordp option)
                                  (keyword-option-listp option-list)
                                  (eqlable-listp the-set))))
      (mv-let (msg value)
              (get-option-subset-mv option option-list the-set default)
        (if msg (bomb ctx "~@0" msg) value)))