• 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
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
              • Fty-pseudo-term-utilities
              • Atc-term-recognizers
              • Atc-input-processing
              • Atc-shallow-embedding
                • Defstruct
                  • Defstruct-implementation
                    • Defstruct-info
                      • Defstruct-info-fix
                      • Make-defstruct-info
                      • Defstruct-infop
                      • Defstruct-info-equiv
                      • Change-defstruct-info
                      • Defstruct-info->pointer-type-to-quoted-thm
                      • Defstruct-info->fixer-recognizer-thm
                      • Defstruct-info->type-to-quoted-thm
                      • Defstruct-info->type-of-value-thm
                      • Defstruct-info->value-kind-thm
                      • Defstruct-info->not-error-thm
                      • Defstruct-info->members
                      • Defstruct-info->flexiblep-thm
                      • Defstruct-info->valuep-thm
                      • Defstruct-info->recognizer
                      • Defstruct-info->flexiblep
                      • Defstruct-info->fixtype
                      • Defstruct-info->fixer
                      • Defstruct-info->call
                      • Defstruct-info->tag
                    • Defstruct-gen-recognizer
                    • Defstruct-gen-integer-member-ops
                    • Defstruct-gen-constructor
                    • Defstruct-gen-array-member-ops
                    • Defstruct-gen-recognizer-conjuncts
                    • Defstruct-member-info
                    • Defstruct-member-info-list->memtype-list
                    • Defstruct-process-members
                    • Defstruct-gen-fixer
                    • Defstruct-gen-member-ops
                    • Defstruct-process-inputs
                    • Defstruct-gen-fixing-term
                    • Defstruct-info-option
                    • Defstruct-gen-everything
                    • Defstruct-gen-all-member-ops
                    • Defstruct-gen-recognizer-all-conjuncts
                    • Defstruct-info->writer-element-list
                    • Defstruct-info->reader-element-list
                    • Defstruct-gen-fixtype
                    • Defstruct-info->writer-list
                    • Defstruct-info->reader-list
                    • Defstruct-fn
                    • Defstruct-table-record-event
                    • Defstruct-table-lookup
                    • Irr-defstruct-info
                    • Defstruct-info->writer-element-list-aux
                    • Defstruct-info->reader-element-list-aux
                    • Defstruct-info->writer-list-aux
                    • Defstruct-info->reader-list-aux
                    • Defstruct-member-info-list
                    • Defstruct-table-definition
                    • *defstruct-table*
                    • Defstruct-macro-implementtion
                • Defobject
                • Atc-let-designations
                • Pointer-types
                • Atc-conditional-expressions
              • Atc-process-inputs-and-gen-everything
              • Atc-table
              • Atc-fn
              • Atc-pretty-printing-options
              • Atc-types
              • Atc-macro-definition
            • Atc-tutorial
          • Language
          • 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
  • Defstruct-implementation

Defstruct-info

Fixtype of information about shallowly embedded C structures.

This is a product type introduced by fty::defprod.

Fields
tag — ident
members — defstruct-member-info-list
flexiblep — booleanp
fixtype — symbolp
recognizer — symbolp
fixer — symbolp
fixer-recognizer-thm — symbolp
not-error-thm — symbolp
valuep-thm — symbolp
value-kind-thm — symbolp
type-of-value-thm — symbolp
flexiblep-thm — symbolp
type-to-quoted-thm — symbolp
pointer-type-to-quoted-thm — symbolp
call — pseudo-event-form

For each C structure type defined via defstruct, we store:

  • The tag, as an identifier. While currently ident is just a wrapper of string, it may include invariants in the future. Thus, having the tag stored as an identifier in the structure information will spare us from having to double-check the invariants if we were to construct the identifier from the string.
  • Information about the members; see defstruct-member-info.
  • A flag saying whether the structure type has a flexible array member.
  • The fixtype of the structures.
  • The recognizer of the structures.
  • The fixer of the structures.
  • The name of the theorem that rewrites away the fixer when the recognizer holds.
  • The name of a theorem asserting that if something is a structure of this type then it is not an error.
  • The name of the theorem asserting that the recognizer implies valuep.
  • The name of the theorem asserting that the recognizer implies that value-kind is :struct.
  • The name of the theorem asserting that the recognizer implies that type-of-value returns the struct type, expressed as a term (type-struct ...).
  • The name of the theorem asserting the value of the flexible array member flag.
  • The name of the theorem asserting the equality of (type-struct <tag>) to its quoted value, where <tag> is the tag of this structure type.
  • The name of the theorem asserting the equality of (type-pointer (type-struct <tag>)) to its quoted value, where <tag> is the tag of this structure type.
  • The call of defstruct. This supports redundancy checking.

Subtopics

Defstruct-info-fix
Fixing function for defstruct-info structures.
Make-defstruct-info
Basic constructor macro for defstruct-info structures.
Defstruct-infop
Recognizer for defstruct-info structures.
Defstruct-info-equiv
Basic equivalence relation for defstruct-info structures.
Change-defstruct-info
Modifying constructor for defstruct-info structures.
Defstruct-info->pointer-type-to-quoted-thm
Get the pointer-type-to-quoted-thm field from a defstruct-info.
Defstruct-info->fixer-recognizer-thm
Get the fixer-recognizer-thm field from a defstruct-info.
Defstruct-info->type-to-quoted-thm
Get the type-to-quoted-thm field from a defstruct-info.
Defstruct-info->type-of-value-thm
Get the type-of-value-thm field from a defstruct-info.
Defstruct-info->value-kind-thm
Get the value-kind-thm field from a defstruct-info.
Defstruct-info->not-error-thm
Get the not-error-thm field from a defstruct-info.
Defstruct-info->members
Get the members field from a defstruct-info.
Defstruct-info->flexiblep-thm
Get the flexiblep-thm field from a defstruct-info.
Defstruct-info->valuep-thm
Get the valuep-thm field from a defstruct-info.
Defstruct-info->recognizer
Get the recognizer field from a defstruct-info.
Defstruct-info->flexiblep
Get the flexiblep field from a defstruct-info.
Defstruct-info->fixtype
Get the fixtype field from a defstruct-info.
Defstruct-info->fixer
Get the fixer field from a defstruct-info.
Defstruct-info->call
Get the call field from a defstruct-info.
Defstruct-info->tag
Get the tag field from a defstruct-info.