Pomset Languages of Finite Step Transition Systems Jean Fanchon, Rémi Morin
LAAS CNRS Toulouse, LIF CNRS Marseille www.laas.fr/∼fanchon, www.lif.univ-mrs.fr/∼morin
Petri Nets 2009, Paris, June 24-26.
1
Context Subsets of nitely generated free monoids [Kleene][Büchi].. : MSO denability ⇔ algebraic recognizability ⇔ nite device acceptance ⇔ rational expressions.
In concurrency theory, extended to Mazurkiewicz traces [Thomas] [Ochmanski ] [Zielonka].., Message Sequence Charts [Henriksen&all] [Alur&all] [Morin].., Series-parallel pomsets [Lodaya,Weil] [Kuske].
Graphs : Algebraic recognizability vs MSO denability [Courcelle], Graph acceptors vs EMSO denability [Thomas] Pomsets without autoconcurrency [Droste, Gastin, Kuske], Labelled dags without autoconcurrency (Σ − C
-Dags) [Bollig,Leucker], subsets of Concurrency Monoids [Droste, Kuske] Consistent sets of pomsets [Arnold][Morin]
2
Content
Step Transition Systems (STS): general model of concurrent systems, marking graphs of Petri nets [Mukund], Distributed TS [Lodaya&all]. We present a natural pomset semantics and characterize the resulting languages for Deterministic STS. We investigate the languages of Finite Deterministic STS in terms of regularity and MSO denability. Relies on previous work on Local Trace pomsets [Kuske, Morin] and Regular sets of pomsets [Fanchon, Morin].
3
Outline Pomsets and logics Step transition systems and their languages Finite Deterministic STS : regularity Finite Deterministic STS : MSO denability Conclusion
4
Pomsets Σ nite alphabet , a Σ-labelled partial order is a tuple (E, ≼, l) : (E, ≼) is a nite partial order (events), l : E → Σ is a labelling c 1 a 6
d 2 b 4
c 3
c 1
a 5 d
c a 7 8 A labelled poset
9
a 6
d 2 b 4 c 7 A cut
c 3 a 5 a 8 A chain
d 9
Pomsets (P(Σ) ): isomorphism classes of LPO, denoted by any class member.
5
Pomsets t = (E, ≼, l) ∈ P(Σ), e, e′ , e” ∈ E
l transitive réduction of ≼ : e l e′ ⇔ [e ≼ e′
∧ (e ≼ e” ≺ e′ ⇒ e = e”)]
co concurrency relation : e co e′ ⇔ ¬(e ≤ e′ )
∧
¬(e′ ≤ e)
Width of t: maximal size of a cut Autoconcurrency : ∃e, e′ ∈ E.e co e′
∧
l(e) = l(e′ )
Strong concatenation : t.t′ Parallel composition : t ∥ t
6
Mazurkiewicz traces, Message sequence charts a
b
c
a
a d
b
1
1!2
2 3 4
3!4
2?1
c c
1!3
3!1
d
1?3
3?4
4?2
7
Aspects of pomsets b
b
a
a
d
a
a
a
c
c
d
a
A pomset t and an order extention.
a
b c
a a
d
b c
a
a a
d
A step extention of t and its multiset sequence representation.
a
b
c
a
a
d
A linear extention of t.
8
Representations of sets of pomsets Order Extentions
Linear Extentions
OE(E, ≼, l) = {(E, ≼′ , l) ∈ P(Σ) |≼⊆≼′ } L ⊆P(Σ) is weak if L = OE(L)
Σ∗ = {(E, ≼, l) ∈ P(Σ) | ∀e, e′ ∈ E : ¬(e co e′ )}
Step Extentions
LE(L) = OE(L) ∩ Σ⋆
S(Σ) = {(E, ≤, l) ∈ P(Σ) | ∀e, e′, e” ∈ E : e co e′ co e” ⇒ e co e”} SE(L) = OE(L) ∩ S(Σ) M (Σ) multisets on Σ: (S(Σ), .) and M (Σ)⋆ are isomorphic monoids.
9
Step extentions c
c
c c
a
b
(a||b).(c||c)
c
c
a
b
b a a.(b||c).c
N(a,b,c,c)
SE(N (a, b, c, c)) = SE({(a||b).(c||c), a.(b||c).c})
10
Basic sets of Pomsets Basis of a set: elements which are not a strict order extention of some other
B(L ⊆ P(Σ)) = {u ∈ L | ∀v ∈ L : u ∈ OE(v) ⇒ u = v} L is basic if L = B(L) Weak and basic sets are in one-to-one correspondance
OE(L) = OE(B(L))
B(L) = B(OE(L))
11
MSO Logics of pomsets x, y, ... 1st order variables, to be instanciated by events , X, Y, .... monadic 2nd order variables to be instanciated by sets of events labeling and partial ordering induce two atoms : Pa (x) , x l y Formulae M SO(Σ, l)
φ := Pa (x) | x l y | x = y |φ
∧
φ | ¬φ | ∃x.φ
x ∈ X | ∃X.φ L ⊆ P(Σ) is MSO-denable i it exists an MSO-formula φ s.t. L = L(φ) = {u ∈ P(Σ) | t |= φ}.
12
Logics of pomsets n times c
c
c
c = t m,n
p
p
p
p
p
p
m times L = {tm,n} is F O(Σ, ≼) denable: [∀x, y.Pp (y)
∧
x ≼ y ⇒ Pp (x)]
∧
[∀x.(Pc (x) ⇒ ∃y.y l x
∧
Pp(y))]
∧
....
LE(L) is not regular, thus not M SO(Σ, ≼) denable
13
Logics of pomsets ≼ is MSO denable from l x ≼ y ≡ ∀X.[∀v, z.v ∈ X
∧
v l z ⇒ z ∈ X]
∧
x∈X⇒y∈X
If L = OE(L) is MSO denable then SE(L) = L ∩ S(Σ) is MSO denable
L = L(φ) ⇒ SE(L) = L(φ
∧
∀x, y, z.(x co y
∧
xco z
∧
y ̸= z) ⇒ y co z)
If L is MSO denable then B(L) is MSO denable
L = L(φ) ⇒ B(L) = L(φ
∧
w l z 99K w l z
∀x, y.(x l y) ⇒ ¬φx,y ) where ∧ ∧
w ̸= x
z ̸= y
14
Step transition systems and their pomsets languages
15
Step transition systems b a
c
b
(b,c) b
a c
(a,b)
a
c
c
c (a,c)
a
c
a
. b
. a
b
b Step sequences: a.b.c, a.c.b, b.a.c, b.c.a, (a ∥ b).c , a.(b ∥ c), b.(a ∥ c) Pomsets from complete conict-free unfoldings : a.c ∥ b and a ∥ b.c Firing pomsets [Grabowski]: OE(a.c ∥ b, a ∥ b.c)
16
Step transition systems (Denition) An STS on the alphabet Σ: a tuple A = (Q, →, qin , F ) where
Q set of states, qin ∈ Q initial state, F ⊆ Q set of nal states →⊆ Q × M (Σ) × Q transition relation : for any q, q ′ ∈ Q and m, m1 , m2 ∈ M (Σ): ∅ q −→ q ′ ⇒ q = q ′ m2 m m1 ′ m = m1 ⊕ m2 ∧ q −→ q ⇒ ∃q1 : q −→ q1 −→ q ′ Notation
u1 .u2 u1 u2 ′ q −→ q i ∃q1 : q −→ q1 −→ q ′ for u1 , u2 ∈ M (Σ)∗
17
Pomset semantics of STS 1: Step closure semantics The step language SL(A) of A is
SL(A) = {u ∈
M (Σ)⋆ |∃q
∈ F : qin
u −→ q}
Note that SL(A) is step-weak:
SE(SL(A)) = SL(A) The pomset language L(A) of A is the step-closure of SL(A)
L(A) = {u ∈ P(Σ)|SE(u) ⊆ SL(A)} Note that SE(L(A)) = SL(A) and that L(A) is step-closed: for all t ∈
P(Σ), SE(t) ⊆ SE(L(A)) ⇔ t ∈ L(A) 18
Step transition systems : example
c
c
(c,c)
(c,c) c
(b,c) b c
a
b
c
b
(a,b)
(a,b) c
c b
b (b,c)
c
a a
b
a
c
c b
b (b,c)
a
b
a c
Step language SL(A) = SE{(a ∥ b).(c ∥ c), a.(b ∥ c).c} = SE(N (a, b, c, c)) Pomset language L(A) = OE(N (a, b, c, c)), Base(L(A)) = N (a, b, c, c)
19
Step extentions and step-closure c
c
c
c
c
c
a
b
a
b
a
b
u=N(a,b,c,c) v=N(b,a,c,c)
w=a.c||b.c
SE(w) = SE({u, v}) = SE({(a||b).(c||c), a.(b||c).c, b.(a||c).c})
20
Pomset semantics of STS 2: processes c
p
c
p
c
p
E’
c
p
E p
p
Min(E\E’)
t = (E, ≼, l) , prex t′ = t/E ′ , (p, c) = l(M in≼(E \ E ′ ) , u = ppcpc ∈ LE(t′ ) ,
ppcpc
q i
q
c p
q’
q f
21
Pomset semantics of STS 2: processes (PN ring pomsets) t = (E, ≼, l) is a process of A , t ∈ ℘(A), i for any prex t′ = (E ′ , ≼ /E ′ , l/E ′ ) of t and any u ∈ LE(t′ ) , then
qin
u m −→ q −→ q ′ −→ qf . where m = l(M in≼ (E \ E ′ ))
t is a nal process, t ∈ ℘f (A) , if furthermore LE(t) ⊆ SL(A)
Lemma: P ref (L(A)) ⊆ ℘(A) and L(A) ⊆ ℘f (A)
22
Pomset semantics of Deterministic STS A is deterministic if for any q, q ′ , q” ∈ Q and m ∈ M (Σ) : m m ′ q −→ q ∧ q −→ q” ⇒ q ′ = q”
Theorem: If A is deterministic, ℘(A) = P ref (L(A)) and ℘f (A) = L(A)
23
Languages of Deterministic STS Remark:if A is deterministic for any u, v ∈
M (Σ)⋆ , such that
u v ′ q −→ q and q −→ q” ,
if LE(u) ∩ LE(v) ̸= ⊘ , then q ′ = q”
Lemma: K ⊆ M (Σ)⋆ is the step language of a DSTS i SE(K) = K and for any u, v ∈ M (Σ)⋆ , LE(u) ∩ LE(v) ̸= ⊘ ⇒ K/u = K/v
24
A characterization of DSTS languages L ⊆ Pnac (Σ) is consistent [Arnold] : for any u, v ∈ P ref (L):LE(u) ∩ LE(v) ̸= ⊘ ⇒ u = v
L ⊆ P(Σ) is quasi-consistent for any u, v ∈ P ref (L): LE(u) ∩ LE(v) ̸= ⊘ ⇒ L/u = L/v
Theorem:
L ⊆ P(Σ) is the pomset language of a Deterministic STS i it is step closed and quasi-consistant
25
Languages of Finite DSTS :regularity
26
Regular sets of pomsets: Prexes and Residues c 1 a 6
d 2 b 4 c 7 An ideal
c 3
c
a 5 a 8
d b
d 9
c a
a
d c Prefix
a Residue
An ideal and its complement underly a prex and a residue In case of autoconcurrency, residues are not uniquely dened: a ∥ b and a.b are residues of a ∥ (a.b) after a The residue of r after u is a set denoted r/u
27
Regular sets of pomsets [FM02] the residue of L ⊆
P(Σ) after u is L/u = {v ∈ P(Σ)|∃r ∈ L : v ∈ r/u}
def the residue equivalence ≃L induced by L is u ≃L v ≡ L/u = L/v L is regular i ≃L is nite Coincides with usual denition for words, coincides with the regularity of LE(L) for traces and MSC.
28
Properties of regular sets of pomsets [FM02] Closed for union, concatenation, iteration, parallel composition Closed for image and reverse image through renaming and projection
L regular ⇒ OE(L) regular ⇒ SE(L) regular ⇒ LE(L) regular If L is step-closed: L regular ⇔ SE(L) regular
29
Languages of nite DSTS Theorem : • L
P(Σ) the following are equivalent:
is the pomset language of a nite DSTS
• SE(L) • L
Let L ⊆
is regular, width-bounded and quasi-consistent
is regular, step-closed, width-bounded and quasi-consistent
Lemma : If L is a nite DSTS language then LE(L) is regular and for all m ∈ M (Σ), L(m) is regular where L(m) is the sets of words u ∈ Σ⋆ s.t. u.m ∈ P ref (L)
30
Languages of nite DSTS: MSO denability
31
Prime bounded sets of pomsets [Kuske 98] A pomset t is k -prime-bounded if any prex cuts at most k prime intervals.
c
p
c
p
c
p
c
p
p
p
Equivalently: t = (E, ≼, l) is k -prime-bounded if it has a k chains covering, i.e. a mapping λ : E →2[k] : such that ∀e, e′ ∈ E ,
e l e′ ⇒ λ(e) ∩ λ(e′ ) ̸= ⊘ and e co e′ ⇒ λ(e) ∩ λ(e′ ) = ⊘
Theorem [FM03): If L ⊆
P(Σ) is prime bounded and MSO denable then L is regular
Trace monoid M (Σ × 2[k] , ∥), projection π : Σ × 2[k] −→ Σ, then
L′ = π −1 (L) ∩ M (Σ × 2[k] , ∥) is a denable subset and thus regular. Furthermore L = π(L′ ).
32
MSO denable and width-bounded step-closed languages are regular. Theorem [F05]:
Let L be a width-bounded and step-closed language, then
L MSO denable ⇒ L regular Proof :
L MSO denable ⇒ SE(L) MSO denable ⇒ SE(L) regular ⇒ L regular 1. If L is step-closed, it is weak. If furthermore L is MSO denable, then SE(L) = L ∩ S(Σ) is MSO denable too
2. If L is width-bounded by k , then SE(L) is prime bounded by k 2 . SE(L) being MSO denable then SE(L) is regular.
3. L is step closed thus SE(L) regular ⇒ L regular .
33
Relating regularity and MSO denability of nite DSTS languages A scheme of properties for step closed languages and additional properties for nite DSTS languages.
B(L) regular
B(L) definable Bounded 1
L= OE(L) regular
2
SE(L) regular
L definable
SE(L) definable Width bounded
Proof of 1) Result of [KM00] for pomsets without autoconcurrency, extended to width-bounded sets of pomsets. Proof of 2) Adapt the proof of [KM00] to autoconcurrency using a technique from graph theory [Courcelle]
34
The basis of a nite DSTS language is prime bounded If t = (E, ≼, l) has width ≤ k , then t has a k -chains partition: a partition of E , C = {D1 , ..., Dk }, E = ⊎0 .φ](X) ≡ ∃y, Y.P ref (Y ) ∧ (X ⊎ {y} = Y ) ∧ Pa (y) ∧ φ(Y ) t, C |= φ U ntil ψ [φU ntilψ](X) ≡ ∃Y.P ref (Y )∧X ⊂ Y ∧ψ(Y )∧∀Z.[P ref (Z)∧X ⊆ Z ⊂ Y ⇒48 φ(Z)]