• 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
        • 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
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)))))