• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Riscv
        • Semantics
        • Instructions
        • States
        • Decoding
        • Encoding
        • Features
        • Rv32im
          • Semantics32
          • States32
            • Write32-xreg
            • Xregfile32
            • Write32-mem-ubyte16-lendian
            • State32
              • State32p
              • State32-fix
              • State32-equiv
              • Make-state32
                • State32->xregfile
                • Change-state32
                • State32->error
                • State32->pc
                • State32->mem
              • Memory32
              • Write32-mem-ubyte32-lendian
              • Write32-pc
              • Write32-mem-ubyte8
              • Read32-mem-ubyte16-lendian
              • Read32-xreg-unsigned
              • Read32-mem-ubyte8
              • Read32-mem-ubyte32-lendian
              • Read32-xreg-signed
              • Inc32-pc
              • Read32-pc
              • Error32p
              • Error32
              • *mem32-size*
            • Execution32
          • Rv64im
          • Execution
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Community
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • State32

    Make-state32

    Basic constructor macro for state32 structures.

    Syntax
    (make-state32 [:xregfile <xregfile>] 
                  [:pc <pc>] 
                  [:mem <mem>] 
                  [:error <error>]) 
    

    This is the usual way to construct state32 structures. It simply conses together a structure with the specified fields.

    This macro generates a new state32 structure from scratch. See also change-state32, which can "change" an existing structure, instead.

    Definition

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

    Macro: make-state32

    (defmacro make-state32 (&rest args)
      (std::make-aggregate 'state32
                           args
                           '((:xregfile) (:pc) (:mem) (:error))
                           'make-state32
                           nil))

    Function: state32

    (defun state32 (xregfile pc mem error)
      (declare (xargs :guard (and (xregfile32p xregfile)
                                  (ubyte32p pc)
                                  (memory32p mem)
                                  (booleanp error))))
      (declare (xargs :guard t))
      (let ((__function__ 'state32))
        (declare (ignorable __function__))
        (b* ((xregfile (mbe :logic (xregfile32-fix xregfile)
                            :exec xregfile))
             (pc (mbe :logic (ubyte32-fix pc) :exec pc))
             (mem (mbe :logic (memory32-fix mem)
                       :exec mem))
             (error (mbe :logic (acl2::bool-fix error)
                         :exec error)))
          (cons :state32 (list xregfile pc mem error)))))