• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
          • Circuits
          • Language
            • Grammar
            • Early-version
              • Abstract-syntax
                • Binary-op
                • Literal
                • Instruction
                  • Instructionp
                  • Instruction-fix
                  • Instruction-case
                  • Instruction-ternary
                  • Instruction-equiv
                  • Instruction-equal
                  • Instruction-commit
                  • Instruction-binary
                    • Make-instruction-binary
                      • Instruction-binary->op
                      • Instruction-binary->into
                      • Instruction-binary->arg2
                      • Instruction-binary->arg1
                      • Change-instruction-binary
                    • Instruction-unary
                    • Instruction-hash
                    • Instruction-cast
                    • Instruction-call
                    • Instruction-assert
                    • Instruction-kind
                  • Hash-op
                  • Literal-type
                  • Operand
                  • Unary-op
                  • Identifier
                  • Commit-op
                  • Mapping
                  • Function
                  • Programdef
                  • Finalize-type
                  • Closure
                  • Register-type
                  • Finalizer
                  • Value-type
                  • Record-type
                  • Command
                  • Plaintext-type
                  • Finalization-option
                  • Visibility
                  • Register
                  • Reference
                  • Programid
                  • Locator
                  • Finalization
                  • Entry-type
                  • Regaccess
                  • Program
                  • Interface-type
                  • Ident+ptype
                  • Ident+etype
                  • Function-output
                  • Finalize-output
                  • Finalize-input
                  • Closure-output
                  • Closure-input
                  • Assert-op
                  • Function-input
                  • Equal-op
                  • Finalize-command
                  • Ternary-op
                  • Import
                  • Ident+ptype-list
                  • Operand-list
                  • Ident+etype-list
                  • Programdef-list
                  • Instruction-list
                  • Import-list
                  • Identifier-list
                  • Function-output-list
                  • Function-input-list
                  • Finalize-output-list
                  • Finalize-input-list
                  • Command-list
                  • Closure-output-list
                  • Closure-input-list
                • Parser
                • Concrete-syntax
              • Concrete-syntax
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Instruction-binary

    Make-instruction-binary

    Basic constructor macro for instruction-binary structures.

    Syntax
    (make-instruction-binary [:op <op>] 
                             [:arg1 <arg1>] 
                             [:arg2 <arg2>] 
                             [:into <into>]) 
    

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

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

    Definition

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

    Macro: make-instruction-binary

    (defmacro make-instruction-binary (&rest args)
      (std::make-aggregate 'instruction-binary
                           args '((:op) (:arg1) (:arg2) (:into))
                           'make-instruction-binary
                           nil))

    Function: instruction-binary

    (defun instruction-binary (op arg1 arg2 into)
      (declare (xargs :guard (and (binary-opp op)
                                  (operandp arg1)
                                  (operandp arg2)
                                  (registerp into))))
      (declare (xargs :guard t))
      (let ((__function__ 'instruction-binary))
        (declare (ignorable __function__))
        (b* ((op (mbe :logic (binary-op-fix op)
                      :exec op))
             (arg1 (mbe :logic (operand-fix arg1)
                        :exec arg1))
             (arg2 (mbe :logic (operand-fix arg2)
                        :exec arg2))
             (into (mbe :logic (register-fix into)
                        :exec into)))
          (cons :binary (list op arg1 arg2 into)))))