• 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
              • 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
                • Expr-type-fix
                • Expr-type-equiv
                • Expr-typep
                • Make-expr-type
                • Expr-type->type
                • Change-expr-type
                • Expr-type->lvalue
              • 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

Expr-type

Fixtype of expression types.

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

Fields
type — type
lvalue — booleanp

Certain C expressions are lvalues [C17:6.3.2/1], i.e. they evaluate to object designators rather than values [C17:6.5/1]. In many cases, lvalue conversion [C17:6.3.2/2] turns an object designator into the value of the designated object, but some operators (e.g. assignments) require lvalues. Thus, the static semantics must calculate, for each expression, not only its type, but also whether it is an lvalue or not. This information is captured via a type and an lvalue flag.

Expressions may also evaluate to function designators [C17:6.5/1]. We do not cover that case for now, because our subset of C makes a limited use of functions; in particular, it has no function pointers. However, in the future this fixtype could be extended accordingly.

Subtopics

Expr-type-fix
Fixing function for expr-type structures.
Expr-type-equiv
Basic equivalence relation for expr-type structures.
Expr-typep
Recognizer for expr-type structures.
Make-expr-type
Basic constructor macro for expr-type structures.
Expr-type->type
Get the type field from a expr-type.
Change-expr-type
Modifying constructor for expr-type structures.
Expr-type->lvalue
Get the lvalue field from a expr-type.