• 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
              • Expressions-renamevar
              • Add-var-to-var-renaming
              • Add-vars-to-var-renaming
              • Renaming-variables-safety
                • Renaming-variables-statements/blocks/cases/fundefs-safety
                • Renaming-variables-expression-safety
                • Theorems-about-function-tables-and-variable-renaming
                • Varset-old
                • Varset-new
                • Varset-old/new-of-add-var/vars-to-var-renaming
                • Check-safe-path/paths-when-path/paths-renamevar
                • Add-var/vars-not-error-when-add-var/vars-to-var-renaming
                • Check-var-when-var-renamevar
              • 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-safety

Proof that variable renaming preserves the static safety checks.

As mentioned in renaming-variables, the renaming list/alist consists of the variables in scope for the old code (the keys of the alist) and the variables in scope for the new code (the values of the alist). Thus, we prove theorems saying that if two pieces of code are related by variable renaming, and the old code is safe with respect to the variables that are the keys of the renaming alist, then the new code is safe with respect to the variables that are the values of the renaming alist; furthermore, if the renaming list is updated, the updated variables in scope are still the keys and values, for the old and new code; furthermore, if the static safety checks return information other than updated variables in scope (e.g. modes, or numbers of values), that information is the same for old and new code.

The above is just a sketch. Things are explained in more detail below.

Subtopics

Renaming-variables-statements/blocks/cases/fundefs-safety
Proof that variable renaming preserves the safety of statements, blocks, and related entities.
Renaming-variables-expression-safety
Proof that variable renaming preserves the safety of expressions.
Theorems-about-function-tables-and-variable-renaming
Theorems about function tables and related concepts for code related by variable renaming.
Varset-old
Variables in scope for the old code in variable renaming.
Varset-new
Variables in scope for the new code in variable renaming.
Varset-old/new-of-add-var/vars-to-var-renaming
Theorems about varset-old and varset-new applied to add-var-to-var-renaming and add-vars-to-var-renaming.
Check-safe-path/paths-when-path/paths-renamevar
If two (lists of) paths are related by variable renaming, the safety of the old one implies the safety of the new one.
Add-var/vars-not-error-when-add-var/vars-to-var-renaming
If variables can be added to a variable renaming, then the new variables can be added to the ones in the new scope.
Check-var-when-var-renamevar
If a variable is in scope for the old code, its renamed counterpart is in scope for the new code.