Pop certificates and continuations #
Compressed pop paths, parse continuations, and rule certificates used by the scheduler.
Rule certificates used by the scheduler #
Canonical compression of a nonempty augmented-pop path #
A nonempty top-to-bottom sequence of augmented flag pops. This is the semantic object extracted from a maximal unary portion of the concrete parse before one productive event.
- one {T : Type} {g : IndexedGrammar T} {A B : g.nt} {f : g.flag} (edge : AugPop g f A B) : PopPath g A [f] B
- cons {T : Type} {g : IndexedGrammar T} {A B C : g.nt} {f : g.flag} {flags : List g.flag} (edge : AugPop g f A B) (rest : PopPath g B flags C) : PopPath g A (f :: flags) C
Instances For
Neutral prefixes may be absorbed into the newly pre-saturated augmented pop relation.
Compress a syntactically nonempty concrete flag string.
Equations
- IndexedGrammar.Aho.compressedFlags g f [] = IndexedGrammar.Aho.cflagBase g f
- IndexedGrammar.Aho.compressedFlags g f (f' :: flags) = IndexedGrammar.Aho.cflagComp g (IndexedGrammar.Aho.cflagBase g f) (IndexedGrammar.Aho.compressedFlags g f' flags)
Instances For
Absorb a neutral prefix into the first edge of a nonempty compressed pop path.
The canonical compressed relation denotes exactly the path's concrete flag string.
The endpoints of a pop path form an edge of its canonical compressed relation.
Hence the compressed block accepted by a pop path is nonempty, as required by
livePushCompress.
A pop path consumes its whole concrete block above every suffix.
Split the first edge from a path known to contain at least two concrete flags.
A route containing no binary event factors into a neutral prefix followed by a compressed pop path for exactly the inherited occurrences down through its target.
Strengthened binary-free factorization retaining the residual concrete parse. The resulting compressed path starts at the current nonterminal (the neutral prefix is absorbed into its first pre-saturated pop edge), and the residual parse is strictly smaller.
Therefore a binary-free route always yields a nonempty canonical compressed relation for the followed inherited prefix.
Parse continuations after a compressed pop #
PopContinuation p R is the exact semantic witness needed to consume the compressed block
R: an edge of R reaches a nonterminal which still has a concrete parse of the same terminal
yield over the unrepresented suffix. The scheduler may follow this witness even when it differs
from the unary choices made inside p; indexed-grammar nondeterminism only requires one accepting
continuation.
- next : g.nt
Instances For
A binary-free route to the last occurrence of a visible block produces an immediate viable continuation for that whole block. Its residual parse is strictly smaller.
A concrete top-pop parse constructor gives an immediate continuation for the base compressed flag.
Equations
- IndexedGrammar.Aho.PopContinuation.ofPop hr hlhs hc hrhs rest = { next := B, rest := rest, edge := ⋯ }
Instances For
A canonical PopPath followed by a parse of the residual stack gives a compressed-pop
continuation.
Equations
- IndexedGrammar.Aho.PopContinuation.ofPopPath parse path rest = { next := B, rest := rest, edge := ⋯ }
Instances For
A viable compressed continuation witnesses the nonemptiness side condition used when a new flag is compressed into that block.
Execute a viable compressed continuation and enter a plain residual task.
Execute a viable compressed continuation and enter a live residual task.
The binary constructor of an NFParse supplies the corresponding augmented binary edge.
The push constructor of an NFParse supplies the corresponding augmented push edge.
The terminal constructor of an NFParse supplies the corresponding augmented terminal
edge.
A concrete top-pop rule is an edge of the base compressed flag used by the machine.