Hole derivations #
A hole derivation builds a sequence of transitions from three kinds of blocks, keeping track of
the open holes as chains of pending pushes: a well-nested block, a new hole made of atomic hole
segments ↓ws ↓ws ⋯ of one stack (each a push followed by a well-nested sequence), and a pop that
matches the newest push of the last open hole of its stack. These are the steps of the search of
Algorithm 1 of [AGKR20] (AddHole, AddPop and the well-nested
continuations through WR).
Every sequence built with at most K open holes is K-hole-bounded
(MPDA.HoleDerivation.holeBounded): at each position, the first pending pushes of open holes in
the sense of Definition 1 map injectively to the open chains.
Main definitions #
MPDA.HoleBlock: a block of atomic hole segments of one stack.MPDA.HoleDerivation: hole derivations with at mostKopen chains.
Main results #
MPDA.HoleDerivation.holeBounded: sequences built by hole derivations areK-hole-bounded.
References #
- [S. Akshay, P. Gastin, S. Krishna, S. Roychowdhury, Revisiting Underapproximate Reachability for Multipushdown Systems] [AGKR20]
Pending pushes #
A push pending at x stays pending at y ≥ x if no prefix of the factor after x pops below
its initial height on the stack of the push.
A push inside a well-nested factor is closed by a well-nested continuation inside that factor.
Chains of pending pushes #
A snapshot of the open holes at position x of w: at most K chains of pending pushes,
consecutive pushes of a chain separated by well-nested factors, and every other push pending at
x inside a well-nested factor of w.
Hole derivations #
A block of atomic hole segments of stack i starting at position L: pushes on stack i, each
followed by a well-nested sequence. ps lists the positions and symbols of the pushes, newest
first.
- nil {n : ℕ} {Γ : Type u_1} {α : Type u_2} {i : Fin n} {L : ℕ} : HoleBlock i L [] []
- snoc {n : ℕ} {Γ : Type u_1} {α : Type u_2} {i : Fin n} {L : ℕ} {v ws : List (α × Op n Γ)} {ps : List (ℕ × Γ)} {a : α} {γ : Γ} : HoleBlock i L v ps → WellNested ws → HoleBlock i L (v ++ (a, Op.push i γ) :: ws) ((L + v.length, γ) :: ps)
Hole derivations with at most K open holes: a well-nested block, a new hole as a block of
atomic hole segments while fewer than K holes are open, a pop matching the newest push of the
last open hole of its stack, or closing a hole without pending pushes. These are the steps of the
search of Algorithm 1 of [AGKR20].
- nil {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} : HoleDerivation K [] []
- wellNested {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {C : List (HoleChain n Γ)} {w v : List (α × Op n Γ)} : HoleDerivation K C w → WellNested v → HoleDerivation K C (w ++ v)
- hole {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {C : List (HoleChain n Γ)} {w v : List (α × Op n Γ)} {ps : List (ℕ × Γ)} {i : Fin n} : HoleDerivation K C w → C.length < K → HoleBlock i w.length v ps → HoleDerivation K (C ++ [{ stack := i, pushes := ps }]) (w ++ v)
- pop {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {pre post : List (HoleChain n Γ)} {w : List (α × Op n Γ)} {ps : List (ℕ × Γ)} {i : Fin n} {p : ℕ} {γ : Γ} {b : α} : HoleDerivation K (pre ++ { stack := i, pushes := (p, γ) :: ps } :: post) w → (∀ c ∈ post, c.stack ≠ i) → HoleDerivation K (pre ++ { stack := i, pushes := ps } :: post) (w ++ [(b, Op.pop i γ)])
- close {n : ℕ} {Γ : Type u_1} {α : Type u_2} {K : ℕ} {pre post : List (HoleChain n Γ)} {w : List (α × Op n Γ)} {i : Fin n} : HoleDerivation K (pre ++ { stack := i, pushes := [] } :: post) w → HoleDerivation K (pre ++ post) w
The open chains at the end of w: at most K chains of pushes pending at the last position,
with no other pending push, consecutive pushes of a chain separated by well-nested factors, and
the pushes of earlier chains before those of later ones.
A push on stack i at the last position joins the newest chain.
A pop on stack i matches the newest push of the last open hole of stack i.
Closing a hole without pending pushes.
A hole block opens a new chain.
Words built by hole derivations are hole-bounded: a hole derivation with at most K open
holes builds a K-hole-bounded sequence.