• 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
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
              • Tyspecseq
                • Tyspecseqp
                • Tyspecseq-fix
                • Tyspecseq-case
                • Tyspecseq-equiv
                • Tyspecseq-sint
                • Tyspecseq-kind
                  • Tyspecseq-sshort
                  • Tyspecseq-slong
                  • Tyspecseq-sllong
                  • Tyspecseq-ushort
                  • Tyspecseq-union
                  • Tyspecseq-ulong
                  • Tyspecseq-ullong
                  • Tyspecseq-uint
                  • Tyspecseq-typedef
                  • Tyspecseq-struct
                  • Tyspecseq-ldouble
                  • Tyspecseq-float
                  • Tyspecseq-enum
                  • Tyspecseq-double
                  • Tyspecseq-void
                  • Tyspecseq-uchar
                  • Tyspecseq-schar
                  • Tyspecseq-char
                  • Tyspecseq-bool
                • Expr
                • Binop
                • Fileset
                • Obj-declor
                • Ident
                • Iconst
                • Obj-adeclor
                • Const
                • Fundef
                • Unop
                • File
                • Tag-declon
                • Fun-declor
                • Obj-declon
                • Iconst-length
                • Abstract-syntax-operations
                • 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
                • 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
    • Tyspecseq

    Tyspecseq-kind

    Get the kind (tag) of a tyspecseq structure.

    Signature
    (tyspecseq-kind x) → kind
    Arguments
    x — Guard (tyspecseqp x).

    Definitions and Theorems

    Function: tyspecseq-kind$inline

    (defun tyspecseq-kind$inline (x)
      (declare (xargs :guard (tyspecseqp x)))
      (let ((__function__ 'tyspecseq-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :void)) :void)
                          ((eq (car x) :char) :char)
                          ((eq (car x) :schar) :schar)
                          ((eq (car x) :uchar) :uchar)
                          ((eq (car x) :sshort) :sshort)
                          ((eq (car x) :ushort) :ushort)
                          ((eq (car x) :sint) :sint)
                          ((eq (car x) :uint) :uint)
                          ((eq (car x) :slong) :slong)
                          ((eq (car x) :ulong) :ulong)
                          ((eq (car x) :sllong) :sllong)
                          ((eq (car x) :ullong) :ullong)
                          ((eq (car x) :bool) :bool)
                          ((eq (car x) :float) :float)
                          ((eq (car x) :double) :double)
                          ((eq (car x) :ldouble) :ldouble)
                          ((eq (car x) :struct) :struct)
                          ((eq (car x) :union) :union)
                          ((eq (car x) :enum) :enum)
                          (t :typedef))
             :exec (car x))))

    Theorem: tyspecseq-kind-possibilities

    (defthm tyspecseq-kind-possibilities
      (or (equal (tyspecseq-kind x) :void)
          (equal (tyspecseq-kind x) :char)
          (equal (tyspecseq-kind x) :schar)
          (equal (tyspecseq-kind x) :uchar)
          (equal (tyspecseq-kind x) :sshort)
          (equal (tyspecseq-kind x) :ushort)
          (equal (tyspecseq-kind x) :sint)
          (equal (tyspecseq-kind x) :uint)
          (equal (tyspecseq-kind x) :slong)
          (equal (tyspecseq-kind x) :ulong)
          (equal (tyspecseq-kind x) :sllong)
          (equal (tyspecseq-kind x) :ullong)
          (equal (tyspecseq-kind x) :bool)
          (equal (tyspecseq-kind x) :float)
          (equal (tyspecseq-kind x) :double)
          (equal (tyspecseq-kind x) :ldouble)
          (equal (tyspecseq-kind x) :struct)
          (equal (tyspecseq-kind x) :union)
          (equal (tyspecseq-kind x) :enum)
          (equal (tyspecseq-kind x) :typedef))
      :rule-classes
      ((:forward-chaining :trigger-terms ((tyspecseq-kind x)))))