Petri automata for Kleene Allegories
Talk at the Rapido meeting Paul Brunet & Damien Pous
Plume team – LIP, CNRS, ENS de Lyon, Inria, UCBL, Université de Lyon, UMR 5668 June 19, 2015
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri automata for Kleene Allegories Talk at the Rapido meeting Paul - - PowerPoint PPT Presentation
Petri automata for Kleene Allegories Talk at the Rapido meeting Paul Brunet & Damien Pous Plume team LIP, CNRS, ENS de Lyon, Inria, UCBL, Universit de Lyon, UMR 5668 June 19, 2015 Paul Brunet Kleene Allegories & Petri automata
Talk at the Rapido meeting Paul Brunet & Damien Pous
Plume team – LIP, CNRS, ENS de Lyon, Inria, UCBL, Université de Lyon, UMR 5668 June 19, 2015
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T)
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T,
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T, there is k such that (i, k) ∈ (R ∩ S) (k, j) ∈ T
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T, there is k such that (i, k) ∈ (R ∩ S) (k, j) ∈ T thus (i, k) ∈ R (i, k) ∈ S (k, j) ∈ T
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T, there is k such that (i, k) ∈ (R ∩ S) (k, j) ∈ T thus (i, k) ∈ R (i, k) ∈ S (k, j) ∈ T thus
(i, j) ∈ S ◦ T
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T, there is k such that (i, k) ∈ (R ∩ S) (k, j) ∈ T thus (i, k) ∈ R (i, k) ∈ S (k, j) ∈ T thus
(i, j) ∈ S ◦ T hence (i, j) ∈ (R ◦ T) ∩ (S ◦ T).
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
(R ∩ S) ◦ T ⊆ (R ◦ T) ∩ (S ◦ T) Let (i, j) ∈ (R ∩ S) ◦ T, there is k such that (i, k) ∈ (R ∩ S) (k, j) ∈ T thus (i, k) ∈ R (i, k) ∈ S (k, j) ∈ T thus
(i, j) ∈ S ◦ T hence (i, j) ∈ (R ◦ T) ∩ (S ◦ T). Simple and boring : could it be done automatically ?
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX 0 | 1 | x ∈ X | e · f | e ∪ f | e⋆
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX 0 | 1 | x ∈ X | e · f | e ∪ f | e⋆
languages: Σ a finite set, σ : X → P (Σ⋆), ∅, {ǫ}, concatenation, union Rationnal languages correspond to _ : X → P (X ⋆) x → {x} .
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX 0 | 1 | x ∈ X | e · f | e ∪ f | e⋆
languages: Σ a finite set, σ : X → P (Σ⋆), ∅, {ǫ}, concatenation, union relations: S a set, σ : X → P (S × S), ∅, IdS, composition, union Rationnal languages correspond to _ : X → P (X ⋆) x → {x} .
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX 0 | 1 | x ∈ X | e · f | e ∪ f | e⋆
languages: Σ a finite set, σ : X → P (Σ⋆), ∅, {ǫ}, concatenation, union relations: S a set, σ : X → P (S × S), ∅, IdS, composition, union Rationnal languages correspond to _ : X → P (X ⋆) x → {x} .
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX Rel |= e = f if ∀S, ∀σ : X → P (S × S) , σ(e) = σ(f )
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions Kleene Algebra
e, f ∈ RegX Rel |= e = f if ∀S, ∀σ : X → P (S × S) , σ(e) = σ(f )
Rel |= e = f ⇔ e = f
Relational equivalence is decidable for regular expressions.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions KL
e, f ∈ Reg∩
X
0 | 1 | x ∈ X | e · f | e ∩ f | e ∪ f | e⋆ | e
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions KL
e, f ∈ Reg∩
X
0 | 1 | x ∈ X | e · f | e ∩ f | e ∪ f | e⋆ | e Rel |= e = f ? ⇐ ⇒ e = f
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions KL
e, f ∈ Reg∩
X
0 | 1 | x ∈ X | e · f | e ∩ f | e ∪ f | e⋆ | e Rel |= e = f e = f
a ∩ b = ∅ = σ(a) = {(x, y), (y, z)} σ(b) = {(y, z), (z, t)} σ (a ∩ b) = {(y, z)} ∅ = σ (0) a = {a} = a σ(a) = {(x, y)} σ (a) = {(y, x)} σ(a) A different approach is needed.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Expressions KL
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
u, v ∈ WX 0 | 1 | x ∈ X | u · v | u ∩ v | u ∪ v | u⋆ | u
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G(1) ≔ G(x) ≔ x G(u) ≔ G(u) G(u · v) ≔ G(u) G(v) G(u ∩ v) ≔ G(u) G(v)
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G(1) ≔ G(x) ≔ x G(u) ≔ G(u) G(u · v) ≔ G(u) G(v) G(u ∩ v) ≔ G(u) G(v)
G (a · b): a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G(1) ≔ G(x) ≔ x G(u) ≔ G(u) G(u · v) ≔ G(u) G(v) G(u ∩ v) ≔ G(u) G(v)
G (a · b): a b G ((a · b) ∩ (c · b)): a c b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G(1) ≔ G(x) ≔ x G(u) ≔ G(u) G(u · v) ≔ G(u) G(v) G(u ∩ v) ≔ G(u) G(v)
G (a · b): a b G ((a · b) ∩ (c · b)): a c b b G (((a ∩ c) · b) ∩ d): a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G(1) ≔ G(x) ≔ x G(u) ≔ G(u) G(u · v) ≔ G(u) G(v) G(u ∩ v) ≔ G(u) G(v)
G (a · b): a b G ((a · b) ∩ 1): G ((a · b) ∩ (c · b)): a c b b a b G (((a ∩ c) · b) ∩ d): a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
G ◭ H if there exists a graph morphism from H to G. G : H : a c d b a c b b ((a ∩ c) · b) ∩ d (a · b) ∩ (c · b)
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
Rel |= (a · b) ∩ c ≤ a · (b ∩ a · c) (1) a a c b a c b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Ground terms
u, v ∈ WX, Rel |= u v ⇔ G(u) ◭ G(v)
NH, 1990
The equational theory of union-free algebras of relations.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Reg∩ X
_ : Reg∩
X
→ P (WX) 0 ≔ ∅ 1 ≔ {1} x ≔ {x} e ≔ {w | w ∈ e} e · f ≔ {w · w ′ | w ∈ e and w ′ ∈ f } e ∩ f ≔ {w ∩ w ′ | w ∈ e and w ′ ∈ f } e ∪ f ≔ e ∪ f e⋆ ≔
n∈ N {w1 · · · · · wn | ∀i, wi ∈ e} .
e ∈ Reg∩
X ,
G(e) ≔ {G(w) | w ∈ e} .
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Graph languages Reg∩ X
◭S is the downwards closure of S with respect to ◭.
e, f ∈ Reg∩
X ,
Rel |= e f ⇔ ◭G(e) ⊆ ◭G(f ) Follows easily from:
TCS, 412(52):7099–7108, 2011
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Examples
(((a ∩ c) · b) ∩ d) ∪ a A B C D E F 1 2 a c d b a
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Examples
A B C D E F G H I J 1 7 2 3 4 5 6 8 b a c b a c b d a b 1 d
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b Success!
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b Failure!
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
A B C D E F 1 2 a c d b a a c d b b Failure!
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
For any e ∈ Reg∩
X ,
e
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
For any e ∈ Reg∩
X ,
A (e)
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
For any e ∈ Reg∩
X ,
L (A (e))
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
For any e ∈ Reg∩
X ,
L (A (e)) = ◭G (e).
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Petri Automata Recognition
For any e ∈ Reg∩
X ,
L (A (e)) = ◭G (e).
e, f ∈ Reg∩
X
Rel |= e f ⇔
◭G(e) ⊆ ◭G(f ) ⇔ L (A (e)) ⊆ L (A (f )).
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
G ((a · b) ∩ 1): G (a ∩ b): a b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
G ((a · b) ∩ 1): G (a ∩ b): a b a b u, v ∈ W−
X 0 | 1 | x ∈ X | u · v | u ∩ v | u ∪ v | u⋆ | u
e, f ∈ Reg∩−
X
0 | 1 | x ∈ X | e · f | e ∩ f | e ∪ f | e+ | e
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
e, f ∈ Reg∩−
X
Rel |= e f ⇔
◭G(e) ⊆ ◭G(f ) ⇔ L (A (e)) ⊆ L (A (f )).
How to compare two Petri automata? . . . not that easily! L (A1) ⊆ L (A2) if and only if there is a simulation relation ⊆ P (P1) × P (P2 P1) between the configurations of A1 and the partial maps from the places of A2 to the places of A1.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
e, f ∈ Reg∩−
X
Rel |= e f ⇔
◭G(e) ⊆ ◭G(f ) ⇔ L (A (e)) ⊆ L (A (f )).
How to compare two Petri automata? . . . not that easily! L (A1) ⊆ L (A2) if and only if there is a simulation relation ⊆ P (P1) × P (P2 P1) between the configurations of A1 and the partial maps from the places of A2 to the places of A1.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
e, f ∈ Reg∩−
X
Rel |= e f ⇔
◭G(e) ⊆ ◭G(f ) ⇔ L (A (e)) ⊆ L (A (f )).
How to compare two Petri automata? . . . not that easily! L (A1) ⊆ L (A2) if and only if there is a simulation relation ⊆ P (P1) × P (P2 P1) between the configurations of A1 and the partial maps from the places of A2 to the places of A1.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ Q1 × P (Q2) p0 p1 p2 p3 a b a q0 q1 q2 q3 q4 q5 a b b b a
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ Q1 × P (Q2) p0 p1 p2 p3 a b a q0 q1 q2 q3 q4 q5 a b b b a p0 { q0 }
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ Q1 × P (Q2) p0 p1 p2 p3 a b a q0 q1 q2 q3 q4 q5 a b b b a p0 { q0 } p1 { q1 }
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ Q1 × P (Q2) p0 p1 p2 p3 a b a q0 q1 q2 q3 q4 q5 a b b b a p0 { q0 } p1 { q1 } p2 {q2, q4}
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ Q1 × P (Q2) p0 p1 p2 p3 a b a q0 q1 q2 q3 q4 q5 a b b b a p0 { q0 } p1 { q1 } p2 {q2, q4} p3 { q1 }
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ P (P1) × P (P2 P1) 1 2 3 a b b A B C D G H I b a c b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ P (P1) × P (P2 P1) 1 2 3 a b b A B C D G H I b a c b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ P (P1) × P (P2 P1) 1 2 3 a b b A B C D G H I b a c b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ P (P1) × P (P2 P1) 1 2 3 a b b A B C D G H I b a c b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Comparing automata
⊆ P (P1) × P (P2 P1) 1 2 3 a b b A B C D G H I b a c b a b
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata. Decidability of simple automata equivalence, thus of relational equivalence for Identity-free Kleene Lattices.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata. Decidability of simple automata equivalence, thus of relational equivalence for Identity-free Kleene Lattices. Simple Petri automata equivalence is EXPSPACE-complete. This decision procedure was implemented in OCaml, and is available as an online application.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata. Decidability of simple automata equivalence, thus of relational equivalence for Identity-free Kleene Lattices. Simple Petri automata equivalence is EXPSPACE-complete. This decision procedure was implemented in OCaml, and is available as an online application.
Converting back Petri automata into expressions.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata. Decidability of simple automata equivalence, thus of relational equivalence for Identity-free Kleene Lattices. Simple Petri automata equivalence is EXPSPACE-complete. This decision procedure was implemented in OCaml, and is available as an online application.
Converting back Petri automata into expressions. Decidability with 1 and/or _.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Reduction of relational equivalence to equality of closed graph languages. Representation of closed graph languages through Petri automata. Decidability of simple automata equivalence, thus of relational equivalence for Identity-free Kleene Lattices. Simple Petri automata equivalence is EXPSPACE-complete. This decision procedure was implemented in OCaml, and is available as an online application.
Converting back Petri automata into expressions. Decidability with 1 and/or _. Complete axiomatization.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
Thank you ! The content presented here has been accepted for publication in LICS 2015. http://perso.ens-lyon.fr/paul.brunet/rklm.
Paul Brunet Kleene Allegories & Petri automata June 19, 2015
Conclusions
1
Expressions Kleene Algebra Kleene Allegories
2
Graph languages Ground terms Regular expressions with intersection and converse
3
Petri Automata Examples Recognition by Petri automata
4
Comparing automata
5
Conclusions
Paul Brunet Kleene Allegories & Petri automata June 19, 2015