• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
            • Disambiguation
            • Validation
              • Validator
              • Validation-information
                • Abstract-syntax-annop
                • Types
                • Abstract-syntax-anno-additional-theroems
                • Valid-ext-info
                  • Valid-ext-info-fix
                  • Valid-ext-info-equiv
                  • Make-valid-ext-info
                  • Valid-ext-info->declared-in
                  • Valid-ext-info->uid
                  • Valid-ext-info->type
                  • Change-valid-ext-info
                  • Valid-ext-infop
                • Valid-table
                • Valid-ord-info
                • Uid
                • Stmts-types
                • Lifetime
                • Initdeclor-info
                • Fundef-types
                • Expr-type
                • Valid-defstatus
                • Var-info
                • Valid-ord-info-option
                • Valid-ext-info-option
                • Uid-option
                • Linkage-option
                • Linkage
                • Lifetime-option
                • Valid-table-option
                • Iconst-info
                • Param-declor-nonabstract-info
                • Fundef-info
                • Expr-null-pointer-constp
                • Valid-scope
                • Const-expr-null-pointer-constp
                • Expr-string-info
                • Expr-funcall-info
                • Expr-arrsub-info
                • Tyname-info
                • Transunit-info
                • Expr-unary-info
                • Expr-const-info
                • Expr-binary-info
                • Stmt-types
                • Block-item-list-types
                • Initer-type
                • Valid-ord-scope
                • Uid-increment
                • Uid-equal
                • Coerce-var-info
                • Valid-externals
                • Irr-var-info
                • Valid-scope-list
                • Irr-valid-table
                • Irr-lifetime
                • Irr-uid
                • Irr-linkage
                • Block-item-types
                • Comp-stmt-types
            • Gcc-builtins
            • Preprocessing
            • Parsing
          • Atc
          • Transformation-tools
          • Language
          • Representation
          • Insertion-sort
          • Pack
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Axe
        • Lists-light
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Validation-information

Valid-ext-info

Fixtype of validation information about identifiers with external linkage.

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

Fields
type — type
declared-in — filepath-set
uid — uid

We store the following information about identifiers with external linkage for the purpose of validation across unrelated scopes and across different translation units (by ``unrelated,'' we mean neither scope is nested within the other).

Each declaration of a given identifier with external linkage must agree on the type [C17:6.2.2/2] [C17:6.2.7/2]. Therefore, we store the type to check type compatibility of any declaration after the first.

We also store the set of translation units (represented by their filepaths) in which the identifier has been declared. This is used to ensure the same identifier has not been declared with both internal and external linkage in the same translation unit [C17:6.2.2/7].

Finally, we store a unique identifier for the object. All identifiers of the same name with external linkage refer to the same object and therefore possess the same unique identifier.

Eventually, we may wish to store a boolean flag indicating whether the identifier has been externally defined. This would be used to ensure that externally linked identifiers are defined at most once (or exactly once, if the identifier is used in an expression) [C17:6.9/5]. For now, we conservatively allow any number of definitions.

Subtopics

Valid-ext-info-fix
Fixing function for valid-ext-info structures.
Valid-ext-info-equiv
Basic equivalence relation for valid-ext-info structures.
Make-valid-ext-info
Basic constructor macro for valid-ext-info structures.
Valid-ext-info->declared-in
Get the declared-in field from a valid-ext-info.
Valid-ext-info->uid
Get the uid field from a valid-ext-info.
Valid-ext-info->type
Get the type field from a valid-ext-info.
Change-valid-ext-info
Modifying constructor for valid-ext-info structures.
Valid-ext-infop
Recognizer for valid-ext-info structures.