Petri%20Nets - PowerPoint PPT Presentation

About This Presentation
Title:

Petri%20Nets

Description:

Petri Nets Formal Methods for SoC Design Sorin Manolache sorma_at_ida.liu.se Compiled from lecture s by Petru Eles petel_at_ida.liu.se Outline History and Rationale ... – PowerPoint PPT presentation

Number of Views:180
Avg rating:3.0/5.0
Slides: 23
Provided by: idaLiuSel
Category:

less

Transcript and Presenter's Notes

Title: Petri%20Nets


1
Petri Nets
Formal Methods for SoC Design
Sorin Manolache
sorma_at_ida.liu.se
Compiled from lecture slides by Petru Eles
petel_at_ida.liu.se
2
Outline
  • History and rationale
  • Structure
  • Behaviour
  • Analysis
  • Extensions
  • Petri Nets resources

Petri Nets Sorin Manolache and Petru Eles
3
History and Rationale
  • Graphical and mathematical modelling language
  • Applicable to a large variety of systems
  • Able to model synchronisation, concurrency,
    non-determinism
  • Amenable to analysis
  • With extensions, able to model real-time
  • With extensions, they have the expressive power
    of Turing Machines
  • Carl Adam Petri, Kommunikation mit Automaten,
    PhD dissertation, 1962
  • Kurt Jensen, Coloured Petri Nets and the
    Invariant Method, Theoretical Computer Science
    (14) 1981
  • M.K. Molloy, Performance Analysis Using
    Stochastic Petri Nets, IEEE Trans. on Computers,
    C-31, 9, 1982

Petri Nets Sorin Manolache and Petru Eles
4
Structure
  • Directed, bipartite graph
  • The two types of vertices are places and
    transitions
  • Multisets of input arcs and multisets of output
    arcs (input and output relative to transitions)
  • Places are like holders of something (defining
    state), while transitions are like activities
    (defining state transformations/behaviour)

Petri Nets Sorin Manolache and Petru Eles
5
Behaviour
  • Places hold tokens, the place is said to be
    marked
  • The marking of a net indicates how many tokens
    there are in each place
  • Tokens circulate among places through transitions
  • We say that the transition fires
  • A transition fires when it is enabled
  • A transition is enabled when each of its input
    places contain more tokens than the multiplicity
    of the corresponding input arc
  • Upon firing, Ip tokens are removed from each
    input place and Op tokens are placed in each
    output place, where Ip and Op are the
    corresponding input and output arc multiplicities

Petri Nets Sorin Manolache and Petru Eles
6
Producer-Consumer Example
prod
cons
Petri Nets Sorin Manolache and Petru Eles
7
Producer-Consumer Example
prod
cons
Petri Nets Sorin Manolache and Petru Eles
8
Concurrency, Synchronisation
Petri Nets Sorin Manolache and Petru Eles
9
Analysis
  • We're interested in certain properties of the
    modelled system expressed in terms of properties
    of the Petri Net representation
  • Reachability
  • Liveness
  • Boundedness
  • Safety
  • Computation of invariants

Petri Nets Sorin Manolache and Petru Eles
10
Reachability
Marking M'
Marking M
Is there a sequence of transition firings such
that M M'?
NO
Petri Nets Sorin Manolache and Petru Eles
11
Liveness
  • A transition T is live if in any marking there
    exists a firing sequence such that T becomes
    enabled
  • An entire net is live if all its transitions are
    live
  • Important for checking deadlock

Live?
YES
NO
Petri Nets Sorin Manolache and Petru Eles
12
Boudedness
YES
NO
Is there a limit of the number of tokens in any
place?
A net is safe if its bound is 1
Petri Nets Sorin Manolache and Petru Eles
13
Place Invariants
P1
P2
P1 P2 2
Petri Nets Sorin Manolache and Petru Eles
14
Extensions
  • Sometimes non-determinism is not desirable ?
    Introduction of transition priorities
  • We can have partial order on transition firings,
    but no explicit notion of time ? Introduction of
    transition firing delays (Timed Petri Nets) or
    transition firing delay probability distributions
    (Stochastic Petri Nets or Extended Stochastic
    Petri Nets) or a combination thereof
    (Deterministic and Stochastic Petri Nets)
  • Some behaviours cannot be expressed with Basic
    Petri Nets ? Introduction of inhibitor arcs
    giving Petri Nets the same expressive power as
    Turing Machines

Petri Nets Sorin Manolache and Petru Eles
15
Hierarchy
1
2
1
1
1
2
Petri Nets Sorin Manolache and Petru Eles
16
Coloured Petri Nets
  • Petri Nets quickly grow to large dimensions when
    modelling non-trivial systems
  • In order to reduce modelling complexity, tokens
    have associated values of different types
    (colours) and transitions are functions defined
    on the colour domains of their input places with
    values in the colour domains of their output
    places
  • The most useful application is associating time
    stamps to tokens, easily modelling real-time
    systems
  • Danger the modelling language is so powerful
    that it easily leads to non-analysable models
    (real-valued time stamps lead to unbounded nets,
    as the set of real numbers is uncountable)
  • It is just syntactic sugar, CPN are equivalent to
    Basic Petri Nets and therefore CPN models can be
    translated to BPN models and the other way around

Petri Nets Sorin Manolache and Petru Eles
17
Worker-Resource Example
idle
update
use
Petri Nets Sorin Manolache and Petru Eles
18
Multiprocessor System Example
A
B
Petri Nets Sorin Manolache and Petru Eles
19
Application Modelling
Petri Nets Sorin Manolache and Petru Eles
20
Reachability Graph
Petri Nets Sorin Manolache and Petru Eles
21
Discussion
  • Pros
  • Powerful modelling language
  • Amenable to analysis
  • Models parallelism, synchronisation,
    non-determinism, real-time
  • Extended to support hierarchy
  • Cons
  • Almost all analysis methods die because of
    complexity issues
  • Unsatisfying composability when it comes to
    analysis because the modelling hierarchy is
    usually lost in a flat representation at analysis

Petri Nets Sorin Manolache and Petru Eles
22
Petri Nets Resources
  • http//www.daimi.au.dk/PetriNets/
  • Books
  • Tools
  • Papers
  • Conferences
  • Success stories
  • Mailing lists
  • News

Petri Nets Sorin Manolache and Petru Eles
Write a Comment
User Comments (0)
About PowerShow.com