Petri Nets and Model Checking Natasa Gkolfi University of Oslo - - PowerPoint PPT Presentation

petri nets and model checking
SMART_READER_LITE
LIVE PREVIEW

Petri Nets and Model Checking Natasa Gkolfi University of Oslo - - PowerPoint PPT Presentation

Petri Nets and Model Checking Natasa Gkolfi Petri Nets and Model Checking Natasa Gkolfi University of Oslo March 31, 2017 Petri Nets and Model Petri Nets Checking Natasa Gkolfi Petri Nets : mathematically founded formalism


slide-1
SLIDE 1

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets and Model Checking

Natasa Gkolfi

University of Oslo

March 31, 2017

slide-2
SLIDE 2

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets

Petri Nets :

◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems

slide-3
SLIDE 3

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets

Petri Nets :

◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems ◮ Invented by C.A.Petri

slide-4
SLIDE 4

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets

Petri Nets :

◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems ◮ Invented by C.A.Petri

They are consisting of:

◮ places ◮ transitions ◮ arcs ◮ tokens ◮ initial marking

p1 p2 t1 1 1 t2 1 2

slide-5
SLIDE 5

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-6
SLIDE 6

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-7
SLIDE 7

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-8
SLIDE 8

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-9
SLIDE 9

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-10
SLIDE 10

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-11
SLIDE 11

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-12
SLIDE 12

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-13
SLIDE 13

Petri Nets and Model Checking Natasa Gkolfi

Petri Nets - Mutual Exclusion

s p1 p2 p3 p4 t1 t2 t3 t4

slide-14
SLIDE 14

Petri Nets and Model Checking Natasa Gkolfi

Colored Petri nets

High-level Petri nets

The extension of Petri nets (called place/transition nets) with abstract data types. Colored Petri nets COLORSET(TYPE) Guard EXPR COLORS(TYPE VALUES)

slide-15
SLIDE 15

Petri Nets and Model Checking Natasa Gkolfi

Example: Dining Philosophers

Rice Dish

ph1 ph5 ph4 ph3 ph2 cs1 cs2 cs4 cs3 cs5

  • pher system is modelled by the CP-net shown below. Th
slide-16
SLIDE 16

Petri Nets and Model Checking Natasa Gkolfi

Example: Dining Philosophers

Eat PH Take Chopstick Think PH PH.all() p p Chopsticks(p) Chopsticks(p) p p Put Down Chopstick Unused Chopsticks CS CS.all()

val n = 5; color PH = index ph with 1..n; color CS = index cs with 1..n; var p: PH; fun Chopsticks(ph(i)) = 1`cs(i)++1`cs(if i=n then 1 else i+1);

slide-17
SLIDE 17

Petri Nets and Model Checking Natasa Gkolfi

State Space

State Space

A directed graph having a node for each reachable marking and an arc for each occurring binding element.

slide-18
SLIDE 18

Petri Nets and Model Checking Natasa Gkolfi

State Space

State Space

A directed graph having a node for each reachable marking and an arc for each occurring binding element. There is one to one correspondence between the paths in the state space and the occurrence sequences (where all steps consisting of a single binding element)

slide-19
SLIDE 19

Petri Nets and Model Checking Natasa Gkolfi

State Space

State Space

A directed graph having a node for each reachable marking and an arc for each occurring binding element. There is one to one correspondence between the paths in the state space and the occurrence sequences (where all steps consisting of a single binding element) The strongly-connected-component graph (SCC graph) is the graph derived from the state space where each node is a SCC of the state space.

SCC graph

◮ is an acyclic graph ◮ fewer nodes than the ss mean that there exist infinite

  • ccurrence sequences

◮ more efficient since often much smaller than the ss

slide-20
SLIDE 20

Petri Nets and Model Checking Natasa Gkolfi

Example: Dining Philosophers State Space

1 5:5 2 3:3 3 3:3 4 3:3 5 3:3 6 3:3 7 2:2 8 2:2 9 2:2 Unused: 1`cs(1) Think: 1`ph(1)+ 1`ph(3)+ 1`ph(5) Eat: 1`ph(2)+ 1`ph(4) 10 2:2 Unused: 1`cs(3) Think: 1`ph(2)+ 1`ph(3)+ 1`ph(5) Eat: 1`ph(1)+ 1`ph(4) 11 2:2 Unused: 1`cs(5) Think: 1`ph(2)+ 1`ph(4)+ 1`ph(5) Eat: 1`ph(1)+ 1`ph(3) Put: {p=ph(2)} Take: {p=ph(4)} Take: {p=ph(1)} Put: {p=ph(3)}

slide-21
SLIDE 21

Petri Nets and Model Checking Natasa Gkolfi

Behavioral Properties

Boundedness properties

How many and which tokes a place may hold when all reachable markings are considered.

Home Properties

A home marking is a marking that can be reached from any reachable marking

◮ All the markings in a (single) terminal SCC are home

markings

slide-22
SLIDE 22

Petri Nets and Model Checking Natasa Gkolfi

Behavioral Properties

Liveness Properties

A dead marking is a marking in which no binding elements are enabled. Similarly dead transition. A transition is live if, starting from any reachable marking, we can always find an occurrence sequence containing it.

slide-23
SLIDE 23

Petri Nets and Model Checking Natasa Gkolfi

Behavioral Properties

Liveness Properties

A dead marking is a marking in which no binding elements are enabled. Similarly dead transition. A transition is live if, starting from any reachable marking, we can always find an occurrence sequence containing it.

Fairness Properties

How often transitions occur in infinite occurrence sequences. A transition is impartial if it occurs infinitely often in all infinite

  • ccurrence sequences.

◮ Removal of this transition implies no infinite occurrence

sequences!

slide-24
SLIDE 24

Petri Nets and Model Checking Natasa Gkolfi

Example: Dining Philosophers

r of philosophers:

|PH|

Nodes Arcs 2 3 4 3 4 6 4 7 16 5 11 30 6 18 60 7 29 112 8 47 208 9 76 378 10 123 680 15 1,364 11,310

slide-25
SLIDE 25

Petri Nets and Model Checking Natasa Gkolfi

State Space Reduction Methods

◮ Sweep-Line method

A progress measure is a function that maps each marking into a progress value. For a given marking, the progress value of any successor marking must be greater or equal to its progress value.

slide-26
SLIDE 26

Petri Nets and Model Checking Natasa Gkolfi

State Space Reduction Methods

◮ Sweep-Line method

A progress measure is a function that maps each marking into a progress value. For a given marking, the progress value of any successor marking must be greater or equal to its progress value.

◮ Symmetry method

Equivalence classes used for symmetric markings and symmetric binding elements.

◮ the ss can be significantly reduced ◮ can check all behavioral properties that are invariant under

symmetry

◮ computing canonical representations of markings and binding

elements is computationally expensive

slide-27
SLIDE 27

Petri Nets and Model Checking Natasa Gkolfi

State Space Reduction Methods

◮ Sweep-Line method

A progress measure is a function that maps each marking into a progress value. For a given marking, the progress value of any successor marking must be greater or equal to its progress value.

◮ Symmetry method

Equivalence classes used for symmetric markings and symmetric binding elements.

◮ the ss can be significantly reduced ◮ can check all behavioral properties that are invariant under

symmetry

◮ computing canonical representations of markings and binding

elements is computationally expensive

◮ Equivalence method

A generalization of the symmetry method. Here, no requirement that the equivalence relations should be induced by symmetries.

slide-28
SLIDE 28

Petri Nets and Model Checking Natasa Gkolfi

Thank you!