Title: Introduction to Petri Nets
1Introduction to Petri Nets
- Hugo Andrés López
- lopez_at_dit.unitn.it
2Plan for lectures
- 6th November 07
- Informal Introduction, Intuitions.
- Formal definition
- Properties for PNets.
- 8th November 07
- Examples on specifications.
- Applications.
- Petri Nets Variants.
- Advantages, Limitations.
3A little of History
- C.A. Petri proposes a new model for information
flow (early 60s). - Main ideas Modelling Systems with asynchronous
and Concurrent executions as graphs. - Holt and Petri net theory (mid 70s)
- MIT and ADR Research in Petri Net Properties and
Relations with Automata Theory - Nowadays Event Structures, Bigraphs, (new)
flowcharts, relations with Process algebra.
4Intuitions
- A Petri Net (PN) is a formalism for representing
concurrent programs in terms of events and
transitions. - Defining Static Properties (Structural).
- Dynamic Properties (Behavioural).
5Producer - Consumers PNET
Static Structure
6Producer - Consumers PNET
Markings introduce the dynamics of the system
Initial Marking
7Producer - Consumers PNET (Non-Determinism)
Firing T1 again will lead to multiple
production of tokens in P3
8Producer - Consumers PNET (Non-Determinism)
Firing T6 disable T3
Firing T3 disable T6
9PNet Evolutions
- Resembles a board game.
- A transition can be fired if their input events
are marked. - Possible Scenarios
Concurrent Execution
Conflicting Execution
10Formal Model for PNets
11Occurrence Rule
12Occurrences and Reachability
13Example An Scheduler
- Resources
- A buffer of input processes with k4.
- A dual-core processor.
- Buffer of Results with k4.
- Processes are independent.
14Behavioural Properties of Marked Petri Nets
- A marked p/t-net is
- terminating if there is no infinite occurrence
sequence - deadlock-free if each reachable marking enables
a transition - live if each reachable marking enables an
occurrence sequence containing all transitions - bounded - if, for each place p, there is a bound
b(p) s.t. m(p) lt b(p) for every reachable
marking m - 1-Safe - if b(s) 1 is a bound for each place s
- Reversible if m0 is reachable from each other
reachable marking
15A vending machine
-VM is Reversible
-VM is Deadlock-free.
-VM is bounded by 1 (1-safe)
-VM is Live.
Every marking generated from m0 enables a
transition
The occurrences generated by m0 contains all the
transitions
there are no induced tokens, the constraints used
in m0 holds for the system.
It is possible to go back to m0 from every
marking derived from m0
16Exercise
- Show by inspection (or other methods) the
properties that holds for the scheduler example.
17Bibliography
- J.L. Peterson. Petri Nets. Computing Surveys,
Vol. 9 No. 3, 1977. - A. Kondratyev et al. The use of Petri nets for
the design and verification of asynchronous
circuits and systems. Journal of Circuits
Systems and Computers. 1998. - Balbo et al. Lecture notes of the 21st. Int.
Conference on Application and Theory of Petri
Nets. 2000. - The World of Petri netshttp//www.daimi.au.dk/Pe
triNets/ - C. Ling. The Petri Net Method. http//www.utdallas
.edu/gupta/courses/semath/petri.ppt