• 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
      • Riscv
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                  • Asgop
                    • Asgop-case
                    • Asgop-fix
                    • Asgopp
                    • Asgop-equiv
                    • Asgop-kind
                      • Asgop-asg-sub
                      • Asgop-asg-shr
                      • Asgop-asg-shl
                      • Asgop-asg-rem
                      • Asgop-asg-pow
                      • Asgop-asg-or
                      • Asgop-asg-mul
                      • Asgop-asg-div
                      • Asgop-asg-bitxor
                      • Asgop-asg-bitior
                      • Asgop-asg-bitand
                      • Asgop-asg-and
                      • Asgop-asg-add
                      • Asgop-asg
                    • Constdecl
                    • Console
                    • Vardecl
                    • Vardecl-result
                    • Statement-result
                    • Statement-list-result
                    • Constdecl-result
                    • Console-result
                    • Branch-result
                    • Branch-list-result
                    • Asgop-result
                    • Asgop-to-binop
                    • Statement-fixtypes
                  • Format-strings
                  • Input-syntax-abstraction
                  • Expressions
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • 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
    • Asgop

    Asgop-kind

    Get the kind (tag) of a asgop structure.

    Signature
    (asgop-kind x) → kind
    Arguments
    x — Guard (asgopp x).

    Definitions and Theorems

    Function: asgop-kind$inline

    (defun asgop-kind$inline (x)
      (declare (xargs :guard (asgopp x)))
      (let ((__function__ 'asgop-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :asg)) :asg)
                          ((eq (car x) :asg-add) :asg-add)
                          ((eq (car x) :asg-sub) :asg-sub)
                          ((eq (car x) :asg-mul) :asg-mul)
                          ((eq (car x) :asg-div) :asg-div)
                          ((eq (car x) :asg-rem) :asg-rem)
                          ((eq (car x) :asg-pow) :asg-pow)
                          ((eq (car x) :asg-shl) :asg-shl)
                          ((eq (car x) :asg-shr) :asg-shr)
                          ((eq (car x) :asg-bitand) :asg-bitand)
                          ((eq (car x) :asg-bitior) :asg-bitior)
                          ((eq (car x) :asg-bitxor) :asg-bitxor)
                          ((eq (car x) :asg-and) :asg-and)
                          (t :asg-or))
             :exec (car x))))

    Theorem: asgop-kind-possibilities

    (defthm asgop-kind-possibilities
      (or (equal (asgop-kind x) :asg)
          (equal (asgop-kind x) :asg-add)
          (equal (asgop-kind x) :asg-sub)
          (equal (asgop-kind x) :asg-mul)
          (equal (asgop-kind x) :asg-div)
          (equal (asgop-kind x) :asg-rem)
          (equal (asgop-kind x) :asg-pow)
          (equal (asgop-kind x) :asg-shl)
          (equal (asgop-kind x) :asg-shr)
          (equal (asgop-kind x) :asg-bitand)
          (equal (asgop-kind x) :asg-bitior)
          (equal (asgop-kind x) :asg-bitxor)
          (equal (asgop-kind x) :asg-and)
          (equal (asgop-kind x) :asg-or))
      :rule-classes
      ((:forward-chaining :trigger-terms ((asgop-kind x)))))