Petri Nets Jian-Jia Chen (slides are based on Peter Marwedel)

Slides:



Advertisements
Similar presentations
Technische universität dortmund fakultät für informatik informatik 12 Models of computation Peter Marwedel TU Dortmund Informatik 12 Graphics: © Alexandra.
Advertisements

Peter Marwedel TU Dortmund, Informatik 12
Fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
FSMs & message passing: SDL
Mathematical Preliminaries
Fundamentals of Probability
Fakultät für informatik informatik 12 technische universität dortmund Imperative model of computation Peter Marwedel TU Dortmund, Informatik 12 Graphics:
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund Petri Nets Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Fakultät für informatik informatik 12 technische universität dortmund Petri Nets Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Evaluation and Validation
Fakult ä t f ü r informatik informatik 12 technische universit ä t dortmund Data flow models Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Fakultät für informatik informatik 12 technische universität dortmund Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund SDL Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine.
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Peter Marwedel TU Dortmund, Informatik 12 Germany
Communicating finite state machines
Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik
Copyright © 2003 Pearson Education, Inc. Slide 1.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
Addition Facts
fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Introduction Lesson 1 Microsoft Office 2010 and the Internet
Discrete time Markov Chain
1 Petri Nets I Paul Fishwick author From
ABC Technology Project
3 Logic The Study of What’s True or False or Somewhere in Between.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 5 Dr.-Ing. Erwin Sitompul
Fakultät für informatik informatik 12 technische universität dortmund Finite state machines + message passing: SDL Peter Marwedel TU Dortmund, Informatik.
Addition 1’s to 20.
25 seconds left…...
Technische universität dortmund fakultät für informatik informatik 12 Embedded System Design: Embedded Systems Foundations of Cyber-Physical Systems Jian-Jia.
Introduction to Computability Theory
Week 1.
Systems Analysis and Design in a Changing World, Fifth Edition
Review – Presentations with Graphics & Multimedia © 2010, 2006 South-Western, Cengage Learning.
We will resume in: 25 Minutes.
CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 27 – Overview of probability concepts 1.
Chapter 11 Component-Level Design
How Cells Obtain Energy from Food
Technische universität dortmund fakultät für informatik informatik 12 Specifications, Modeling, and Model of Computation Jian-Jia Chen (slides are based.
(slides are based on Peter Marwedel)
technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Technische universität dortmund fakultät für informatik informatik 12 Discrete Event Models Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
Technische universität dortmund fakultät für informatik informatik 12 Limits of von-Neumann (thread-based) computing Jian-Jia Chen (Slides are based on.
Hardware/ Software Partitioning 2011 年 12 月 09 日 Peter Marwedel TU Dortmund, Informatik 12 Germany Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These.
Technische Universität München Fakultät für Informatik Computer Graphics SS 2014 Transformations Rüdiger Westermann Lehrstuhl für Computer Graphik und.
Fakultät für informatik informatik 12 technische universität dortmund Specifications - Session 5 - Peter Marwedel TU Dortmund Informatik 12 Germany Slides.
fakultät für informatik informatik 12 technische universität dortmund Early design phases Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Specifications.
Evaluation and Validation Peter Marwedel TU Dortmund, Informatik 12 Germany 2013 年 12 月 02 日 These slides use Microsoft clip arts. Microsoft copyright.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Petri nets Introduced in 1962 by Carl Adam Petri in his PhD thesis. Focus.
Modelling by Petri nets
technische universität dortmund fakultät für informatik informatik 12 Early design phases Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund,
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
1 Advanced Embedded Systems Lecture 3 Specification Languages.
Technische universität dortmund fakultät für informatik informatik 12 Finite state machines & message passing: SDL Peter Marwedel TU Dortmund, Informatik.
2. Specification and Modeling
Embedded System Design Specifications and Modeling
Specifications and Modeling
Petri Nets Laurie Frazier.
Presentation transcript:

Petri Nets Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 © Springer, 2010 2014年 10 月 28 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

Models of computation considered in this course Communication/ local computations Shared memory Message passing Synchronous | Asynchronous Undefined components Plain text, use cases | (Message) sequence charts Communicating finite state machines StateCharts SDL Data flow Kahn networks, SDF Petri nets C/E nets, P/T nets, … Discrete event (DE) model VHDL*, Verilog*, SystemC*, … Only experimental systems, e.g. distributed DE in Ptolemy Von Neumann model C, C++, Java C, C++, Java with libraries CSP, ADA | * Classification is based on implementation of VHDL, Verilog, SystemC with central queue

Introduction Introduced in 1962 by Carl Adam Petri in his PhD thesis. Focus on modeling causal dependencies; no global synchronization assumed (message passing only). Key elements: Conditions Either met or not met. Events May take place if certain conditions are met. Flow relation Relates conditions and events. Conditions, events and the flow relation form a bipartite graph (graph with two kinds of nodes).

Example: Synchronization at single track rail segment “Preconditions“

Playing the “token game“ use normal view mode!

Conflict for resource “track“

Condition/event nets Def.: N=(C,E,F) is called a net, if the following holds C and E are disjoint sets F  (C  E)  (E  C); is binary relation, (“flow relation“)

Pre- and post-sets Def.: Let N be a net and let x  (C  E). x := {y | y F x} is called the pre-set of x, (or preconditions if x  E) x := {y | x F y} is called the set of post-set of x, (or postconditions if x  E) Example: x x x

Loops and pure nets Def.: Let (c,e)  C  E. (c, e) is called a loop if cFe  eFc. Def.: Net N=(C,E,F) is called pure, if F does not contain any loops.

Simple nets Def.: A net is called simple if no two nodes n1 and n2 have the same pre-set and post-set. Example (not simple nets): Def.: Simple nets with no isolated elements meeting some additional restrictions are called condition/event nets (C/E nets).

Place/transition nets W (Segment of some net) M0 defaults: K =  W = 1 Def.: (P, T, F, K, W, M0) is called a place/transition net if N=(P, T, F) is a net with places p  P and transitions t  T K: P  (ℕ0  {}) \{0} denotes the capacity of places ( symbolizes infinite capacity) W: F (ℕ0 \{0}) denotes the weight of graph edges M0: P  ℕ0 {} represents the initial marking of places

Applications Modeling of resources; modeling of mutual exclusion; modeling of synchronization.

Computing changes of markings “Firing“ transitions t generate new markings on each of the places p according to the following rules:

Activated transitions Transition t is “activated“ if Activated transitions can “take place“ or “fire“, but don‘t have to. We never talk about “time“ in the context of Petri nets. The order in which activated transitions fire, is not fixed (it is non-determinate).

Shorthand for changes of markings Slide 12: Let   p  P: M´(p) = M(p)+ t(p)  M´ = M + t +: vector add

Matrix N describing all changes of markings Def.: Matrix N of net N is a mapping N: P T  ℤ (integers) such that  t  T : N(p,t)= t(p) Component in column t and row p indicates the change of the marking of place p if transition t takes place. For pure nets, (N, M0) is a complete representation of a net.

Place - invariants Standardized technique for proving properties of system models For any transition tj  T we are looking for sets R  P of places for which the accumulated marking is constant: Example: tj

Predicate/transition nets Goal: compact representation of complex systems. Key changes: Tokens are becoming individuals; Transitions enabled if functions at incoming edges true; Individuals generated by firing transitions defined through functions Changes can be explained by folding and unfolding C/E nets,  semantics can be defined by C/E nets.

Example: Dining philosophers problem n>1 philosophers sitting at a round table; n forks, n plates with spaghetti; philosophers either thinking or eating spaghetti (using left and right fork). How to model conflict for forks? How to guarantee avoiding starvation? 2 forks needed!

Condition/event net model of the dining philosophers problem Let x  {1..3} tx: x is thinking ex: x is eating fx: fork x is available Model quite clumsy. Difficult to extend to more philosophers. Normal view mode!

Predicate/transition model of the dining philosophers problem (1) Let x be one of the philosophers, let l(x) be the left fork of x = fx, let r(x) be the right fork of x = f(x+1). l(2)=f2, r(2) = f3 Tokens: individuals. Semantics can be defined by replacing net by equivalent condition/event net. 2 1 3 f 1 f 2 f 3

Predicate/transition model of the dining philosophers problem (2) 1 3 f 1 f 2 f 3 Model can be extended to arbitrary numbers of people. use normal view mode!

Evaluation Pros: Appropriate for distributed applications, Well-known theory for formally proving properties, Cons (for the nets presented) : problems with modeling timing, no programming elements, no hierarchy. Extensions: Enormous amounts of efforts on removing limitations. back to full screen mode

Summary Petri nets: focus on causal dependencies Condition/event nets Single token per place Place/transition nets Multiple tokens per place Predicate/transition nets Tokens become individuals Dining philosophers used as an example