• 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
            • Dead-code-eliminator
            • Renamings
              • Renaming
              • Renaming-result
              • Renaming-old
              • Renaming-new
              • Renaming-pair-equality
            • 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
  • Transformations

Renamings

Renamings of variables and functions.

See renaming-variables and renaming-functions.

The renaming information is captured as a list of pairs of identifiers ((a1 . b1) (a2 . b2) ...) such that a1, a2, etc. are all distinct and that b1, b2, etc. are all distinct. Technically, it is an alist with unique keys and unique values, but we treat it as a list of pairs, i.e. we do not use alist operations on it; it is an injective alist, so its ``direction'' is unimportant. Each pair (ai . bi) describes a renaming between the variable ai in the old code and the variable bi in the new code. The keys are the variables or functions in scope in the old code; the values are the variables or functions in scope in the new code. These facts hold because of the way the list is threaded through, in the ACL2 code that defines the renaming relation. These facts are formally explicated and proved as part of the proof of static safety preservation of variable and function renaming.

The relative ordering of the pairs in the renaming list is irrelevant. Because of the way the list is constructed, the pairs happen to be ordered in reverse chronological order, i.e. the car is the most recent. From a point of view, it may be better to use a set of pairs (which is also an omap), to make it more explicit that the order does not matter. However, with lists we can more readily use functions like no-duplicatesp-equal and theorems about them.

Subtopics

Renaming
Fixtype of renamings.
Renaming-result
Fixtype of errors and renamings.
Renaming-old
Set of old variables in a renaming.
Renaming-new
Set of new variables in a renaming.
Renaming-pair-equality
Theorem about pair equality in renamings.