Module Stackingproof

Correctness proof for the translation from Linear to Mach.

This file proves semantic preservation for the Stacking pass.
For the target language Mach, we use the abstract semantics
given in file Machabstr, where a part of the activation record
is not resident in memory. Combined with the semantic equivalence
result between the two Mach semantics (see file Machabstr2concr),
the proof in this file also shows semantic preservation with
respect to the concrete Mach semantics.

Correctness of saving and restoring of callee-save registers

The following lemmas show the correctness of the register saving
code generated by save_callee_save: after this code has executed,
the register save areas of the current frame do contain the
values of the callee-save registers used by the function.

The following lemmas show the correctness of the register reloading
code generated by reload_callee_save: after this code has executed,
all callee-save registers contain the same values they had at
function entry.

The proof of semantic preservation relies on simulation diagrams
of the following form:

st1 --------------- st2
| |
t| +|t
| |
v v
st1'--------------- st2'

Matching between source and target states is defined by match_states
below. It implies:

Agreement between, on the Linear side, the location sets ls
and parent_locsets of the current function and its caller,
and on the Mach side the register set rs, the frame fr
and the caller's frame parent_framets.

Inclusion between the Linear code c and the code of the
function f being executed.