• 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
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
              • Exec
              • Find-fun
              • Init-local
              • Write-vars-values
              • Add-vars-values
              • Add-funs
              • Eoutcome
              • Soutcome
              • Ensure-funscope-disjoint
              • Write-var-value
              • Restrict-vars
              • Add-var-value
              • Funinfo
              • Exec-top-block
              • Values
              • Cstate
                • Cstate-fix
                • Cstatep
                • Cstate-equiv
                • Make-cstate
                • Cstate->local
                • Change-cstate
                • Funinfo+funenv
                • Read-vars-values
                • Read-var-value
                • Funenv
                • Funscope-for-fundefs
                • Exec-path
                • Path-to-var
                • Funinfo+funenv-result
                • Exec-literal
                • Soutcome-result
                • Mode-set-result
                • Literal-evaluation
                • Funscope-result
                • Funinfo-result
                • Funenv-result
                • Eoutcome-result
                • Cstate-result
                • Paths-to-vars
                • Funinfo-for-fundef
                • Lstate
                • Funscope
                • Mode-set
                • Modes
              • Concrete-syntax
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • 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
    • Cstate

    Change-cstate

    Modifying constructor for cstate structures.

    Syntax
    (change-cstate x 
                   [:local <local>]) 
    

    This is an often useful alternative to make-cstate.

    We construct a new cstate 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-cstate

    (defmacro change-cstate (x &rest args)
      (std::change-aggregate 'cstate
                             x args '((:local . cstate->local))
                             'change-cstate
                             'nil))