Aho machine transitions #
Zipper configurations, finite composite certificates, and the mathematical transition relation.
Zipper configurations and finite composite certificates #
One logical work square, including the unique active-head marker.
Instances For
Equations
- IndexedGrammar.Aho.WorkSlot.instFintype = Fintype.ofInjective (fun (s : IndexedGrammar.Aho.WorkSlot g) => (s.active, s.symbol)) ⋯
Forget the work head.
Instances For
Encode the work cursor without losing its active position.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The marked slot word retains the whole cursor, not merely its underlying work word.
A composite configuration: inputPos input symbols have already been compared, and
work is the marked work-tape zipper.
- inputPos : ℕ
- work : WorkCursor g
Instances For
The initial composite configuration on every input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The final composite configuration after all n input symbols have been compared.
Equations
- IndexedGrammar.Aho.finalConfig g n = { inputPos := n, work := { left := [IndexedGrammar.Aho.WorkSym.dollar], focus := IndexedGrammar.Aho.WorkSym.hash, right := [] } }
Instances For
Finite evidence selecting one of Aho's composite moves. All fields range over types fixed by the grammar, so this is a finite certificate alphabet.
- plainBinary {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.nt → CompositeCert g
- plainTerminal {T : Type} {g : IndexedGrammar T} : g.nt → T → CompositeCert g
- plainPushSkip {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.flag → CompositeCert g
- plainPushUse {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.flag → CompositeCert g
- liveBinaryBoth {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.nt → CompositeCert g
- liveBinaryLeft {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.nt → CompositeCert g
- liveBinaryRight {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.nt → CompositeCert g
- livePushFresh {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.flag → CompositeCert g
- livePushCompress {T : Type} {g : IndexedGrammar T} : g.nt → g.nt → g.flag → CFlag g → IndexMark → CompositeCert g
- popPlain {T : Type} {g : IndexedGrammar T} : CFlag g → IndexMark → g.nt → g.nt → CompositeCert g
- popLive {T : Type} {g : IndexedGrammar T} : CFlag g → IndexMark → g.nt → g.nt → CompositeCert g
- matchTerminal {T : Type} {g : IndexedGrammar T} : T → CompositeCert g
- eraseIndex {T : Type} {g : IndexedGrammar T} : CFlag g → IndexMark → CompositeCert g
- returnFrame {T : Type} {g : IndexedGrammar T} : CompositeCert g
Instances For
Equations
- One or more equations did not get rendered due to their size.
Semantics of one finite composite certificate on a fixed input word.
The clauses are Aho's moves 1--6, split into their nondeterministic subcases. The paper's
active hat is represented by WorkCursor.focus; consequently every equality below also fixes
the new work-head position.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One composite move is a move selected by some finite certificate.
Equations
- IndexedGrammar.Aho.CompositeStep g input c c' = ∃ (cert : IndexedGrammar.Aho.CompositeCert g), IndexedGrammar.Aho.CertStep g input cert c c'