• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
          • Primitive-functions
          • Translated-terms
          • Values
          • Evaluation
          • Program-equivalence
          • Functions
            • Function
              • Function-fix
              • Function-equiv
              • Make-function
              • Function->params
              • Change-function
                • Function->name
                • Function->body
                • Functionp
              • Function-lookup
              • Function-option
              • Lift-function
              • Lift-function-list
              • Function-set
            • Packages
            • Programs
            • Interpreter
            • Evaluation-states
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Function

    Change-function

    Modifying constructor for function structures.

    Syntax
    (change-function x 
                     [:name <name>] 
                     [:params <params>] 
                     [:body <body>]) 
    

    This is an often useful alternative to make-function.

    We construct a new function structure that is a copy of x, except that you can explicitly change some particular fields. Any fields you don't mention just keep their values from x.

    Definition

    This is an ordinary change- macro introduced by fty::defprod.

    Macro: change-function

    (defmacro change-function (x &rest args)
      (std::change-aggregate 'function
                             x args
                             '((:name . function->name)
                               (:params . function->params)
                               (:body . function->body))
                             'change-function
                             'nil))