1 / 25

Petri Nets

Petri Nets. LIS Changwon National University. theory. ?. practice. theoretical. experimental. The theoretician: “Who needs practice? Let’s go home to maths!” . idealised. pragmatic. Mathematics study interesting, consistent structures. Engineering build practicable,

torn
Télécharger la présentation

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 LIS Changwon National University

  2. theory ? practice theoretical experimental The theoretician: “Who needs practice? Let’s go home to maths!” idealised pragmatic Mathematics study interesting, consistent structures Engineering build practicable, useful structures ComputerScience ?? Christopher Strachey: “.. the separation of practical and theoretical work is artificial and injurious.” Carl Adam Petri: “Computing as a science could be modelled after physics” Frederick P. Brooks, Jr.: "The scientist builds in order to study, the engineer studies in order to build" Frederick P. Brooks, Jr.: “The computer “scientist” as toolsmith” Physics predict & measure “real world” structures

  3. 패트리 넽 특론 (CDB 2026) 패트리 넽 변형연구 (transformation) Reduction Composition unfolding Simplification

  4. 강의방법: 강의식 발표 세미나 과제 강의 시간: 화요일 (오후 7:00-10:00) 강의 장소: 32420 (컴공과 세미나실) 발표 및 자료제출: 발표자료는 파워포인트형태 수업시작 전에 모두 제출 발표는 임의로 선정(당일) 강의자료: 강의노트: 홈페이지 참조 http://sarim.changwon.ac.kr/~jklee 교재: 자체 편집 논문집 Petri nets:Properties,Analysis and Application, T.Murada (Proceed. IEEE) 연락처 : 이종근 055-279-7420 Mail: jklee@sarim.changwon.ac.kr 강의방법

  5. 세미나 논문 패트리넽입문 Petri nets:Properties,Analysis and Applications Constructs for prototyping information systems with object Petri nets An Extended Petri net Model for Normal Logic Programs Deadlock Prevention using Petri nets and their Unfoldings The case for feedback Control real-time Scheduling Using logic programs with Stable Model semantics to solve Deadlock and reachability problem for 1-safe Petri nets Evaluating deadlock detection methods for Concurrent Software Design and Evaluation of a feedback Control EDF Scheduling Algorithm Enhancing the Flexibility of Algebraic deadlock Avoidance polices through Petri nets Structural Analysis Hierarchical Time-Extended Petri nets based on Error Identification and recovery for Multilevel Systems

  6. Problems with automata-based approaches • automata are a theoretical and idealised model • they reflect a Newtonian world-view: • space & time as an absolute frame of reference • clockwork view of processes within this frame • 20th century developments in physics: • special relativity (what is a clock? how fast can signals be?) • quantum physics (interactions by particle exchange) engineers build systems where the difference matters!

  7. Simple models of complex worlds, or: “What is the problem?” • Newtonian physics is a special case of more recent models. • We hardly travel at relativistic speeds or operate in quantum • dimensions, do we? So why not use the simpler model? • in models of existing systems, automata imply an approximation.. • (simpler, but applicable only if their assumptions hold) • in designs of new systems, automata involve over-specification! • (engineers have to implement the assumptions!) Models can be unrealistic if they are too simple, and simplifying designs are harder to realise!

  8. Petri’s nets versus Petri nets,or: complex foundations for simple models • For his nets, Carl Adam Petri has made an attempt to combine • automata from theoretical CS, insights from physics, and • pragmatic expertise from engineers: • state is distributed, transitions are localised (space is relevant) • local causality replaces global time (time as a derived concept) • subsystems interact by explicit communication • (information transport is as relevant as information processing) engineers can often ignore the background - Petri nets just work! (but the background explains why things work, why concepts from other disciplines, such as logic, have been integrated into Petri nets so easily, and why foundational research has to continue)

  9. 3 2 Lift 1 1 Lift 2 Two lifts? From automata ... 3 2 1 Product automaton (meta-level modelling) One lift

  10. 3 2 1 Two lifts! … to Petri nets explicit transitions 3 concurrent subsystems 2 explicit synchronisation 1 explicit communication Distributed state, local transitions One lift A passenger local conflict

  11. Condition/event-systems (some terms) • a subclass of Petri nets: state elements hold either one or no token • state elements represent conditions, which can be true or false • transition elements are represent local events • an event is enabled if and only if • all its pre-conditions (connected by incoming arcs) are true • all its post-conditions (connected by outgoing arcs) are false • an event occurrence negates its pre- and post-conditions • events with overlapping pre- or post-conditions are in conflict, • non-conflicting enabled events may occur concurrently; • marking of the net: token distribution; c/e-system: c/e-net + marking; • configurations: the possible markings of a c/e-net, cases of a c/e-system: • the configurations reachable from initial marking (case graph) Automata are a sequential subclass of c/e-systems exactly one condition is true, each event has a single pre- and a single post-condition

  12. An interlude on time • timed automata measure time with a global clock (x happens later than y) • implied total synchronisation of all local clocks • execution of actions are assumed to be totally ordered (interleaving semantics) • communication is synchronous by default • time and actions proceed along two separate dimensions • actions do not change time, sequences of actions can happen at the same time • nets replace global time by local causal dependencies (x happens after y) • global and local clocks can be modelled, but need to be synchronised explicitly • only a partial order of event occurrences is assumed (concurrency possible) • communication is asynchronous by default • events have zero duration, but correspond to advances at least in local time • no changes outside time, and time is only measured in terms of changes • An ancient philosophical question: intervals or instances? The net answer: both! • events roughly correspond to instances, conditions to open intervals • all choices left to the modeller, continuity possible without real-valued time

  13. A A A B From automata to Petri nets, again, via Logic • states in automata represent atomic propositions about system configurations • in condition/event-systems, complex propositions about system configurations • can be expressed as well: “A” “not A” In the current case, .. “A and B” But valuations of propositions change dynamically, so..

  14. The Calculus of Facts expressing system invariants in propositional logic A “not A” A “A” In all cases,.. A B “A and B” A “(not A) or B” B dead events (never enabled) system invariants (facts) • Reasoning, in terms of transformations of fact-nets, is also possible: • expansion: adding conditions to facts • resolution: eliminating bridges between facts

  15. 2 3 From conditions to resources • c/e-systems model the flow of information, at a fundamental level (true/false) • there are natural application areas for which the flow/transport of resources and • the number of available resources is important (data flow, document-/workflow, • production lines, communication networks, www, ..) • place/transition-nets are a suitable generalisation of c/e-systems: • state elements represent places where resources (tokens) can be stored • transition elements represent local transitions or transport of resources • a transition is enabled if and only if • sufficient resources are available on all its input places • sufficient capacities are available on all its output places • a transition occurrence • consumes one token from each input place and • produces one token on each output place • (multiple arcs with the same source and target are abbreviated numerically)

  16. 2 2 max 2 2 2 max 2 2 2 2 2 Lifts again, with place/transition-nets 3 2 1 Two lifts Three passengers two nets, folded in one

  17. A n “#A < n” A n “|A| - #A < n” In all cases,.. A n B m “(|A| - #A < n) and (|B| - #B < n)” A n “(#A < n) or (|B| - #B < n)” B m dead events (never enabled) system invariants (facts) Numerical invariants, logically • the logical approach can be carried over to place/transition-nets, using • inequalities on the number of resources as elementary propositions • but more specific, numerical techniques can be more effective

  18. n p t Numerical invariants, numerically • incidence matrixC of a pure (no elementary loops) place/transition-net: • marking vectorm of a place/transition-net: Contribution of t on p • firing vectorf of a multi-set of transition occurrences (order not represented!): • weight vectori of a place invariant: set of places with constant (weighted) token sum • necessary, though not sufficient condition for reachability:

  19. P Pa Pb condition-schemes a b 1 1 7 7 x+y=z 1 3 x P 2 P z 2 7 R R y 9 2 Q event-schemes Q 2 From propositions to predicates • Predicate/transition-nets: • individual tokens give the extension of predicates, which replace propositional conditions • quantifiers and specifications in a predicate logic (+ some theory) • permit the grouping of proposition-level events into predicate-level event-schemes

  20. H He H2O 2’H 1’H2O H 1’O O High-level Petri nets • proposed around 1980, various forms known, including predicate/transition-nets • (PrT-nets), and coloured Petri nets (CPN) • common features: individual tokens, net elements annotated in some textual • inscription language (predicate logic, Standard ML, Java, ..), net semantics • integrated with language semantics (variable bindings, guard predicates) • integration of graphical specifications and textual inscriptions enable • transformation between both within a single formalism • multiplicity and individuality of tokens are orthogonal extensions: • for place/transition-nets, one might want to distinguish tokens • for PrT-nets, one might want indistinguishable tokens, • replacing sets with multi-sets (bags) as the extension of predicates

  21. (l,{p}ps) p (l,ps) (l,ps) p (l,{p}ps) |ps|<2 (l,{p}ps) p (l,ps) (l,ps) p (l,{p}ps) |ps|<2 “keen” (l,{p}ps) p (l,ps) “able” (l,ps) p (l,{p}ps) “quick” (lift1,{}) |ps|<2 (lift2,{}) Lifts, yet again, with high-level nets 3 (l,ps) (l,ps) max 2 (l,ps) (l,ps) max 2 2 (l,ps) (l,ps) (l,ps) (l,ps) 1 Passengers Two lifts

  22. “keen” “able” “quick” (lift1,{}) (lift2,{}) Lifts, yet again, with high-level nets leave/ enter 3 graphical abstraction up/down max 2 leave/ enter max 2 2 up/down leave/ enter 1 Passengers Two lifts

  23. Chomsky hierarchy, machines and Petri nets “Talking to” versus “Talking about” Petri nets languages machines talking to no thing condition/event-systems regular (type-3) finite automata talking about (validity of) propositions talking to a stack context-free (type-2) push-down automata Place/transition-nets talking to a linear-bounded tape talking about (distribution of) resources context-sensitive (type-1) linear-bounded Turing machines High-level Petri nets (type-0) Turing machines talking to an unbounded tape talking about (distribution of) structured data

  24. The world of Petri Nets • a way of thinking about concurrent and communicating systems • straightforward generalisation of automata, but with concurrency in mind • “pre-formal” graphical notation: intuitive use of formal methods • good foundations in physics, engineering, logic, maths, theoretical CS • the usual conflict between expressiveness and predictability/analysis • wide range of applications, including communication networks in telecom and • in computing, data-flow systems, workflow/office information systems,.. • still more work needed, both in domain-specific modifications and in foundations Try them!-) The world of Petri nets (events, bibliographies, research groups, tools,..) http://www.daimi.aau.dk/PetriNets/ Carl Adam Petri’s home page (cv, bibliography, laudatio) http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/profs/petri.html

  25. References The computer scientist as toolsmith II, Brooks F.P., Communications of the ACM 39(3):61-68, 1996 [ACM Allen Newell Award acceptance lecture] Christopher Strachey’s Oxford PRG motto: http://web.comlab.ox.ac.uk/oucl/about/philosophy.html Carl Adam Petri’s homepage: http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/profs/petri_eng.html Nets, Time and Space, C.A.Petri,Theoretical Computer Science, Special Volume on Petri Nets, 1996, No. 1-2, Vol. 153, Pages: 3-48 Concurrency and Continuity. Petri, C.A.; Smith, E., Lecture Notes in Computer Science Vol. 266: Advances in Petri Nets 1987 / Rozenberg, G. (ed.) --- Springer Verlag, 1987, Pages: 273-292 The Calculus of Facts. Genrich, H.J.; Thieler-Mevissen, G. Mathematical Foundations of Computer Science 1976, Mazurkiewicz, A.(ed.) --- Berlin, Heidelberg, New York: Springer-Verlag, 1976, Pages: 588-595 Hierarchies in Coloured Petri Nets. Huber, P.; Jensen, K.; Shapiro, R.M. Lecture Notes in Computer Science, Vol. 483; Advances in Petri Nets 1990 / Rozenberg, G. (ed.) --- Berlin, Germany: Springer-Verlag, 1991, Pages: 313-341 Petri Net Theory and the Modeling of Systems J. L. Peterson, Prentice-Hall, N.J., 1981, ISBN: 0-13-661983-5 Petri Nets, An Introduction W. Reisig, EATCS, Monographs on Theoretical Computer Science, W.Brauer, G. Rozenberg, A. Salomaa (Eds.), Springer Verlag, Berlin, 1985. Recommended Books and Papers on Coloured Petri Nets, Kurt Jensen, CPN Group, University of Aarhus, Denmark: http://www.daimi.au.dk/~kjensen/papers_books/rec_papers_books.html Further references (including introductory material): http://www.daimi.au.dk/PetriNets/bibl/

More Related