One variable's machinery: gates, the VAL loop, the stage write #
The spine of the per-variable evaluation
(DescriptiveComplexity.Problems.Wide.DrawEval dispatches into it, once per
variable position): the gates decide whether the working address's outer
blocks encode points – their machinery is abstract here, their verdict a
control flag – the junk path writes False into the stage track directly,
and the valid path runs the VAL loop: clear the VAL register, evaluate
the matrix at the empty valuation, then rounds of exhaustion test, increment
and matrix until VAL is exhausted, the accumulator folds riding in the
dispatching rules' dstSt (separation never reads dstSt, so the folds are
parameters here – initSt at the empty valuation, storeCarry at each
increment's block-indexed landing, postFold after each matrix pass – and
their content is fixed with the runs, not with the shapes).
Everything is generic over the program's phase type: the spine's phases embed by a parameter, the gates' and the matrix's machineries come with their own rules, and the exit – writing the variable's next-stage bit at the marker off the verdict accumulator – targets a parameter phase. One copy of this file's shapes per variable position is instantiated at assembly.
The shapes #
The phases of one variable's machinery: the four checkpoints, the
kit copies, and the two abstract blocks. B is the carry-block index of
the VAL increment.
- vchk0
{B PG PX : Type}
: VarPh B PG PX
The entry checkpoint: walk to the marker, begin the gates.
- gatesP
{B PG PX : Type}
: PG → VarPh B PG PX
A phase of the gates' machinery.
- vchk1
{B PG PX : Type}
: VarPh B PG PX
After the gates: dispatch on their verdict flag.
- clearValP
{B PG PX : Type}
: TrackPh → VarPh B PG PX
Clearing the VAL register.
- matrixP
{B PG PX : Type}
: PX → VarPh B PG PX
A phase of the matrix's machinery.
- mchk1
{B PG PX : Type}
: VarPh B PG PX
After a matrix pass: fold and begin the exhaustion test.
- valTestP
{B PG PX : Type}
: TestPh → VarPh B PG PX
The exhaustion test on VAL.
- valIncrP
{B PG PX : Type}
: IncrPh B → VarPh B PG PX
The increment of VAL, landing per carry block.
- vchk2
{B PG PX : Type}
: VarPh B PG PX
Converged: write the stage bit and leave.
Instances For
Dependency graph
The sites of one variable's machinery.
- vchk0
{SG SX : Type}
: VarSite SG SX
The entry checkpoint.
- gates
{SG SX : Type}
: SG → VarSite SG SX
A gates site.
- vchk1
{SG SX : Type}
: VarSite SG SX
The verdict checkpoint.
- clearVal
{SG SX : Type}
: VarSite SG SX
The VAL clear.
- matrix
{SG SX : Type}
: SX → VarSite SG SX
A matrix site.
- mchk1
{SG SX : Type}
: VarSite SG SX
The post-matrix checkpoint.
- valTest
{SG SX : Type}
: VarSite SG SX
The exhaustion test.
- valIncr
{SG SX : Type}
: VarSite SG SX
The VAL increment.
- vchk2
{SG SX : Type}
: VarSite SG SX
The exit checkpoint.
Instances For
Dependency graph
The rule shape of each site: kit rules summed with exits, the checkpoints' the three-rule gadget of the spine layer.
Equations
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.vchk0 = DescriptiveComplexity.Draw.EvalChkRule
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B (DescriptiveComplexity.Draw.VarSite.gates s) = ShG s
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.vchk1 = DescriptiveComplexity.Draw.EvalChkRule
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.clearVal = (DescriptiveComplexity.Draw.TrackRule ⊕ Unit)
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B (DescriptiveComplexity.Draw.VarSite.matrix s) = ShX s
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.mchk1 = DescriptiveComplexity.Draw.EvalChkRule
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.valTest = (DescriptiveComplexity.Draw.TestRule ⊕ Bool)
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.valIncr = (DescriptiveComplexity.Draw.IncrRule B ⊕ B)
- DescriptiveComplexity.Draw.VarSh SG SX ShG ShX B DescriptiveComplexity.Draw.VarSite.vchk2 = DescriptiveComplexity.Draw.EvalChkRule
Instances For
Dependency graph
The owner of each phase of one variable's machinery, over the gates' and the matrix's owners.
Equations
- DescriptiveComplexity.Draw.varOwn ownG ownX DescriptiveComplexity.Draw.VarPh.vchk0 = DescriptiveComplexity.Draw.VarSite.vchk0
- DescriptiveComplexity.Draw.varOwn ownG ownX (DescriptiveComplexity.Draw.VarPh.gatesP p) = DescriptiveComplexity.Draw.VarSite.gates (ownG p)
- DescriptiveComplexity.Draw.varOwn ownG ownX DescriptiveComplexity.Draw.VarPh.vchk1 = DescriptiveComplexity.Draw.VarSite.vchk1
- DescriptiveComplexity.Draw.varOwn ownG ownX (DescriptiveComplexity.Draw.VarPh.clearValP a) = DescriptiveComplexity.Draw.VarSite.clearVal
- DescriptiveComplexity.Draw.varOwn ownG ownX (DescriptiveComplexity.Draw.VarPh.matrixP p) = DescriptiveComplexity.Draw.VarSite.matrix (ownX p)
- DescriptiveComplexity.Draw.varOwn ownG ownX DescriptiveComplexity.Draw.VarPh.mchk1 = DescriptiveComplexity.Draw.VarSite.mchk1
- DescriptiveComplexity.Draw.varOwn ownG ownX (DescriptiveComplexity.Draw.VarPh.valTestP a) = DescriptiveComplexity.Draw.VarSite.valTest
- DescriptiveComplexity.Draw.varOwn ownG ownX (DescriptiveComplexity.Draw.VarPh.valIncrP a) = DescriptiveComplexity.Draw.VarSite.valIncr
- DescriptiveComplexity.Draw.varOwn ownG ownX DescriptiveComplexity.Draw.VarPh.vchk2 = DescriptiveComplexity.Draw.VarSite.vchk2
Instances For
Dependency graph
The carry-block index of the VAL increment.
Instances For
Dependency graph
The rules of one variable's machinery. Parameters: the phase embedding, the two abstract machineries with their entry phases, the exit phase, the variable's stage slot, the gates' verdict flag, the verdict accumulator, and the three fold updates.
Equations
- One or more equations did not get rendered due to their size.
- dt.varRule zero one emb ruleG ruleX pgEntry pxEntry exitPh newSlot gateFlag accBit enterSt initSt postFold storeCarry (DescriptiveComplexity.Draw.VarSite.gates s) ρ = ruleG s ρ
- dt.varRule zero one emb ruleG ruleX pgEntry pxEntry exitPh newSlot gateFlag accBit enterSt initSt postFold storeCarry (DescriptiveComplexity.Draw.VarSite.matrix s) ρ = ruleX s ρ
Instances For
Dependency graph
A property of a variable machinery's phases and its exit holds of every phase it can move to, given it holds of the gates' and the matrix's.
Dependency graph
Every rule of one variable's machinery fires from a phase its site owns; the two abstract machineries' obligations are parameters.
Dependency graph
One variable's machinery separates in-shape: the checkpoints by
their guards, the kits by their sep and exit_disjoint, the exit pairs by
the phases the embedding keeps apart; the two abstract machineries by their
parameters.