39
Towards an Efficient Algorithm for Unfolding Petri Nets Victor Khomenko and Maciej Koutny Department of Computing Science University of Newcastle upon Tyne

Towards a n Efficient Algorithm for Unfolding Petri Nets

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Towards an 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

The ERV unfolding algorithm

Unf places from M0

pe transitions enabled by M0

cut-off

while pe

extract emin pe

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

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

P1

P3

P5

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

P1

P3

P5P6

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

P1

P3

P5P6

P4

P5

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

T1P1

P3

P5P6

P4

P5

P2

P3

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

T3

T1P1

P3

P5P6

P4

P5

P2

P3

P6

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

T3

T1P1

P3

P5P6

P4

P5

P2

P3

P6

P1

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

T3

T1

T4

P1

P3

P5P6

P4

P5

P2

P3

P6

P1

P4

P5

·T1

·T2

·T3 T4

P1 P3 P5

P2 P4 P6

T4

T3

T4

T2

T3

T1

T4

P1

P3

P5P6

P4

P5

P2

P3

P6

P1

P4

P5 P6

The ERV unfolding algorithm

Unf places from M0

pe transitions enabled by M0

cut-off

while pe

extract emin pe

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

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1 {P1}

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1 {P1}

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1

{P1}

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1

{P1}

{P5}

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1

{P1}

{P5}

{P5,P6}

P7

P1

P2

P3

P4

P5

P6

T6

T5

T4

T3

T2

T1

{P1}

{P5}

{P5,P6}

{P5,P7}

T3:

T1:{P1}

T4:{P5}

T5:{P5,P6}

T6:{P5,P7}

Preset Trees

T3:

T1:{P1} T4:{P5}

T5:{P6} T6:{P7}

Weight = || + |{P1}| + |{P5}| + |{P6}| + |{P7}| = 4

T3:

T1:{P1}

T4:{P5}

T5:{P5,P6}

T6:{P5,P7}

Preset Trees

T3:

T1:{P1} T4:{P5} T5:{P5,P6} T6:{P5,P7}

Weight = || + |{P1}| + |{P5}| + |{P5,P6}| + |{P5,P7}| = 6

Proposition (P.Rossmanith). Building a minimal-weight preset tree is an NP-complete problem in the size of a Petri net, even if all transition presets have the size 3.

Proposition (P.Rossmanith). Building a minimal-weight preset tree is an NP-complete problem in the size of a Petri net, even if all transition presets have the size 3.

Proposition (P.Rossmanith). Building a minimal-weight preset tree is an NP-complete problem in the size of a Petri net, even if all transition presets have the size 3.

P2 P3

P4P1

Proposition (P.Rossmanith). Building a minimal-weight preset tree is an NP-complete problem in the size of a Petri net, even if all transition presets have the size 3.

P2 P3

P4P1

T2

T3T1

T4

T5

Proposition (P.Rossmanith). Building a minimal-weight preset tree is an NP-complete problem in the size of a Petri net, even if all transition presets have the size 3.

P2 P3

P4P1

T2

T3T1

T4

T5

T2:{P2,P3}

T1:{P1,P2}

T3:{P3,P4}

T4:{P1,P4}

T5:{P2,P4}

T1:{P1} T5:{P4}T2:{P3} T4:{P1}

{P2} {P4}

T3:{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}

{P1,P2}

{P4} {P5} {P1,P3,P4} {P1,P4}{P3}

{P1,P2}

{P4} {P5} {P1,P3,P4} {P1,P4}{P3}

{P1,P2} {P1,P4}

{P4} {P5} {P3}{P3}

{P1,P2} {P1,P4}

{P4} {P5} {P3}{P3}

{P1,P2} {P1,P4}

{P1}

{P4} {P5} {P3}{P3}

{P2} {P4}

{P1}

{P4} {P5} {P3}{P3}

{P2} {P4}

{P1}

{P4} {P5} {P3}{P3}

{P2} {P4}

{P1}

function BuildTree({A1, ..., Ak})

TS {Tree(A1, ),…,Tree(Ak, )}

while |TS|>1

choose Tree(A', · ) TS and Tree(A'', · ) TS

such that A‘ A'' and |A'A''| is maximal

I A'A'‘

T {Tree(B \ I, ts) | Tree(B, ts) TS and I B}

T= {ts | Tree(I,ts) TS and ts }

TS TS\{Tree(B, ·) TS | I B}

TS TS {Tree(I, T T=)}

/* |TS|=1 */

return the remaining tree Tr TS

Building Preset Trees

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