1 / 20

Petri Nets

Petri Nets. Formal Methods for SoC Design. Sorin Manolache. sorma@ida.liu.se. Compiled from lecture slides by Petru Eles. petel@ida.liu.se. Outline. History and rationale Structure Behaviour Analysis Extensions Petri Nets resources. Petri Nets – Sorin Manolache and Petru Eles.

miriam
Download Presentation

Petri Nets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Petri Nets Formal Methods for SoC Design Sorin Manolache sorma@ida.liu.se Compiled from lecture slides by Petru Eles petel@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. 2 1 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. 2 1 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 non-determinism synchronisation 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. Boundedness 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. 2 Does not fire Fires Fires 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 1 2 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. Application Modelling Petri Nets – Sorin Manolache and Petru Eles

  18. Reachability Graph T A T A T I B B Petri Nets – Sorin Manolache and Petru Eles

  19. 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

  20. 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

More Related