• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
              • Binop
              • Fileset
              • Obj-declor
              • Ident
              • Iconst
              • Obj-adeclor
              • Abstract-syntax-operations
              • Const
              • Fundef
              • Unop
              • File
              • Tag-declon
              • Fun-declor
              • Obj-declon
              • Iconst-length
              • Label
              • Struct-declon
              • Initer
              • Ext-declon
              • Fun-adeclor
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
              • Param-declon
              • Obj-declon-option
              • File-option
              • Tyname
              • Transunit
              • Fun-declon
              • Transunit-result
              • Param-declon-list
              • Struct-declon-list
              • Expr-list
              • Tyspecseq-list
              • Ident-set
              • Ident-list
              • Ext-declon-list
              • Unop-list
              • Tyname-list
              • Fundef-list
              • Fun-declon-list
              • Binop-list
              • Stmt-fixtypes
                • Stmt
                  • Stmtp
                  • Stmt-case
                  • Stmt-for
                  • Stmt-equiv
                  • Stmt-ifelse
                  • Stmt-while
                  • Stmt-switch
                  • Stmt-labeled
                  • Stmt-if
                  • Stmt-dowhile
                  • Stmt-kind
                    • Stmt-return
                    • Stmt-goto
                    • Stmt-compound
                    • Stmt-expr
                    • Stmt-null
                    • Stmt-continue
                    • Stmt-break
                    • Stmt-fix
                    • Stmt-count
                  • Block-item
                  • Block-item-list
                • Expr-fixtypes
              • Integer-ranges
              • Implementation-environments
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Integer-formats
              • Types
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Computation-states
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • 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
    • Stmt

    Stmt-kind

    Get the kind (tag) of a stmt structure.

    Signature
    (stmt-kind x) → kind
    Arguments
    x — Guard (stmtp x).

    Definitions and Theorems

    Function: stmt-kind$inline

    (defun stmt-kind$inline (x)
      (declare (xargs :guard (stmtp x)))
      (let ((__function__ 'stmt-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((eq (car x) :labeled) :labeled)
                          ((eq (car x) :compound) :compound)
                          ((or (atom x) (eq (car x) :expr)) :expr)
                          ((eq (car x) :null) :null)
                          ((eq (car x) :if) :if)
                          ((eq (car x) :ifelse) :ifelse)
                          ((eq (car x) :switch) :switch)
                          ((eq (car x) :while) :while)
                          ((eq (car x) :dowhile) :dowhile)
                          ((eq (car x) :for) :for)
                          ((eq (car x) :goto) :goto)
                          ((eq (car x) :continue) :continue)
                          ((eq (car x) :break) :break)
                          (t :return))
             :exec (car x))))

    Theorem: stmt-kind-possibilities

    (defthm stmt-kind-possibilities
     (or (equal (stmt-kind x) :labeled)
         (equal (stmt-kind x) :compound)
         (equal (stmt-kind x) :expr)
         (equal (stmt-kind x) :null)
         (equal (stmt-kind x) :if)
         (equal (stmt-kind x) :ifelse)
         (equal (stmt-kind x) :switch)
         (equal (stmt-kind x) :while)
         (equal (stmt-kind x) :dowhile)
         (equal (stmt-kind x) :for)
         (equal (stmt-kind x) :goto)
         (equal (stmt-kind x) :continue)
         (equal (stmt-kind x) :break)
         (equal (stmt-kind x) :return))
     :rule-classes ((:forward-chaining :trigger-terms ((stmt-kind x)))))