The increment kit: a round trip around the block-indexed mirror increment #
The kit wrapping DescriptiveComplexity.Draw.Prog.reaches_fileIncrBlk in its round
trip: scan up to the file top, bounce, run the binary increment down the file
– clearing set digits until the first clear one, setting it – and return to
the marker in the phase of the block that carried. The inner VAL loop of
the EXPSPACE program folds its accumulators against exactly that block,
which is why the landing phase is indexed.
The carry block is read off the mark of the register cell that carried: the
kit takes one slot per block (bs), set exactly at the registers of that
block, and its set rule comes in one copy per block. The one-hot clause in
that rule's guard is what makes two copies separable – at an arbitrary
symbol two block slots could both be set, and the third hardening of the
layer (DescriptiveComplexity.Draw.Prog.reaches_fileIncrBlk's one-hot hypothesis)
made the demand and the guard match.
Rules are owned by their source phase: entry (at the scan phase) and exit
(at the marker, in a landing phase, guarded wk = one ∧ rg ≠ one) belong to
the caller.
The increment trip's shapes #
The phases of an increment trip: the up-scan, the bounce, the carry phase, and one landing phase per block.
- up
{B : Type}
: IncrPh B
Scanning up to the file top.
- b2
{B : Type}
: IncrPh B
Bounced off the top, about to re-enter rightwards.
- pc
{B : Type}
: IncrPh B
Clearing set digits, looking for the first clear one.
- pd
{B : Type}
: B → IncrPh B
The digit of this block was set: walking home.
Instances For
Dependency graph
Equations
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.up DescriptiveComplexity.Draw.IncrPh.up = isTrue ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.b2 DescriptiveComplexity.Draw.IncrPh.b2 = isTrue ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.pc DescriptiveComplexity.Draw.IncrPh.pc = isTrue ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh (DescriptiveComplexity.Draw.IncrPh.pd b) (DescriptiveComplexity.Draw.IncrPh.pd b') = if h : b = b' then isTrue ⋯ else isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.up DescriptiveComplexity.Draw.IncrPh.b2 = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.up DescriptiveComplexity.Draw.IncrPh.pc = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.up (DescriptiveComplexity.Draw.IncrPh.pd a) = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.b2 DescriptiveComplexity.Draw.IncrPh.up = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.b2 DescriptiveComplexity.Draw.IncrPh.pc = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.b2 (DescriptiveComplexity.Draw.IncrPh.pd a) = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.pc DescriptiveComplexity.Draw.IncrPh.up = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.pc DescriptiveComplexity.Draw.IncrPh.b2 = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh DescriptiveComplexity.Draw.IncrPh.pc (DescriptiveComplexity.Draw.IncrPh.pd a) = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh (DescriptiveComplexity.Draw.IncrPh.pd a) DescriptiveComplexity.Draw.IncrPh.up = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh (DescriptiveComplexity.Draw.IncrPh.pd a) DescriptiveComplexity.Draw.IncrPh.b2 = isFalse ⋯
- DescriptiveComplexity.Draw.instDecidableEqIncrPh (DescriptiveComplexity.Draw.IncrPh.pd a) DescriptiveComplexity.Draw.IncrPh.pc = isFalse ⋯
Dependency graph
Dependency graph
The rule families of an increment trip, the acting ones per block.
- up
{B : Type}
: IncrRule B
Scan right while the file-top mark is clear.
- b1
{B : Type}
: IncrRule B
At the file top: step left into the bounce phase.
- b2go
{B : Type}
: IncrRule B
Bounce: step back right into the carry phase.
- clear
{B : Type}
: IncrRule B
At a register with a set digit: clear it, carry on.
- set
{B : Type}
: B → IncrRule B
At a register of this block with a clear digit: set it, land.
- walk
{B : Type}
: IncrRule B
Walk left over unmarked cells in the carry phase.
- stay
{B : Type}
: B → IncrRule B
Hold at registers, walk and return, in this block's landing phase.
Instances For
Dependency graph
Dependency graph
An increment kit: the walked track, the service slots, the per-block mark slots, and the phases.
- t : W
The walked track being incremented.
- rg : W
The register mark.
- rl : W
The file-top mark.
- wk : W
The working-cell marker slot.
- bs : B → W
The block mark: set exactly at the registers of that block.
- emb : IncrPh B → P
The kit's phases in the program.
Instances For
Dependency graph
The kit's rules.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The trip stays inside its own phases: every rule lands in one the kit was given.
Dependency graph
In-shape separation. The two indexed families separate through their
index: the set rules by the one-hot clause of their guards, the stay rules
by their source phases.
Dependency graph
Exit disjointness at the kit's landing phases.
Dependency graph
The discharge #
The kit increments its track, and lands at the marker in the phase of the block that carried: from the scan phase anywhere, up to the file top, the binary increment down the file, and back.
Dependency graph
The kit increments its track, the budget forgotten.