• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
          • Semantics
          • Abstract-syntax
            • Aexp
            • Bexp
            • Comm
              • Comm-case
              • Comm-if
              • Comm-equiv
              • Comm-while
              • Comm-asg
              • Commp
              • Comm-kind
                • Comm-fix
                • Comm-count
              • Comm-list
              • Command-fixtypes
            • Interpreter
          • Event-macros
          • Java
          • 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
    • Comm

    Comm-kind

    Get the kind (tag) of a comm structure.

    Signature
    (comm-kind x) → kind
    Arguments
    x — Guard (commp x).

    Definitions and Theorems

    Function: comm-kind$inline

    (defun comm-kind$inline (x)
      (declare (xargs :guard (commp x)))
      (let ((__function__ 'comm-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :asg)) :asg)
                          ((eq (car x) :if) :if)
                          (t :while))
             :exec (car x))))

    Theorem: comm-kind-possibilities

    (defthm comm-kind-possibilities
     (or (equal (comm-kind x) :asg)
         (equal (comm-kind x) :if)
         (equal (comm-kind x) :while))
     :rule-classes ((:forward-chaining :trigger-terms ((comm-kind x)))))