Context-, round-, scope- and phase-bounded sequences of multistack pushdown automata #
Reachability for multistack pushdown automata is undecidable, so verification focuses on restricted classes of runs. Section 2 of [AGKR20] recalls the classes that hole-bounded sequences generalize:
MPDA.ContextBounded: at mostKcontexts, where a context uses at most one stack.MPDA.RoundBounded: at mostKrounds, where a round is one possibly empty context for each stack0, …, n - 1, in this order.MPDA.ScopeBounded: at mostKcontext switches between a push and its matching pop.MPDA.PhaseBounded: at mostKphases, where a phase pops from at most one stack (any two of its pops use the same stack) and may push on any stack.
Main definitions #
MPDA.IsContext,MPDA.IsRound,MPDA.IsPhase: contexts, rounds and phases.MPDA.ContextBounded,MPDA.RoundBounded,MPDA.ScopeBounded,MPDA.PhaseBounded.MPDA.boundedLanguage: acceptance restricted to a class of runs.
Main results #
MPDA.IsContextOf.wellNested: a balanced run on one stack is well-nested.MPDA.RoundBounded.contextBounded:Krounds give at mostK * ncontexts.MPDA.ContextBounded.scopeBounded: a sequence with at mostKcontexts isK-scope-bounded.
Implementation notes #
Positions are 0-indexed. The scope of a matched push and pop is measured by the number of
contexts of the factor from the push to the pop: K context switches means K + 1 contexts.
References #
- [S. Akshay, P. Gastin, S. Krishna, S. Roychowdhury, Revisiting Underapproximate Reachability for Multipushdown Systems] [AGKR20]
Contexts and rounds #
theorem Cslib.Automata.MPDA.IsContextOf.wellNested {n : ℕ} {Γ : Type u_1} {α : Type u_2} {State : Type u_4} {M : MPDA n State α Γ} {c c' : Config n State Γ} {v : List (α × Op n Γ)} {i : Fin n} (hv : IsContextOf i v) (hrun : M.configLTS.MTr c v c') (hnet : net i v = 0) (hk : ∀ (k : ℕ), 0 ≤ net i (List.take k v)) :
A run that uses one stack, never goes below the initial height of that stack and returns to it is well-nested.
theorem Cslib.Automata.MPDA.RoundBounded.contextBounded {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {w : List (α × Op n Γ)} (h : RoundBounded K w) :
ContextBounded (K * n) w
K rounds give at most K * n contexts.
Scope-bounded sequences #
theorem Cslib.Automata.MPDA.ContextBounded.scopeBounded {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {w : List (α × Op n Γ)} (h : ContextBounded K w) :
ScopeBounded K w
A sequence with at most K contexts is K-scope-bounded.
Phase-bounded sequences #
Bounded acceptance #
def Cslib.Automata.MPDA.boundedLanguage {n : ℕ} {Γ : Type u_1} {State : Type u_4} {Symbol : Type u_5} (M : MPDA n State Symbol Γ) (P : List (Symbol × Op n Γ) → Prop) :
Language Symbol
The language of the words with an accepting run satisfying P: acceptance restricted to the
runs of a bounded class, such as ScopeBounded K or HoleBounded K.