• 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
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
              • Write-object
              • Objdesign-of-var
              • Compustate-scopes-numbers
              • Create-var
              • Read-object
              • Compustate
                • Compustatep
                • Compustate-fix
                • Compustate-equiv
                • Make-compustate
                • Compustate->frames
                • Change-compustate
                • Compustate->static
                • Compustate->heap
              • Frame
              • Enter-scope
              • Compustate-scopes-numbers-aux
              • Compustate-option
              • Push-frame
              • Exit-scope
              • Compustate-frames-number
              • Compustate-option-result
              • Scope-list-result
              • Pop-frame
              • Compustate-result
              • Scope-result
              • Compustate-top-frame-scopes-number
              • Top-frame
              • Heap
              • Scope
              • Scope-list
              • Frame-list
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • 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
  • Computation-states

Compustate

Fixtype of computation states.

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

Fields
static — scope
frames — frame-list
heap — heap

A computation state consists of:

  • A scope for static storage [C17:6.2.4]. Our current C subset only has one translation unit (i.e. a single .c file, with an optional .h file; together they form a single translation unit, see preprocess), so the static storage corresponds to the variables declared at the top-level in the translation unit, which form a scope.
  • A stack of frames. The variables there are in automatic storage [C17:6.2.4].
  • A heap. This is allocated storage [C17:6.2.4].

More components may be added, and some components may be refined, as our modeling coverage of C increases.

The stack grows leftward and shrinks rightward, i.e. push is cons, pop is cdr, and top is car.

Subtopics

Compustatep
Recognizer for compustate structures.
Compustate-fix
Fixing function for compustate structures.
Compustate-equiv
Basic equivalence relation for compustate structures.
Make-compustate
Basic constructor macro for compustate structures.
Compustate->frames
Get the frames field from a compustate.
Change-compustate
Modifying constructor for compustate structures.
Compustate->static
Get the static field from a compustate.
Compustate->heap
Get the heap field from a compustate.