Documentation

DescriptiveComplexity.Problems.Wide.DrawEval

The evaluation's spine: the per-variable loop #

The per-address evaluation the outer program abstracts (DescriptiveComplexity.Problems.Wide.DrawOuter) factors once more, the same way: a spine – one checkpoint per variable position, dispatching into that variable's machinery and, after the last, back into the outer loop – around per-variable sub-machineries (the gates, the VAL loop, the atom subroutines, the stage write) that stay abstract here.

A checkpoint phase chk k owns two things: the walk back to the marker (entering rules step right off it, as everywhere in the assembly) and the dispatch at the marker. For k < nv the dispatch enters variable k's machinery; at k = nv it is the pair of outer boundary rules the outer file promised – erase the marker and step right, into the sweep's advance below the ltp cell, into the post-sweep reset at it. A sub-machinery's final exit targets the next checkpoint, which is how the spine needs to know nothing about its internals.

The spine's shapes #

The phases of the evaluation: one checkpoint per variable position (the last is the return to the outer loop), and the sub-machineries'.

  • chk {nv : ℕ} {PM : Type} : Fin (nv + 1) → EvalPh nv PM

    The checkpoint before variable k (at k = nv: after the last).

  • sub {nv : ℕ} {PM : Type} : PM → EvalPh nv PM

    A phase of a sub-machinery.

Instances For
    Dependency graph
    Dependency graph

    The sites of the evaluation: one per checkpoint, and the sub-machineries'.

    Instances For
      Dependency graph

      The rules of a checkpoint: the walk back to the marker, and the two dispatches (the second is only live at the last checkpoint).

      • stay : EvalChkRule

        Walk left back to the marker.

      • dspA : EvalChkRule

        Dispatch: into the variable's machinery, or – at the last checkpoint, below the ltp cell – into the sweep's advance.

      • dspB : EvalChkRule

        Dispatch at the last checkpoint, at the ltp cell: into the post-sweep reset. Dead below the last checkpoint.

      Instances For
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        noncomputable def DescriptiveComplexity.Draw.Data.evalRule {L : FirstOrder.Language} (dt : Data L) {A Q PM SM : Type} {nv : ℕ} (zero one : A) {ShM : SM → Type} (ruleM : (s : SM) → ShM s → Rule A Q dt.SlotIx (OuterPh (EvalPh nv PM))) (subEntry : Fin nv → PM) (i : EvalSite nv SM) :
        EvalSh nv SM ShM i → Rule A Q dt.SlotIx (OuterPh (EvalPh nv PM))

        The rules of the evaluation's spine: per checkpoint the walk back and the dispatches; the sub-machineries' rules are the parameter.

        Equations
        Instances For
          Dependency graph
          Dependency graph