• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • Riscv
          • Specification
            • Semantics
            • Features
            • Instructions
            • Encoding
            • States
              • Stat
                • Statp
                • Stat-fix
                • Stat-equiv
                • Make-stat
                • Change-stat
                  • Stat->memory
                  • Stat->error
                  • Stat->xregs
                  • Stat->pc
                • Stat-validp
                • Read-instruction
                • Write-memory-unsigned64
                • Write-memory-unsigned32
                • Write-memory-unsigned8
                • Write-memory-unsigned16
                • Write-xreg-32
                • Read-xreg-unsigned
                • Write-xreg
                • Read-memory-unsigned64
                • Read-memory-unsigned8
                • Read-memory-unsigned32
                • Read-xreg-signed
                • Read-memory-unsigned16
                • Read-xreg-unsigned32
                • Write-pc
                • Read-xreg-signed32
                • Inc4-pc
                • Read-pc
                • Errorp
                • Error
              • Reads-over-writes
              • Semantics-equivalences
              • Decoding
              • Execution
            • Executable
            • Specialized
            • Optimized
          • Bitcoin
          • Ethereum
          • Yul
          • 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
    • Stat

    Change-stat

    Modifying constructor for stat structures.

    Syntax
    (change-stat x 
                 [:xregs <xregs>] 
                 [:pc <pc>] 
                 [:memory <memory>] 
                 [:error <error>]) 
    

    This is an often useful alternative to make-stat.

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

    (defmacro change-stat (x &rest args)
      (std::change-aggregate 'stat
                             x args
                             '((:xregs . stat->xregs)
                               (:pc . stat->pc)
                               (:memory . stat->memory)
                               (:error . stat->error))
                             'change-stat
                             'nil))