• 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
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
          • Primitive-functions
          • Translated-terms
          • Values
          • Evaluation
          • Program-equivalence
          • Functions
          • Packages
          • Programs
          • Interpreter
          • Evaluation-states
            • Eval-state
              • Eval-state-fix
              • Eval-state-case
              • Eval-state-p
              • Eval-state-equiv
              • Eval-state-init
              • Eval-state-trans
              • Eval-state-final
              • Eval-state-kind
              • Eval-state-error
            • Frame
            • Binding
            • Stack
        • 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
  • Evaluation-states

Eval-state

Fixtype of evaluation states.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:init → eval-state-init
:trans → eval-state-trans
:final → eval-state-final
:error → eval-state-error

In our current formalization, the execution of an ACL2 program starts with a call of a (named) function on some argument values. For every choice of function and arguments, there is one possible initial state. This is captured by the :init summand of this fixtype.

As formalized elsewhere, the execution from an initial state proceeds by looking up the function's definition, binding the argument values to the function's parameters, and then executing the function's body, which is put in a frame together with the binding. As also formalized elsewhere, a frame is executed stepwise, and may result in new frames being pushed onto the stack. Thus, a transitional execution state, i.e. one that is neither initial nor final, consists of a stack of frames. This is captured by the :trans summand of this fixtype.

Frames are pushed and popped during execution. When the last frame is popped, there is no longer a stack, but there is a value, which is the result of the original function call (in the initial state) that started the whole execution. The final state thus consists of a single value. This is captured by the :final summand of this fixtype.

During execution, certain kinds of errors may occur. For example, a function definition may not be found. There are well-formedness conditions on programs that ensure, via invariants on evaluation states, the absence of such errors. This will be formalized as the static semantics of the ACL2 programming language. However, as is common in programing language research, we define the dynamic semantics of the ACL2 programing language without assumng any static well-formedness, and therefore we must allow for the occurrence of errors, which lead to error states. This is captured by the :error summand of this fixtype. These values currently carry no information, but we may refine them with fields that convey information about the nature and details of errors. In the future we may also want to prove formally that constraints from the static semantics ensure the absence of errors in the dynamic semantics.

Subtopics

Eval-state-fix
Fixing function for eval-state structures.
Eval-state-case
Case macro for the different kinds of eval-state structures.
Eval-state-p
Recognizer for eval-state structures.
Eval-state-equiv
Basic equivalence relation for eval-state structures.
Eval-state-init
Eval-state-trans
Eval-state-final
Eval-state-kind
Get the kind (tag) of a eval-state structure.
Eval-state-error