First-final normalization for deterministic pushdown automata #
This file equips a DPDA with one extra bit of finite control. The bit records whether an accepting state has already been left since the most recent input-reading transition. Input transitions clear the bit, while epsilon-transitions set it when their source state is accepting. Only an unmarked copy of an original accepting state is accepting.
Consequently the normalized machine recognizes exactly the same language, but no nonempty epsilon-only path can run from one accepting configuration to another. This is the acceptance normalization used in the classical DPDA-to-LR(1) characteristic-grammar construction.
Add a bit recording whether a final state has already been left during the current epsilon phase. Reading input starts a fresh phase.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Forget the first-final bit in a normalized configuration.
Instances For
One-step simulation #
Every normalized step projects to the corresponding original step.
Lift one original step. The returned equation records exactly when the new first-final bit is set: epsilon steps preserve/set it, while input steps clear it.
Multi-step simulation and the seen-final trace invariant #
Every normalized run projects to an original run.
Lift an original run from a clear first-final bit. If the resulting bit is set, the lifted run has already visited an unmarked original final state with the same remaining input as the endpoint. In particular, no input transition has occurred since that visit.
Language preservation #
No repeated final state in an epsilon phase #
A same-input computation cannot pass through a normalized final state and then return nontrivially to the state from which it started. Before the final state the first-final marker is either already set, contradicting finality, or it is clear; in the latter case leaving the final state sets it and the nonempty return cannot restore the original clear marker.
No nonempty run starting in a normalized final configuration and consuming
no input can end in another normalized final configuration. Stating the path
with Relation.TransGen excludes the reflexive zero-step path.