Title: Petri Nets: PROPERTIES , ANALYSIS AND APPLICATIONS
1Petri Nets PROPERTIES , ANALYSIS AND
APPLICATIONS
Submitted for HLDM term paper by -
Rajneesh Gupta M.Tech. (CS)
2Petri Nets Definition
- Petri Nets are graphical and mathematical
modeling tool applicable to many systems. - Promising tool for describing and studying
information processing systems. - As a graphical tool it can be used as
visual-communication aid similar to flow charts,
block diagrams and networks.
3Components of Petri Nets
- It is a particular kind of directed, weighted,
bipartite graph, consisting of two type of nodes. - Places
- Transitions
- And arcs from place to transition or from
transition to place. And places marked with
tokens (non-negative integer). -
4Petri Nets Formal Definition
A 5-Tuple , PN (P, T , F , W , M0)
where Pp1,p2,.pm is a finite set of
places, Tt1,t2,..tn is a finite set of
transitions, F is a set of arcs (P X T) U (T X
P), W F -gt 1,2,3,. is a weight function, M0
P -gt0,1,2,3, is the initial marking
5 An illustration of firing (transition) rule
t
H2
2
H2O
2
O2
2H2O
a)
Before firing
2H2 O2
t
2
H2
2
H2O
O2
b)
After firing
6Petri Nets Structure
tl
t1
tp
. . . . . .
. . . . . . .
. . .
. . .
tk
td
7Transition (Firing) rules
- Each input place p of transition t should have at
least w(p,t) tokens where w(p,t) is the weight of
the arc from p to t. - A firing of an enabled transition t removes
w(p,t) tokens from each input place p of t and
adds w(t,p) tokens to each output place p of t ,
Where w(t,p) is the weight of arc from t to p. - An enabled transition may or may not fire.
8The Power of Petri Nets
- Finite State machine
- Parallel Activities or Concurrency
- Dataflow computation
- As powerful as CDFG
- Communication Protocols
- Synchronization Protocols e.g.
- Producers-Consumers Problem
- Readers-Writers Problem
- Formal Languages
- As powerful as Lower Bound Automata (LBA)
9Concurrency
p3
p1
t2
Par Begin
Par End
t1
p2
p4
t4
t3
p5
10Dataflow Computation
a
X(ab)/(a-b)
Add
Copy
Divide
a
x
(a
b)
/(a-b)
If a-b ltgt 0
b
Subtract
Copy
b
If a-b0
11Communication Protocol
Ready to send
Ready to receive
Buffer full
Send message
Receive message
Process2
Process1
Message Received
Wait for ack
Buffer full
Receive ack
Send ack
Ack. sent
Ack Received
12Context Sensitive Language
Final
Start
a
c
b
Language generated L an bn cn ngt0
13Non determinism
t1
p
t2
Conflict
14Situation Called Confusion
p2
p1
t1
t3
t2
a) Symmetric Confusion
t1 and t2 are concurrent as well as in conflict
with t3
15Confusion (Contd..)
b) Asymmetric Confusion
p2
t2
p1
p3
p4
t3
t1
t1 is concurrent with t2 but will be in conflict
with t3 if t2 fires before t1
16Behavioral Properties of Petri Nets
- Reachability
- Boundedness
- Liveness
- Reversibility
- Coverability
- Persistence
17- Reduction Rules
- Fusion of series places (FSP)
- Fusion of series transitions (FST)
1) Fusion of Series Places(FSP)
18Reduction Rulesc) Fusion of parallel placesd)
Fusion of parallel transitions
19Reduction Rulese) Elimination of self-loop
placesf) elimination of self loop transition
20High level Nets and Logic Programs
p1
p3
a,a d,d
ltx,zgt
2x
t
e
lta,bgt ltb,cgt ltd,agt
p4
ltx,ygt lty,zgt
p2
Before firing
21High level Nets and Logic Programs
p1
p3
lta,cgt
d,d
ltx,zgt
2x
t
e
ltd,agt
e
p4
ltx,ygt lty,zgt
p2
After Firing with substitution a/x, b/y, c/z
22High level Nets and Logic Programs
p1
p3
ltd,bgt
a,a
ltx,zgt
2x
t
e
ltb,cgt
e
p4
ltx,ygt lty,zgt
p2
After Firing with substitution d/x, a/y, b/z
23An example Logic Program
- Parent(David,Mary) lt-
- Parent(Mary,Tom) lt -
- Ancestor(x,y) lt- Parent(x,y)
- Ancestor(x,z) lt- Parent(x,y) , Ancestor(y,z)
- lt- Ancestor(x,Tom)
24Logic Program Petri Net
25