Divergence preservation and behaviour equivalence #
Divergence is an infinite small-step sequence (SDiverges, CDiverges). The
forward simulation of SCE.Simulation turns an infinite source sequence into an
infinite Core sequence: between two CPlus steps the source can stutter only
finitely often, since each stutter strictly decreases letbCount.
With type safety of both calculi and determinism of Core, termination and divergence are then each preserved and reflected: a well-typed source term and its elaboration have the same behaviour.
Divergence #
Divergence preservation for elaboration #
Divergence for separate compilation #
Separate compilation (binary link), divergence.
Sandboxed client, binary link, divergence.
Closed units, empty environment, binary link, divergence.
Separate compilation (n-ary linkall), divergence.
Sandboxed client, n-ary linkall, divergence.
Closed units, empty environment, n-ary linkall, divergence.
Behaviour equivalence #
Source type safety: a well-typed source term terminates or diverges.
A well-typed Core term cannot both diverge and reach a value.
Well-typed Core multi-step evaluation has at most one value.
Termination is reflected: if the elaboration terminates, so does the source, at a value whose elaboration is the Core result.
The behaviour of a well-typed term and of its elaboration: the same values (up to elaboration) on termination, and divergence iff divergence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Behaviour equivalence for elaboration.
Behaviour equivalence for separate compilation #
Separate compilation (binary link), behaviour equivalence.
Sandboxed client, binary link, behaviour equivalence.
Closed units, empty environment, binary link, behaviour equivalence.
Separate compilation (n-ary linkall), behaviour equivalence.
Sandboxed client, n-ary linkall, behaviour equivalence.
Closed units, empty environment, n-ary linkall, behaviour equivalence.