Siphon

14
New Algorithms for Deciding the Siphon/Trap Property Olivia Oanea, Harro Wimmel, Karsten Wolf

description

 

Transcript of Siphon

Page 1: Siphon

New Algorithms for Deciding theSiphon/Trap Property 

Olivia Oanea, Harro Wimmel, Karsten Wolf

Page 2: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Situation-Siphon: •D ⊆ D• once empty, always empty-Trap: Q• ⊆ •Q once marked, always marked

-The siphon/trap property: Every Siphon includes a marked trap

-Necessary and sufficient for liveness in free choice nets-Sufficient for deadlock freedom in ordinary nets

-There can be exponentially many (even minimal) siphons

Brute force algorithms don‘t outperform state space methods

We propose- a reduction to SAT (2 slides)- a divide-and-conquer scheme (remaining slides)

Page 3: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Reduction to SAT

Well known:p1

p2q3

q1q2

Siphon: (q1⋁q2⋁q3)⇒(p1⋁p2)

Trap: (p1⋁p2)⇒(q1⋁q2⋁q3)

SAT: Exists satisfying assignment?

Siphon/trap: Exists siphon where all included traps are unmarked?Siphon/trap: Exists siphon where the maximal included trap is unmarked?

Maximal trap: start with S, iteratively remove places p where:

pCopy place variables p(0) .. p(n)

⋀t∈T(t•(0)⇒•t(0))⋀⋁p∈P p(0) ⋀⋀i=1..n⋀p∈P(p(i)⇔(p(i-1)⋀⋀t∈p•t•(i-1)))⋀⋀p∈P,m0(p)>0⌝p(n)

Page 4: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Results

Net |P| |T| |F| SAT INAPh10 50 40 120 0.05 3Ph20 100 80 240 0.24 >7200Ph200 1000 800 2400 119 >7200Data10 50 40 300 0.12 8Data15 75 60 600 0.36 28

Page 5: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Divide and Conquer-Decompose Petri net into open nets-Compute siphons and traps of atomic components-Condense information into interface-Unify components and update interface information

-Interface place: ≤1 producing, ≤1 consuming component

-Composition of components yields component

-[Zaitsev] There exists unique decomposition intoatomic components

- [We] run-time O(n2log*n)

Page 6: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Examples

Page 7: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Improvement

-Preserves siphon/trap property-Permits arbitrarily fine decomposition

Page 8: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Siphons/Traps and components

SiphonSiphon

Siphon Siphon

-Siphon/trap of composition decomposes into siphons/traps of components-Siphons/traps of components with equal interface compose to siphon/trap in composition

Page 9: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Example

Page 10: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Elementary Siphons/Traps-Siphon is elementary if it is a minimal one containing p, for some interface place p-Trap is elementary if it is a minimal one containing p,

for some interface place p, or some marked place p

Lemma: For evaluating the siphon/trap property, sufficient to consider- siphons that are local to one of the components- unions of elementary siphons and unions of elementary traps

Idea: Store- interfaces of elementary traps and siphons- For each elementary trap Q:

all minimal unions of elementary siphons that wrap Q

a

d

c

b

1: (a-min) a2: (b-min) b3: (c-min) ac4: (c-min) bc5: (d-min) ad6: (d-min) bd

(a-min) ac ⊆ 3(a-min) ad ⊆ 5(b-min) bc ⊆ 4(b-min) bd ⊆ 6(c-min) c ⊆ 3,4(d-min) d ⊆ 5,6

Page 11: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Composition 1: closed siphonsc

db

a

1: (a-min) a2: (b-min) b3: (c-min) ac4: (c-min) bc5: (d-min) ad6: (d-min) bd

(a-min) ac* ⊆ 3(a-min) ad ⊆ 5(b-min) bc* ⊆ 4(b-min) bd ⊆ 6(c-min) c* ⊆ 3,4(d-min) d ⊆ 5,6

1‘: (c-min) c2‘: (d-min) d3‘: (a-min) ca4‘: (a-min) da5‘: (b-min) cb6‘: (b-min) db

(c-min) ca* ⊆ 3‘(c-min) cb* ⊆ 5‘(d-min) da ⊆ 4‘(d-min) db ⊆ 6‘(a-min) a ⊆ 3‘,4‘(b-min) b ⊆ 5‘,6‘

Check 3⊕3‘: contains ac*⊕ca* … ok…Check 6⊕6‘: contains only unmarked traps …. Not ok

Formally: SAT formula

Page 12: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Composition 2: open siphonsc

d fb

a e

1: (a-min) a2: (b-min) b3: (c-min) ac4: (c-min) bc5: (d-min) ad6: (d-min) bd

(a-min) ac ⊆ 3(a-min) ad ⊆ 5(b-min) bc ⊆ 4(b-min) bd ⊆ 6(c-min) c ⊆ 3,4(d-min) d ⊆ 5,6

1‘: (c-min) c2‘: (d-min) d3‘: (e-min) ce4‘: (e-min) de5‘: (f-min) cf6‘: (f-min) df

(c-min) ce ⊆ 3‘(c-min) cf ⊆ 5‘(d-min) de ⊆ 4‘(d-min) df ⊆ 6‘(e-min) e ⊆ 3‘,4‘(f-min) f ⊆ 5‘,6‘

1‘‘ = 1: (a-min) a2‘‘ = 1: (b-min) b3‘‘= 3‘⊕3 = 4‘⊕5: (e-min) ae4‘‘= 3‘⊕4 = 4‘⊕6: (e-min) be5‘‘= 5‘⊕3 = 6‘⊕5: (f-min) af6‘‘= 5‘⊕4 = 6‘⊕6: (f-min) bf

(a-min) ae ⊆ 3‘‘,4‘‘5‘‘(a-min) af ⊆ 5‘‘,3‘‘6‘‘(b-min) be ⊆ 4‘‘,3‘‘6‘‘(b-min) bf ⊆ 6. 4‘‘5‘‘(e-min) e ⊆ 3‘‘,4‘‘(f-min) f ⊆ 5‘‘,6‘‘

Page 13: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Results

Approach exponential, but mostly in the size of the interface

-Exponentially many minimal siphons-Linear time in our approach

Example:

Page 14: Siphon

Karsten Wolf: New Algorithms for Deciding the Siphon/Trap Property

Conclusion

Algorithm 1: Reduction to SAT-Boolean formula polynomial in the size of the net-Inherits efficiency from existing SAT technology

Algorithm 2: Divide & Conquer-Efficient decomposition into arbitrarily small components-Siphons and traps are preserved in open net decomposition-Abstract shared siphon/trap information to interface-Works well if

-net can be split according to small interfaces-Net has many identical components