• 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
              • Instr
              • Op-funct
                • Op-funct-fix
                • Op-funct-case
                • Op-funct-p
                • Op-funct-equiv
                • Op-funct-kind
                  • Op-funct-xor
                  • Op-funct-sub
                  • Op-funct-srl
                  • Op-funct-sra
                  • Op-funct-sltu
                  • Op-funct-slt
                  • Op-funct-sll
                  • Op-funct-remu
                  • Op-funct-rem
                  • Op-funct-or
                  • Op-funct-mulhu
                  • Op-funct-mulhsu
                  • Op-funct-mulh
                  • Op-funct-mul
                  • Op-funct-divu
                  • Op-funct-div
                  • Op-funct-and
                  • Op-funct-add
                • Op-32-funct
                • Op-imm-funct
                • Load-funct
                • Instr-validp
                • Branch-funct
                • Op-imms-funct
                • Store-funct
                • Op-imms-32-funct
                • Instr-option
                • Op-imm-32-funct
              • Encoding
              • States
              • 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
    • Op-funct

    Op-funct-kind

    Get the kind (tag) of a op-funct structure.

    Signature
    (op-funct-kind x) → kind
    Arguments
    x — Guard (op-funct-p x).

    Definitions and Theorems

    Function: op-funct-kind$inline

    (defun op-funct-kind$inline (x)
      (declare (xargs :guard (op-funct-p x)))
      (let ((__function__ 'op-funct-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :add)) :add)
                          ((eq (car x) :sub) :sub)
                          ((eq (car x) :slt) :slt)
                          ((eq (car x) :sltu) :sltu)
                          ((eq (car x) :and) :and)
                          ((eq (car x) :or) :or)
                          ((eq (car x) :xor) :xor)
                          ((eq (car x) :sll) :sll)
                          ((eq (car x) :srl) :srl)
                          ((eq (car x) :sra) :sra)
                          ((eq (car x) :mul) :mul)
                          ((eq (car x) :mulh) :mulh)
                          ((eq (car x) :mulhu) :mulhu)
                          ((eq (car x) :mulhsu) :mulhsu)
                          ((eq (car x) :div) :div)
                          ((eq (car x) :divu) :divu)
                          ((eq (car x) :rem) :rem)
                          (t :remu))
             :exec (car x))))

    Theorem: op-funct-kind-possibilities

    (defthm op-funct-kind-possibilities
      (or (equal (op-funct-kind x) :add)
          (equal (op-funct-kind x) :sub)
          (equal (op-funct-kind x) :slt)
          (equal (op-funct-kind x) :sltu)
          (equal (op-funct-kind x) :and)
          (equal (op-funct-kind x) :or)
          (equal (op-funct-kind x) :xor)
          (equal (op-funct-kind x) :sll)
          (equal (op-funct-kind x) :srl)
          (equal (op-funct-kind x) :sra)
          (equal (op-funct-kind x) :mul)
          (equal (op-funct-kind x) :mulh)
          (equal (op-funct-kind x) :mulhu)
          (equal (op-funct-kind x) :mulhsu)
          (equal (op-funct-kind x) :div)
          (equal (op-funct-kind x) :divu)
          (equal (op-funct-kind x) :rem)
          (equal (op-funct-kind x) :remu))
      :rule-classes
      ((:forward-chaining :trigger-terms ((op-funct-kind x)))))