The cons push, and the assembled dispatch simulation #
The one non-destructive copy of the machine: dispatching a cons copies the
value into a fresh cons₁ frame at endL, priming each letter on the way so
the scan finds the next one, then unprimes the value and dispatches the first
child. DescriptiveComplexity.HaltHard.cp_loop is the copy loop – one
iteration primes one letter, carries it home and returns – and
DescriptiveComplexity.HaltHard.norm_cons wraps it with the header write and
the unpriming sweep.
With every code shape handled,
DescriptiveComplexity.HaltHard.sim_norm assembles the whole dispatch phase:
from the dispatch of the code at p, the machine reaches the resting
configuration of DescriptiveComplexity.HaltHard.pStepNormal p k v, by
induction on the size of the dispatched code.
Priming #
Marking a letter as copied.
Equations
Instances For
Dependency graph
Fused step-and-walk combinators #
Pass lemmas for the copy #
The copy loop #
One pass of the copy loop, iterated to the end of the value: with the
prefix P already primed and copied and U still to do, the scan fetches
each letter of U in turn, carries it to endL, writes it by the endL-shift
and returns; the loop ends with the scan on endR. The copied content sits
between endL and the old frame region, spatially reversed – which is what
makes it encVal v when the value region held (encVal v).reverse.
Dependency graph
The cons dispatch: copy the value into a fresh cons₁ frame at
endL – mirrored back to straight by the endL-shifts – write the header,
unprime the value, and dispatch the first child.
Dependency graph
Reading pStepNormal off the code shape #
The assembled dispatch phase #
The dispatch phase of the simulation: from the dispatch of the code
at p – any state that hands over to dispatch p on mid – the machine
reaches the resting configuration of pStepNormal p k v, by induction on the
size of the dispatched code.