• 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
          • Transformations
            • Renaming-variables
              • Statements/blocks/cases/fundefs-renamevar
              • Renaming-variables-execution
                • Restrict-vars-when-renamevar
                • Function-environments-when-renaming-variables
                • Exec-when-renamevar
                • Exec-when-renamevar-restrict-vars-lemmas
                • Lstate-match-renamevarp
                • Soutcome-result-renamevarp
                • Lstate-renamevarp
                • Reserr-limitp-theorems
                • Eoutcome-result-renamevarp
                • Eoutcome-renamevarp
                • Soutcome-renamevarp
                • Cstate-renamevarp-with-larger-renaming
                • Cstate-renamevarp
                • Funinfo-renamevarp
                • Funscope-renamevarp
                • Funenv-renamevarp
                • Path/paths-renamevar-theorems
                • Init-local-when-renamevar
                • Write-var/vars-value/values-when-renamevar
                • Add-var/vars-value/values-when-renamevar
                • Read-var/vars-value/values-when-renamevar
                • Vars-of-cstate-after-exec
              • Expressions-renamevar
              • Add-var-to-var-renaming
              • Add-vars-to-var-renaming
              • Renaming-variables-safety
              • Fundef-list-renamevar
              • Expression-option-renamevar
              • Funcall-option-renamevar
              • Path-list-renamevar
              • Var-list-renamevar
              • Var-renamevar
              • Path-renamevar
            • Dead-code-eliminator
            • Renamings
            • Disambiguator
            • Unique-variables
            • Dead-code-eliminator-static-safety
            • No-function-definitions
            • Unique-functions
            • Renaming-functions
            • Dead-code-eliminator-no-loop-initializers
            • Dead-code-eliminator-no-function-definitions
            • No-loop-initializers
            • For-loop-init-rewriter
          • Language
          • Yul-json
        • 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
  • Renaming-variables

Renaming-variables-execution

Proof that variable renaming preserves the execution behavior.

We start by extending the variable renaming relation from the abstract syntax to the dynamic semantic entities, namely function environments and computation states (and their constituents). For these, we define the relation as a predicate, instead of a function that may return errors, as we never need to return anything if the relation holds (while, for certain abstract syntax entities, we need to return additional information, e.g. the extended renaming.

Then we prove theorems relating variable renamings to the various dynamic semantic operations. Examples of these operations are writing variables, finding functions in environments, and so on.

Next, we show some properties of computation states and variable renamings, which do not involve dynamic semantic operations.

Then we prove theorems saying that executing a list of statements yields a computation state with a superset of the starting variables, and that executing loop iterations yields a computation state with the same variables as the starting state. These theorems are independent from variable renaming, and could be moved to a more central place, possibly complemented by similar properties for executing other kinds of abstract syntax entities.

Then we prove some theorems about limit errors. In particular, we prove that several dynamic semantic operations never return limit errors. These theorems are actually independent from variable renaming, and could be moved to a more central place.

Before proving the main theorems, we prove two preliminary ones having to do with the use of restrict-vars in execution, when dealing with parallel executions related by variable renaming.

Finally we prove theorems about the execution functions and variable renaming. We do that by induction, using a custom induction schema.

Subtopics

Restrict-vars-when-renamevar
Theorems about restricting variables and variable renaming.
Function-environments-when-renaming-variables
Theorems about function environments and variable renaming.
Exec-when-renamevar
Main theorems of the proof that variable renaming preserves the execution behavior.
Exec-when-renamevar-restrict-vars-lemmas
Theorems about restricting variables in parallel executions related by variable renaming.
Lstate-match-renamevarp
Value matching part of the variable renaming relation over local states.
Soutcome-result-renamevarp
Variable renaming relation over statement outcome results.
Lstate-renamevarp
Variable renaming relation over local states.
Reserr-limitp-theorems
Theorems about reserr-limitp.
Eoutcome-result-renamevarp
Variable renaming relation over expression outcome results.
Eoutcome-renamevarp
Variable renaming relation over expression outcomes.
Soutcome-renamevarp
Variable renaming relation over statement outcomes.
Cstate-renamevarp-with-larger-renaming
Theorems about computation states and variable renamings, not involving dynamic semantic operations.
Cstate-renamevarp
Variable renaming relation over computation states.
Funinfo-renamevarp
Variable renaming relation over function information.
Funscope-renamevarp
Variable renaming relation over function scopes.
Funenv-renamevarp
Variable renaming relation over function environments.
Path/paths-renamevar-theorems
Theorems about variable renaming for paths.
Init-local-when-renamevar
Theorems about local state initialization and variable renaming.
Write-var/vars-value/values-when-renamevar
Theorems about writing variables and variable renaming.
Add-var/vars-value/values-when-renamevar
Theorems about adding variables and variable renamings.
Read-var/vars-value/values-when-renamevar
Theorems about reading variables and variable renaming.
Vars-of-cstate-after-exec
Theorems about the variables in a computation state after execution of certain kinds of constructs.