Langlib

Langlib.Grammars.Indexed.NormalForm.Aho.Scheduler.Completeness

Root invocation of Aho's invariant-carrying scheduler #

This file discharges the bookkeeping which is specific to the initial parse task. Initially no productive-event owner is in use, so the complete finite carrier is the free-owner pool. Once the mutual compressed runner is supplied, its plain projection is therefore an accepting bounded run.

Initially every productive-event owner is free.

Equations
Instances For
    @[simp]

    The root cursor has no persistent owners, so its logical ticket ledger is the unique empty live assignment.

    Equations
    Instances For

      The empty root ledger satisfies the strict window-addressed parking invariant.

      Productive-owner provenance on the root's empty logical projection.

      Equations
      Instances For

        The root task begins with the exact full productive-event credit and owns the whole input interval.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[irreducible]
          theorem IndexedGrammar.Aho.completeScheduleRuns {T : Type} {g : IndexedGrammar T} [Fintype g.nt] {A : g.nt} {stack : List g.flag} {w : List T} (parse : g.NFParse A stack w) :

          Ordinary protected/plain execution and copy-on-write overlay execution are constructed simultaneously by strong recursion on parse node count.

          A completed mutual compressed-runner proof supplies the ownership-preserving root schedule.

          theorem IndexedGrammar.Aho.complete_bounded_of_completeScheduleRuns {T : Type} {g : IndexedGrammar T} [Fintype g.nt] {input : List T} (parse : g.NFParse g.initial [] input) (runs : CompleteScheduleRuns parse) :
          BoundedReaches g input (21 * input.length) (initialConfig g) (finalConfig g input.length)

          The invariant-carrying mutual runner implies the concrete 21|w| completeness theorem.

          theorem IndexedGrammar.Aho.complete_bounded {T : Type} {g : IndexedGrammar T} [Fintype g.nt] {input : List T} (parse : g.NFParse g.initial [] input) :
          BoundedReaches g input (21 * input.length) (initialConfig g) (finalConfig g input.length)

          Every normal-form parse has a uniform 21|w| bounded accepting run.