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.
- Theorems about restricting variables and variable renaming.
- Theorems about function environments and variable renaming.
- Main theorems of the proof that
variable renaming preserves the execution behavior.
- Theorems about restricting variables
in parallel executions related by variable renaming.
- Value matching part of the
variable renaming relation over local states.
- Variable renaming relation over statement outcome results.
- Variable renaming relation over local states.
- Theorems about reserr-limitp.
- Variable renaming relation over expression outcome results.
- Variable renaming relation over expression outcomes.
- Variable renaming relation over statement outcomes.
- Theorems about computation states and variable renamings,
not involving dynamic semantic operations.
- Variable renaming relation over computation states.
- Variable renaming relation over function information.
- Variable renaming relation over function scopes.
- Variable renaming relation over function environments.
- Theorems about variable renaming for paths.
- Theorems about local state initialization and variable renaming.
- Theorems about writing variables and variable renaming.
- Theorems about adding variables and variable renamings.
- Theorems about reading variables and variable renaming.
- Theorems about the variables in a computation state
after execution of certain kinds of constructs.