• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Pfcs
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Dynamic-semantics
            • Static-semantics
            • Integer-formats
            • Types
              • Type
                • Typep
                • Type-case
                • Type-fix
                • Type-count
                • Type-equiv
                • Type-kind
                • Type-array
                • Type-struct
                • Type-pointer
                • Type-sint
                • Type-uchar
                • Type-void
                • Type-ushort
                • Type-ulong
                • Type-ullong
                • Type-uint
                • Type-sshort
                • Type-slong
                • Type-sllong
                • Type-schar
                • Type-char
              • Type-name-list-to-type-list
              • Tyname-to-type
              • Member-type-list->name-list
              • Type-completep
              • Member-type
              • Member-type-add-first
              • Member-type-add-last
              • Init-type
              • Type-option
              • Member-type-lookup
              • Tyspecseq-to-type
              • Member-type-list-option
              • Type-promoted-arithmeticp
              • Type-list-result
              • Member-type-list-result
              • Integer-type-bits-nulfun
              • Init-type-result
              • Type-result
              • Type-nonchar-integerp
              • Type-nonchar-integer-listp
              • Type-arithmetic-listp
              • Type-integer-listp
              • Integer-type-xdoc-string
              • Integer-type-minbits
              • Type-unsigned-integerp
              • Type-signed-integerp
              • Type-integerp
              • Type-arithmeticp
              • Integer-type-bits
              • Type-scalarp
              • Type-realp
              • Type-list
              • *nonchar-integer-types*
              • Member-type-list
              • Type-set
              • Type-option-set
              • Symbol-type-alist
              • Type-option-list
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Implementation-environments
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Grammar
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Pack
        • Syntheto
        • File-io-light
        • Number-theory
        • Cryptography
        • Lists-light
        • Json
        • Axe
        • Builtins
        • Solidity
        • Std-extensions
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Types

Type

Fixtype of types [C:6.2.5].

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:void → type-void
:char → type-char
:schar → type-schar
:uchar → type-uchar
:sshort → type-sshort
:ushort → type-ushort
:sint → type-sint
:uint → type-uint
:slong → type-slong
:ulong → type-ulong
:sllong → type-sllong
:ullong → type-ullong
:struct → type-struct
:pointer → type-pointer
:array → type-array

We model a subset of the types denoted by the type names that we currently model; see tyspecseq, obj-adeclor, and tyname. In essence, this fixtype combines a subset of the cases of tyspecseq (abstracting away the flags that model different syntactic variants), with the recursive structure of obj-adeclor.

For array sizes, we use optional positive integers. The size is absent for an array type of unspecified size. If present, the size must not be 0 (this is why we use positive integers), because arrays are never empty in C [C:6.2.5/20].

Subtopics

Typep
Recognizer for type structures.
Type-case
Case macro for the different kinds of type structures.
Type-fix
Fixing function for type structures.
Type-count
Measure for recurring over type structures.
Type-equiv
Basic equivalence relation for type structures.
Type-kind
Get the kind (tag) of a type structure.
Type-array
Type-struct
Type-pointer
Type-sint
Type-uchar
Type-void
Type-ushort
Type-ulong
Type-ullong
Type-uint
Type-sshort
Type-slong
Type-sllong
Type-schar
Type-char