• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
          • Simplify-defun
          • Isodata
          • Tailrec
          • Schemalg
          • Expdata
          • Restrict
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
          • Solve
          • Wrap-output
          • Propagate-iso
          • Simplify
          • Finite-difference
          • Drop-irrelevant-params
          • Copy-function
          • Rename-params
          • Utilities
            • Defaults-table
              • Set-default-input-wrapper-to-old-name
              • Set-default-input-old-to-wrapper-name
              • Set-default-input-old-to-new-name
              • Set-default-input-new-to-old-name
              • Set-default-input-old-if-new-name
              • Set-default-input-wrapper-to-old-enable
              • Set-default-input-old-to-wrapper-enable
                • Set-default-input-old-to-new-enable
                • Set-default-input-new-to-old-enable
                • Set-default-input-wrapper-enable
                • Set-default-input-old-if-new-enable
                • Get-default-input-wrapper-to-old-name
                • Get-default-input-wrapper-to-old-enable
                • Get-default-input-old-to-wrapper-name
                • Get-default-input-old-to-wrapper-enable
                • Get-default-input-old-to-new-name
                • Get-default-input-old-to-new-enable
                • Get-default-input-old-if-new-name
                • Get-default-input-old-if-new-enable
                • Get-default-input-new-to-old-name
                • Get-default-input-new-to-old-enable
                • Get-default-input-wrapper-enable
                • *defaults-table-name*
              • Xdoc::apt-constructors
              • Input-processors
              • Transformation-table
              • Find-base-cases
              • Untranslate-specifier-utilities
              • Print-specifier-utilities
              • Hints-specifier-utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Abnf
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Prime-field-constraint-systems
          • Soft
          • Bv
          • Imp-language
          • Event-macros
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Axe
          • Solidity
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Testing-utilities
      • Math
    • Defaults-table

    Set-default-input-old-to-wrapper-enable

    Set the default :old-to-wrapper-enable input of APT transformations.

    Some APT transformations include an :old-to-wrapper-enable input that specifies whether to enable the generated theorem that rewrites (a term involving) a call of the old function to (a term involving) a call of the wrapper function. This theorem is generated, and this input is allowed, only when the wrapper is generated.

    This macro sets an entry in the APT defaults table that provides the default value of the :old-to-wrapper-enable input. It must be a boolean. It cannot be t if the default :wrapper-to-old-enable is currently t.

    The initial value of this default is nil.

    Macro: set-default-input-old-to-wrapper-enable

    (defmacro set-default-input-old-to-wrapper-enable (bool)
      (declare (xargs :guard (booleanp bool)))
      (b* ((ctx (cons 'set-default-input-old-to-wrapper-enable
                      bool)))
        (cons 'make-event-terse
              (cons (cons 'set-default-input-old-to-wrapper-enable-fn
                          (cons bool
                                (cons (cons 'quote (cons ctx 'nil))
                                      '(state))))
                    'nil))))

    Definitions and Theorems

    Function: set-default-input-old-to-wrapper-enable-fn

    (defun set-default-input-old-to-wrapper-enable-fn (bool ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (booleanp bool)))
     (let ((__function__ 'set-default-input-old-to-wrapper-enable-fn))
      (declare (ignorable __function__))
      (b* ((table (table-alist+ *defaults-table-name* (w state))
    )
           (pair (assoc-eq :wrapper-to-old-enable table)))
       (if
        (and (consp pair) (cdr pair) bool)
        (er-soft+
         ctx t nil
         "Since the :WRAPPER-TO-OLD-ENABLE default is T, ~
                         the :OLD-TO-WRAPPER-ENABLE default cannot be set to T. ~
                         At most one of these two defaults may be T at any time.")
        (value (cons 'table
                     (cons *defaults-table-name*
                           (cons ':old-to-wrapper-enable
                                 (cons bool 'nil)))))))))