390 likes | 493 Views
Towards a n Efficient Algorithm for Unfolding Petri Nets . Victor Khomenko and Maciej Koutny Department of Computing Science University of Newcastle upon Tyne. Motivation. Partial order semantics of Petri nets Alleviate the state space explosion problem Efficient model checking algorithms.
E N D
Towards an Efficient Algorithm for Unfolding Petri Nets Victor Khomenko andMaciejKoutny Department of Computing Science University of Newcastleupon Tyne
Motivation • Partial order semantics of Petri nets • Alleviate the state space explosion problem • Efficient model checking algorithms
The ERV unfolding algorithm Unfplaces from M0 pe transitions enabled by M0 cut-off while pe extract eminpe if e is a cut-off event then cut-off cut-off {e} else add e and its postset into Unf UpdatePotExt(pe,Unf,e) add cut-off events and their postsets into Unf
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 P5 P3 P1
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 P6 P5 T3 P3 P1
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 P6 P5 P5 T3 P4 P3 T2 P1
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 P6 P5 P5 T3 P4 P3 P3 T2 T1 P1 P2
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 P6 P6 P5 P5 T3 T3 P4 P3 P3 T2 T1 P1 P2
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 P6 P6 P5 P5 T3 T3 P4 P3 P3 T2 T1 P1 P2 P1
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 T4 P6 P6 P5 P5 P5 T3 T3 P4 P3 P3 P4 T2 T1 P1 P2 P1
P1 P3 P5 · · · T1 T2 T3 T4 P2 P4 P6 T4 T4 T4 P6 P6 P5 P5 P5 P6 T3 T3 P4 P3 P3 P4 T2 T1 P1 P2 P1
The ERV unfolding algorithm Unfplaces from M0 pe transitions enabled by M0 cut-off while pe extract eminpe if e is a cut-off event then cut-off cut-off {e} else add e and its postset into Unf UpdatePotExt(pe,Unf,e) add cut-off events and their postsets into Unf
P7 T6 P6 T5 P5 T4 P4 T3 P3 T2 P2 T1 P1
P7 T6 P6 T5 P5 T4 P4 T3 P3 T2 P2 {P1} T1 P1
P7 T6 P6 T5 P5 T4 P4 T3 P3 T2 P2 {P1} T1 P1
P7 T6 P6 T5 P5 T4 P4 T3 P3 T2 P2 {P1} T1 P1
P7 T6 P6 T5 P5 {P5} T4 P4 T3 P3 T2 P2 {P1} T1 P1
P7 T6 P6 T5 {P5,P6} P5 {P5} T4 P4 T3 P3 T2 P2 {P1} T1 P1
P7 T6 {P5,P7} P6 T5 {P5,P6} P5 {P5} T4 P4 T3 P3 T2 P2 {P1} T1 P1
T1:{P1} T3: T4:{P5} T5:{P5,P6} T6:{P5,P7} Preset Trees T5:{P6} T6:{P7} T1:{P1} T4:{P5} T3: Weight = || + |{P1}| + |{P5}| + |{P6}| + |{P7}| = 4
T1:{P1} T3: T4:{P5} T5:{P5,P6} T6:{P5,P7} Preset Trees T1:{P1} T4:{P5} T5:{P5,P6} T6:{P5,P7} T3: Weight = || + |{P1}| + |{P5}| + |{P5,P6}| + |{P5,P7}| = 6
Proposition (P.Rossmanith).Building a minimal-weightpreset tree is an NP-complete problem in the sizeof a Petri net, even if all transition presets have the size 3.
Proposition (P.Rossmanith).Building a minimal-weightpreset tree is an NP-complete problem in the sizeof a Petri net, even if all transition presets have the size 3.
Proposition (P.Rossmanith).Building a minimal-weightpreset tree is an NP-complete problem in the sizeof a Petri net, even if all transition presets have the size 3. P2 P3 P1 P4
Proposition (P.Rossmanith).Building a minimal-weightpreset tree is an NP-complete problem in the sizeof a Petri net, even if all transition presets have the size 3. T2 P2 P3 T5 T1 T3 P1 P4 T4
Proposition (P.Rossmanith).Building a minimal-weightpreset tree is an NP-complete problem in the sizeof a Petri net, even if all transition presets have the size 3. T2 P2 P3 T5 T1 T3 P1 P4 T4
T1:{P1,P2} T2:{P2,P3} T3:{P3,P4} T4:{P1,P4} T5:{P2,P4} T1:{P1} T2:{P3} T5:{P4} T4:{P1} T3:{P3} {P2} {P4}
{P1,P2,P3} {P1,P2,P4} {P1,P2,P5} {P1,P3,P4} {P1,P4}
{P1,P2,P3} {P1,P2,P4} {P1,P2,P5} {P1,P3,P4} {P1,P4} {P1,P2}
{P3} {P4} {P5} {P1,P3,P4} {P1,P4} {P1,P2}
{P3} {P4} {P5} {P1,P3,P4} {P1,P4} {P1,P2} {P1,P4}
{P3} {P4} {P5} {P3} {P1,P2} {P1,P4}
{P3} {P4} {P5} {P3} {P1,P2} {P1,P4} {P1}
{P3} {P4} {P5} {P3} {P2} {P4} {P1}
{P3} {P4} {P5} {P3} {P2} {P4} {P1}
{P3} {P4} {P5} {P3} {P2} {P4} {P1}
Building Preset Trees function BuildTree({A1,...,Ak}) TS {Tree(A1,),…,Tree(Ak,)} while|TS|>1 choose Tree(A',·)TSand Tree(A'',·)TS such thatA‘A'' and |A'A''| is maximal I A'A'‘ T {Tree(B\I,ts) | Tree(B,ts) TS and IB} T= {ts | Tree(I,ts) TS and ts } TS TS\{Tree(B, ·) TS | IB} TS TS {Tree(I, T T=)} /* |TS|=1 */ return the remaining tree Tr TS
Experimental Results • Small presets (2-3 places): • improvements for some examples • Medium-size presets (5-6 places): • improvements for all examples • Large presets (7 and more places): • significant improvements for all examples