SLIDE 1 A Logical Characterization
- f Timed Pushdown Languages
Manfred Droste and Vitaly Perevoshchikov1
Leipzig University
CSR 2015, Listvyanka
1Supported by the DFG Research Training Group "QuantLA"
SLIDE 2 (Dense-)Timed Pushdown Automata1 (TPDA)
TPDA are nondeterministic finite automata (NFA) equipped with: real-valued clocks timed stack NFA TA PDA TPDA ➋➌
➋ ➋ ➋
➋➌
1Abdulla, Atig, Stenman ’12
SLIDE 3 Timed Pushdown Automata1 (TPDA)
Definition A TPDA over an alphabet Σ: A = (Q❀C❀Γ❀I❀T❀F) where Q is a finite set of states C is a finite set of clocks Γ is a stack alphabet I❀F ⊆ Q are initial and final state T is a finite set of edges of the form q
a❀ ✣❀ Λ
s
q′ where:
q❀q′ ∈ Q, a ∈ Σ ✣ is a clock constraint over C, Λ ⊆ C is a set of clocks to be reset s is: pushI(✌), # or popI(✌) where ✌ ∈ Γ and I is an interval
1Abdulla, Atig, Stenman ’12
SLIDE 4
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
SLIDE 5
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0
SLIDE 6
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3
SLIDE 7
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0
SLIDE 8
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7
SLIDE 9
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7
SLIDE 10
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7
SLIDE 11
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7
SLIDE 12
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7 0.1 delay 2 x = 0✿1 ✌ ∶ 1✿1 ✌ ∶ 1✿8
SLIDE 13
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7 0.1 delay 2 x = 0✿1 ✌ ∶ 1✿1 ✌ ∶ 1✿8 a switch 2 x = 0✿1 ✌ ∶ 1✿8
SLIDE 14
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7 0.1 delay 2 x = 0✿1 ✌ ∶ 1✿1 ✌ ∶ 1✿8 a switch 2 x = 0✿1 ✌ ∶ 1✿8 0.1 delay 2 x = 0✿2 ✌ ∶ 1✿9
SLIDE 15
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7 0.1 delay 2 x = 0✿1 ✌ ∶ 1✿1 ✌ ∶ 1✿8 a switch 2 x = 0✿1 ✌ ∶ 1✿8 0.1 delay 2 x = 0✿2 ✌ ∶ 1✿9 a switch 2 x = 0✿1
SLIDE 16
TPDA: Example
Σ = {a❀b} C = {x} Γ = {✌}. A 1 2
a, push[0❀0](✌) a, pop[1❀2)(✌) b, x ≤ 2, x ∶= 0, #
A run of A:
1 x = 0 0.3 delay 1 x = 0✿3 a switch 1 x = 0✿3 ✌ ∶ 0 0.7 delay 1 x = 1 ✌ ∶ 0✿7 a switch 1 x = 1 ✌ ∶ 0 ✌ ∶ 0✿7 1 delay 1 x = 2 ✌ ∶ 1 ✌ ∶ 1✿7 b switch 2 x = 0 ✌ ∶ 1 ✌ ∶ 1✿7 0.1 delay 2 x = 0✿1 ✌ ∶ 1✿1 ✌ ∶ 1✿8 a switch 2 x = 0✿1 ✌ ∶ 1✿8 0.1 delay 2 x = 0✿2 ✌ ∶ 1✿9 a switch 2 x = 0✿1
Accepted timed word: (a❀0✿3)(a❀1)(b❀2)(a❀2✿1)(a❀2✿2)
SLIDE 17 Relative Distance Logic (RDL)1
Let Σ be an alphabet. Definition Relative distance logic RDL(Σ): consists of formulas of the form ∃X1✿✿✿∃Xn✿✬ where ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ d(X❀x) ∼ c ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ with a ∈ Σ, ∼ ∈ {<❀=❀>}, c ∈ N.
1Wilke ’94
SLIDE 18 Relative Distance Logic (RDL)1
Let Σ be an alphabet. Definition Relative distance logic RDL(Σ): consists of formulas of the form ∃X1✿✿✿∃Xn✿✬ where ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ d(X❀x) ∼ c ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ with a ∈ Σ, ∼ ∈ {<❀=❀>}, c ∈ N. Model: a timed word w = (a1❀t1)✿✿✿(an❀tn) ∈ TΣ+. (w❀✛) ⊧ d(X❀x) ∼ c 1 2 3 i ti tj ✛(x) j
position time
t1 t2 t3
t✛(x) − ti ∼ c
✛(X) ✛(X)
1Wilke ’94
SLIDE 19 Relative Distance Logic (RDL)1
Let Σ be an alphabet. Definition Relative distance logic RDL(Σ): consists of formulas of the form ∃X1✿✿✿∃Xn✿✬ where ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ d(X❀x) ∼ c ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ with a ∈ Σ, ∼ ∈ {<❀=❀>}, c ∈ N. Theorem (Wilke ’94) Let L ⊆ TΣ+ be a timed language. TFAE:
1 L is recognizable by a timed automaton 2 L is definable by a RDL(Σ)-sentence. 1Wilke ’94
SLIDE 20 Logic for Pushdown Automata1
Matching logic ML(Σ): ∃match✖✿FO(Σ❀<❀✖) Definition (Matching). A relation M ⊆ {1❀✿✿✿❀n}2 is a matching if: (x❀y) ∈ M ⇒ x < y; every x ∈ {1❀✿✿✿❀n} belongs to at most one pair in M;
1Lautemann, Schwentick, Thérien ’94
SLIDE 21 Logic for Pushdown Automata1
Matching logic ML(Σ): ∃match✖✿FO(Σ❀<❀✖) Definition (Matching). A relation M ⊆ {1❀✿✿✿❀n}2 is a matching if: (x❀y) ∈ M ⇒ x < y; every x ∈ {1❀✿✿✿❀n} belongs to at most one pair in M; M is non-crossing: ✔ ✖
1Lautemann, Schwentick, Thérien ’94
SLIDE 22 Logic for Pushdown Automata1
Matching logic ML(Σ): ∃match✖✿FO(Σ❀<❀✖) Definition (Matching). A relation M ⊆ {1❀✿✿✿❀n}2 is a matching if: (x❀y) ∈ M ⇒ x < y; every x ∈ {1❀✿✿✿❀n} belongs to at most one pair in M; M is non-crossing: ✔ ✖
1Lautemann, Schwentick, Thérien ’94
SLIDE 23
Timed Matching Logic (TML)
Definition TML(Σ) is the set of formulas of the form ∃match✖✿∃X1✿ ✿✿✿ ∃Xn✿✬ where ✬ is defined by the grammar: ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ ✖(x❀y) ∼ c ∣ d(X❀x) ∼ c ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ where a ∈ Σ, ∼ ∈ {<❀=❀>} and c ∈ N.
SLIDE 24
Timed Matching Logic (TML)
Definition TML(Σ) is the set of formulas of the form ∃match✖✿∃X1✿ ✿✿✿ ∃Xn✿✬ where ✬ is defined by the grammar: ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ ✖(x❀y) ∼ c ∣ d(X❀x) ∼ c ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ where a ∈ Σ, ∼ ∈ {<❀=❀>} and c ∈ N. Let w = (a1❀t1)✿✿✿(an❀tn) ∈ TΣ+. Then, (w❀✛) ⊧ ✖(x❀y) ∼ c iff: (✛(x)❀✛(y)) ∈ ✛(✖) 1 ✛(x) ✛(y) n
t✛(y) − t✛(x) ∼ c
SLIDE 25
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets ❀✿✿✿❀ ❀ ❀ ❀ ❀✿✿✿❀ ❀ ✿✿✿ ❀
✿✿✿
SLIDE 26
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) ❀✿✿✿❀ ❀ ✿✿✿ ❀
✿✿✿
SLIDE 27
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) A timed Dyck language DΣ(I1❀✿✿✿❀Im) consists of all timed words (b1❀t1)✿✿✿(bn❀tn) ∈ T(Σ ∪ Σ)+ such that:
✿✿✿
SLIDE 28
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) A timed Dyck language DΣ(I1❀✿✿✿❀Im) consists of all timed words (b1❀t1)✿✿✿(bn❀tn) ∈ T(Σ ∪ Σ)+ such that:
b1✿✿✿bn ∈ (Σ ∪ Σ)+ is a correctly nested sequence of brackets
SLIDE 29
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) A timed Dyck language DΣ(I1❀✿✿✿❀Im) consists of all timed words (b1❀t1)✿✿✿(bn❀tn) ∈ T(Σ ∪ Σ)+ such that:
b1✿✿✿bn ∈ (Σ ∪ Σ)+ is a correctly nested sequence of brackets the time distance between any two matching brackets aj and aj is in Ij.
SLIDE 30
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) A timed Dyck language DΣ(I1❀✿✿✿❀Im) consists of all timed words (b1❀t1)✿✿✿(bn❀tn) ∈ T(Σ ∪ Σ)+ such that:
b1✿✿✿bn ∈ (Σ ∪ Σ)+ is a correctly nested sequence of brackets the time distance between any two matching brackets aj and aj is in Ij.
SLIDE 31
Example: Timed Dyck Languages
Definition Let Σ = {a1❀✿✿✿❀am} be a set of opening brackets Let Σ = {a1❀✿✿✿❀am} be a set of corresponding closing brackets Let I1❀✿✿✿❀Im be intervals (e.g., (0❀3]❀[2❀∞), etc.) A timed Dyck language DΣ(I1❀✿✿✿❀Im) consists of all timed words (b1❀t1)✿✿✿(bn❀tn) ∈ T(Σ ∪ Σ)+ such that:
b1✿✿✿bn ∈ (Σ ∪ Σ)+ is a correctly nested sequence of brackets the time distance between any two matching brackets aj and aj is in Ij.
DΣ(I1❀✿✿✿❀Im) is defined by the sentence: ✬ = ∃match✖✿(∀x✿∃y✿(✖(x❀y) ∨ ✖(y❀x)) ∧ ∀x✿∀y✿(✖(x❀y) →
m
⋁
j=1
(Paj(x) ∧ Paj(y) ∧ ✖Ij(x❀y))))
SLIDE 32 Main Result
Theorem Let Σ be an alphabet and L ⊆ TΣ+ a timed language. TFAE:
1 L is recognizable by a TPDA. 2 L is definable by a TML(Σ)-sentence.
SLIDE 33 Main Result
Theorem Let Σ be an alphabet and L ⊆ TΣ+ a timed language. TFAE:
1 L is recognizable by a TPDA. 2 L is definable by a TML(Σ)-sentence.
Corollary It is decidable, given an alphabet Σ and a sentence ✥ ∈ TML(Σ), whether there exists a timed word w ∈ TΣ+ with w ⊧ ✥.
SLIDE 34
Proof
NFA TIMED PDA TPDA NFA_TREE TIMED_TREE PDA_TREE TPDA_TREE
MSO RDL ML TML MSO ? ? ?
SLIDE 35
Proof
NFA TIMED PDA TPDA NFA_TREE TIMED_TREE PDA_TREE TPDA_TREE
MSO RDL ML TML MSO ? ? ?
? ? ? ? ?
SLIDE 36 Proof
NFA TIMED PDA TPDA vPDA1 NFA_TREE TIMED_TREE PDA_TREE TPDA_TREE
MSO RDL ML TML MSO ? ? ? MSO
1Alur, Madhusudan ’04
SLIDE 37 Visibly Pushdown Automata1 (vPDA)
Let Σpush, Σ# and Σpop be pairwise disjoint alphabets Let Σ = Σpush ∪ Σ# ∪ Σpop and ˜ Σ = ⟨Σpush❀Σ#❀Σpop⟩ Definition A vPDA over ˜ Σ is a tuple A = (Q❀Γ❀I❀T❀F) where: Q is a finite set of states, Γ is a stack alphabet I❀F ⊆ Q are sets of initial resp. final states T = T push ∪ ⋅ T # ∪ ⋅ T pop where:
T push ⊆ Q × Σpush × Γ × Q T # ⊆ Q × Σ# × Q T pop ⊆ Q × Σpop × (Γ ∪ ⋅ {}) × Q
Accepted language: L(A) ⊆ Σ+.
1Alur, Madhusudan ’04
SLIDE 38 Logic for Visibly Pushdown Languages1
Let Σpush, Σ# and Σpop be pairwise disjoint alphabets Let Σ = Σpush ∪ Σ# ∪ Σpop and ˜ Σ = ⟨Σpush❀Σ#❀Σpop⟩ Definition Logic MSO(˜ Σ) is defined as: ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ x ∈ X ∣ match(x❀y) ∣ ✬ ∨ ✬ ∣ ¬✬ ∣ ∃x✿✬ ∣ ∃X✿✬ where a ∈ Σ. Defined language of a sentence ✬ ∈ MSO(˜ Σ): L(✬) ⊆ Σ+. Theorem1 Let L ⊆ Σ+ be a language. TFAE:
1 L is recognizable by a vPDA over ˜
Σ.
2 L is MSO(˜
Σ)-definable.
1Alur, Madhusudan ’04
SLIDE 39 Decomposition of TPDA
➋ ➋ ➋ ➋
➌ TPDA
✙ ∶ Γk❀n → Σ
∩
vPDA
Γk❀n
➋ ➋ ➋ ➋
➌ "Primitive" TPDL Tk❀n ⊆ TΓk❀n Extended alphabet Γk❀n = Σ× (P(k))n ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
clock constraints
× {0❀1}n ÜÜÜÜÜÜÜÜÜÜÜÜÜ
clock resets
× P(k)
×{push❀#❀pop} ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
stack commands
n ∶= number of global clocks k ∶= maximal number appearing in constraints P(k) ∶= {[0❀0]❀(0❀1)❀[1❀1]❀✿✿✿❀(k − 1❀k)❀[k❀k]❀(k❀∞)}
SLIDE 40 Decomposition of TPDA
➋ ➋ ➋ ➋
➌ TPDA
✙ ∶ Γk❀n → Σ
∩
vPDA
Γk❀n
➋ ➋ ➋ ➋
➌ "Primitive" TPDL Tk❀n ⊆ TΓk❀n Theorem Let L ⊆ TΣ+. TFAE:
1 L is a timed pushdown language. 2 There exist k❀n ∈ N and a vPDL L′ ⊆ Γk❀n+ with
L = ✙(L′ ∩ Tk❀n)
SLIDE 41 Decomposition of TML
✖(x❀ y) ∼ c d(X❀ x) ∼ c
TML
✙ ∶ Γk❀n → Σ
∩
match(x❀ y)
MSO
Γk❀n
➋ ➋ ➋ ➋
➌ "Primitive" TPDL Tk❀n ⊆ TΓk❀n Theorem Let L ⊆ TΣ+. TFAE:
1 L is TML-definable. 2 There exist k❀n ∈ N and a vPDL L′ ⊆ (Γk❀n)+ with
L = ✙(L′ ∩ Tk❀n)
SLIDE 42 Future work
1 Weighted TPDA 2 TPDA with ✧-transitions
✖✿ ❀✖
SLIDE 43 Future work
1 Weighted TPDA 2 TPDA with ✧-transitions 3 Are TDPA without global clocks expressively equivalent to
∃match✖✿FO(<❀✖∼c)?
SLIDE 44 Future work
1 Weighted TPDA 2 TPDA with ✧-transitions 3 Are TDPA without global clocks expressively equivalent to
∃match✖✿FO(<❀✖∼c)?
4 Connection to timed tree automata
SLIDE 45 Future work
1 Weighted TPDA 2 TPDA with ✧-transitions 3 Are TDPA without global clocks expressively equivalent to
∃match✖✿FO(<❀✖∼c)?
4 Connection to timed tree automata 5 A Chomsky-Schützenberger characterization
SLIDE 46 Future work
1 Weighted TPDA 2 TPDA with ✧-transitions 3 Are TDPA without global clocks expressively equivalent to
∃match✖✿FO(<❀✖∼c)?
4 Connection to timed tree automata 5 A Chomsky-Schützenberger characterization
THANK YOU!