• 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
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
              • Check-stmt
              • Check-cond
              • Check-binary-pure
              • Var-table-add-var
              • Check-unary
              • Check-obj-declon
              • Fun-table-add-fun
              • Check-fundef
              • Fun-sinfo
              • Check-expr-asg
              • Check-expr-call
              • Check-arrsub
              • Uaconvert-types
              • Apconvert-type-list
              • Check-initer
              • Adjust-type-list
              • Types+vartab
                • Types+vartab-fix
                • Types+vartab-equiv
                • Make-types+vartab
                • Types+vartab->return-types
                • Types+vartab->variables
                • Change-types+vartab
                • Types+vartab-p
              • Promote-type
              • Check-tag-declon
              • Check-expr-call-or-asg
              • Check-ext-declon
              • Check-param-declon
              • Check-member
              • Check-expr-pure
              • Init-type-matchp
              • Check-obj-adeclor
              • Check-memberp
              • Check-expr-call-or-pure
              • Check-cast
              • Check-struct-declon-list
              • Check-fun-declor
              • Expr-type
              • Check-ext-declon-list
              • Check-transunit
              • Check-fun-declon
              • Var-defstatus
              • Struct-member-lookup
              • Wellformed
              • Preprocess
              • Check-tyspecseq
              • Check-param-declon-list
              • Check-iconst
              • Check-expr-pure-list
              • Var-sinfo-option
              • Fun-sinfo-option
              • Funtab+vartab+tagenv
              • Var-scope-all-definedp
              • Var-sinfo
              • Var-table-lookup
              • Apconvert-type
              • Var-table
              • Check-tyname
              • Types+vartab-result
              • Funtab+vartab+tagenv-result
              • Wellformed-result
              • Fun-table-lookup
              • Var-table-scope
              • Var-table-result
              • Var-table-add-block
              • Fun-table-result
              • Expr-type-result
              • Adjust-type
              • Check-fileset
              • Var-table-all-definedp
              • Check-const
              • Fun-table-all-definedp
              • Check-ident
              • Fun-table
              • Var-table-init
              • Fun-table-init
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • 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
  • Static-semantics

Types+vartab

Fixtype of pairs consisting of a non-empty set of types and a variable table.

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

Fields
return-types — type-set
variables — var-table
Additional Requirements

The following invariant is enforced on the fields:

(not (emptyp return-types))

This captures the information inferred by the static semantics about a statement (or block item or block). The information consists of:

  • A non-empty set of types that describes the possible values returned by the statement. These are determined by the return statements; in the presence of conditionals, the possible types in the two branches are merged (i.e. unioned). The type void is used to describe statements that do not return a value, but instead transfer control to the next statement (if any).
  • A possibly updated variable table. This is updated by block items that are declarations. We actually only need to return possibly updated variable tables from the ACL2 function check-block-item; the ACL2 functions check-stmt and check-block-item-list could just return a set of types (see above). However, for uniformity we have all three functions return also a possibly updated variable table.

Subtopics

Types+vartab-fix
Fixing function for types+vartab structures.
Types+vartab-equiv
Basic equivalence relation for types+vartab structures.
Make-types+vartab
Basic constructor macro for types+vartab structures.
Types+vartab->return-types
Get the return-types field from a types+vartab.
Types+vartab->variables
Get the variables field from a types+vartab.
Change-types+vartab
Modifying constructor for types+vartab structures.
Types+vartab-p
Recognizer for types+vartab structures.