• 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
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
          • Instr
            • Instrp
            • Instr-fix
            • Instr-case
            • Instr-store
            • Instr-op-imms64
            • Instr-op-imms32
            • Instr-op-imms-32
            • Instr-op-imm-32
            • Instr-op-imm
            • Instr-op-32
            • Instr-op
            • Instr-load
            • Instr-branch
            • Instr-equiv
            • Instr-jalr
            • Instr-lui
            • Instr-jal
            • Instr-auipc
            • Instr-kind
            • Op-funct
            • Op-32-funct
            • Op-imm-funct
            • Load-funct
            • Branch-funct
            • Op-imms-funct
            • Store-funct
            • Op-imms-32-funct
            • Instr-validp
            • Instr-option
            • Op-imm-32-funct
          • States
          • Decoding
          • Encoding
          • Features
          • Semantics
          • Execution
        • 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
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Instr

    Instr-kind

    Get the kind (tag) of a instr structure.

    Signature
    (instr-kind x) → kind
    Arguments
    x — Guard (instrp x).

    Definitions and Theorems

    Function: instr-kind$inline

    (defun instr-kind$inline (x)
      (declare (xargs :guard (instrp x)))
      (let ((__function__ 'instr-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :op-imm))
                           :op-imm)
                          ((eq (car x) :op-imms32) :op-imms32)
                          ((eq (car x) :op-imms64) :op-imms64)
                          ((eq (car x) :op-imm-32) :op-imm-32)
                          ((eq (car x) :op-imms-32) :op-imms-32)
                          ((eq (car x) :lui) :lui)
                          ((eq (car x) :auipc) :auipc)
                          ((eq (car x) :op) :op)
                          ((eq (car x) :op-32) :op-32)
                          ((eq (car x) :jal) :jal)
                          ((eq (car x) :jalr) :jalr)
                          ((eq (car x) :branch) :branch)
                          ((eq (car x) :load) :load)
                          (t :store))
             :exec (car x))))

    Theorem: instr-kind-possibilities

    (defthm instr-kind-possibilities
      (or (equal (instr-kind x) :op-imm)
          (equal (instr-kind x) :op-imms32)
          (equal (instr-kind x) :op-imms64)
          (equal (instr-kind x) :op-imm-32)
          (equal (instr-kind x) :op-imms-32)
          (equal (instr-kind x) :lui)
          (equal (instr-kind x) :auipc)
          (equal (instr-kind x) :op)
          (equal (instr-kind x) :op-32)
          (equal (instr-kind x) :jal)
          (equal (instr-kind x) :jalr)
          (equal (instr-kind x) :branch)
          (equal (instr-kind x) :load)
          (equal (instr-kind x) :store))
      :rule-classes
      ((:forward-chaining :trigger-terms ((instr-kind x)))))