A program's rules run its register passes #
DescriptiveComplexity.Problems.Wide.Mirror and
DescriptiveComplexity.Problems.Wide.Test are the three shapes a register pass
comes in – write with an accumulator, write without one, read with one – stated
about an abstract tape and an abstract supply of transitions. This file joins
them to a DescriptiveComplexity.Draw.Prog: the tape is
DescriptiveComplexity.Draw.Prog.trackTapeAt, the transitions come from the
program's rules, and what is left for the program to supply is a rule per case
and nothing else.
What a program owes #
DescriptiveComplexity.Draw.Prog.HasLeft is the contract: in this phase, at this
pointer, reading these tracks, the program has a rule that goes to that phase and
that pointer, writes those tracks, and moves left. Every hypothesis below is a
family of those, and the symbols are computed for the caller – it never sees
DescriptiveComplexity.regBit, never writes a tape equation, and never mentions
FirstOrder.Language.wide. (A whole-track overwrite, and a file test with the
question asked of the cell, are in DescriptiveComplexity.Problems.Wide.DrawSub:
a wrapper that quantified its per-cell data independently of the symbol could
be served by no deterministic table.)
The register mark #
Each pass needs to tell a register cell from a cell of the working area, because
its rules act at the first and merely walk over the second. One track slot rg
carries that (hrest below: the slot is set exactly at the cells of the file),
and the guards read it. That is also what separates the acting rules from the
walking one, so it is what DescriptiveComplexity.Draw.Prog.sep_of is discharged
from in these phases.
Which file #
Nothing here is about where the registers are. The passes that need only the
cells take the family (DescriptiveComplexity.Draw.Prog.passTracksAt, and the
lemmas whose cell is inferred from the statement); the passes that need a file
to be a file – the two walks up and down to a marked register, and the mirror
increment – take a DescriptiveComplexity.RegFile and are named file…. The
wmSeg statements below them are those at
DescriptiveComplexity.wmSegFile, which is the file a space-bounded program gets
free from the input channel; a clocked program builds its own low on the tape and
calls the same lemmas at it.
One restriction, and where it bites #
DescriptiveComplexity.reaches_mirrorIncr may stop in a state that depends on the
carry position, and the version here does not use that freedom: it stops in a
single state, because a state's payload holds elements of the source structure
while the carry position is an element of the emitted universe, and the registers
are anonymous. The carry position is still delivered, as u₀ with its
characterization, so every use that only has to move an address – advancing the
working cell, seeking – is served. The inner loop of the step-formula evaluator,
which folds accumulators against the block that rolled over, needs an indexed
variant: the mark of a register cell records which block that register lies in
(finitely many kinds, so finitely many rules), and the stopping rule reads it off
the symbol. That variant is not built here.
The contract #
The program has a leftward rule here: in the phase p at the pointer f,
reading the tracks g, some rule of it goes to the phase p' at the pointer f',
writes the tracks g' and moves left.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The program has a rightward rule here.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A leftward rule is a transition with its six attributes.
Dependency graph
A rightward rule is a transition with its six attributes.
Dependency graph
The tracks a pass reads #
The tracks the tape carries at a cell: the walked track's digit in the
slot t, the program's own bits elsewhere. Everything a rule of a register pass
reads is this, at a register cell or at a cell of the working area.
The register file enters as its cells and not as a
DescriptiveComplexity.RegFile, for the reason
DescriptiveComplexity.Draw.Prog.trackTapeAt does: this is a definition, and a
file carries proofs. What indexes those cells is a parameter, as it is
throughout the address layer: a program on a clock cannot give every element of
the universe a register, and the tracks do not care which does.
Equations
- PR.passTracksAt cell t rest m r s = if s = t then DescriptiveComplexity.Draw.bitVal PR.zero PR.one (DescriptiveComplexity.bitAtOf cell m r) else rest r s
Instances For
Dependency graph
Dependency graph
At a register cell the walked slot holds the track's digit there.
Dependency graph
The walked slot at a register cell: the track's digit there, which is what the acting rules of a pass are guarded by.
Dependency graph
A slot other than the walked one shows what the program keeps there. Every guard of a register pass that is not about the track itself reads through this.
Dependency graph
The tracks at a cell read the background there and nowhere else. Two backgrounds agreeing at one address present the same tracks there, whatever they do elsewhere – which is what lets a sweep describe its progress by a frontier rather than by an induction.
Dependency graph
The register mark, read: the slot rg is set exactly at the cells of the
file, which is what tells the acting rules of a pass from its walking one.
Dependency graph
One step in the working area #
A register pass leaves the program's other bits alone; the work between passes is the other way round – the track is untouched and the background changes, at the one cell the head is on. That is one step, and it is the only place a program's own data is written.
Backgrounds agreeing off a cell present tapes agreeing off it.
Dependency graph
One step of the program to the right, writing its own data at the cell it leaves. The track is carried along untouched, so a step and a register pass compose without either having to know what the other keeps on the tape.
Dependency graph
One step of the program to the left.
Dependency graph
Getting to a marked register #
The two ends of the file have to be recognized on sight – the last one to begin a downward pass, the first one to come back from one – and that is all that has to be. One slot marks the target cell, one rule family walks over everything else, and the same theorem serves both ends by taking the target as a parameter.
Walking up to a marked register. From any cell at or below the register of
u, the machine scans right to it, stopped by the slot sl that marks that cell
and no other. The cost is the stretch of addresses it crosses.
Dependency graph
Walking up to a marked register, the budget forgotten.
Dependency graph
Seeking a marked cell #
The other navigation a program does, and the one it does in the working area: walk
until the cell whose slot sl is set. Unlike the register ends, the program does
not know which cell that will be – it wrote the mark itself, exponentially many
rounds ago – so the arrival comes with the promise that nothing passed was marked,
which is where the extremum is taken.
Seeking right to the nearest marked cell.
Dependency graph
Seeking right to the nearest marked cell, the budget forgotten.
Dependency graph
Seeking left to the nearest marked cell.
Dependency graph
Seeking left to the nearest marked cell, the budget forgotten.
Dependency graph
The mirror increment #
The stopped phase may depend on the register the increment carried at – on the
block that rolled over, which is what the fold of
DescriptiveComplexity.Problems.Wide.Fold has to know. The machine cannot name
that register: a state's payload holds elements of the source structure, and the
registers are anonymous. What it can do is read the block off the mark, since a
reduction chooses what each register cell starts holding and there are finitely
many blocks; so the stopping rule comes in one copy per block, and the phase it
goes to is the copy's.
A program increments its mirror, and lands in the phase of the block that
carried. From the last register in the carrying phase with the track at m, the
machine walks down the file and arrives just below the first register with the
track at the increment of m, in the phase pd b for the block b of the carry
position.
The four families of rules are the whole of what the program supplies, and each is a statement about the tracks a symbol carries, not about the tape.
Dependency graph
A program increments its mirror, stopping in one phase whatever carried:
DescriptiveComplexity.Draw.Prog.reachesIn_fileIncrBlk with a single block, the register
mark serving as its indicator. This is the form every use that only has to move
an address takes – advancing the working cell, seeking.
Dependency graph
A program increments its mirror, landing in the phase of the block that carried, the budget forgotten.
Dependency graph
A program increments its mirror, stopping in one phase whatever carried, the budget forgotten.