• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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-check-syntax

    Check the option list for gross syntax, returning NIL if it's OK, and crashing otherwise.

    The argument option-list is the option list entered by the user. Valid-options is a list of keywords that specifies which options are valid. Duplicate-options is a list of keywords which specifies which options may be duplicated. Mutex-options is an alist of pairs (keyword1 . keyword2) which has the meaning `if keyword1 appears as an option then keyword2 may not appear as an option'.

    Definitions and Theorems

    Function: get-option-check-syntax

    (defun get-option-check-syntax (ctx option-list valid-options
                                        duplicate-options mutex-options)
     (declare (xargs :guard (and (keyword-listp valid-options)
                                 (keyword-listp duplicate-options)
                                 (keyword-pair-alistp mutex-options))))
     (mv-let
           (msg flag)
           (get-option-check-syntax-mv option-list valid-options
                                       duplicate-options mutex-options)
      (declare (ignore flag))
      (if msg (bomb ctx
                    "The keyword option list ~p0 is invalid because ~@1"
                    option-list msg)
        nil)))