Communication in Petri nets

Similar documents
Time and Timed Petri Nets

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA

The State Explosion Problem

7. Queueing Systems. 8. Petri nets vs. State Automata

DES. 4. Petri Nets. Introduction. Different Classes of Petri Net. Petri net properties. Analysis of Petri net models

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

Petri Nets (for Planners)

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Specification models and their analysis Petri Nets

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Timed Automata VINO 2011

Simulation of Spiking Neural P Systems using Pnet Lab

1. sort of tokens (e.g. indistinguishable (black), coloured, structured,...),

The MSO Theory of Connectedly Communicating Processes

Analysis and Optimization of Discrete Event Systems using Petri Nets

Embedded Systems 6 REVIEW. Place/transition nets. defaults: K = ω W = 1

Concurrent automata vs. asynchronous systems

Wojciech Penczek. Polish Academy of Sciences, Warsaw, Poland. and. Institute of Informatics, Siedlce, Poland.

An Introduction to Hybrid Systems Modeling

Recent results on Timed Systems

On communicating automata with bounded channels

Büchi Automata and Linear Temporal Logic

Automata, Logic and Games: Theory and Application

Analyzing Asynchronous Programs with Preemption

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Bridging the Gap between Reactive Synthesis and Supervisory Control

Discrete Parameters in Petri Nets

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Hasse Diagram Generators and Petri Nets

A Canonical Contraction for Safe Petri Nets

Finite-State Model Checking

Automata on Infinite words and LTL Model Checking

A look at the control of asynchronous automata

Elementary Siphons of Petri Nets and Deadlock Control in FMS

Quasi-Weak Cost Automata

Discrete Event Systems Exam

From Liveness to Promptness

Local LTL with past constants is expressively complete for Mazurkiewicz traces

Models of Concurrency

Part I. Principles and Techniques

Undecidability Results for Timed Automata with Silent Transitions

Optimal Zielonka-Type Construction of Deterministic Asynchronous Automata

Free-Choice Petri Nets without Frozen Tokens, and Bipolar Synchronization Systems. Joachim Wehler

An Holistic State Equation for Timed Petri Nets

MPRI 1-22 Introduction to Verification January 4, TD 6: Petri Nets

Petri nets. s 1 s 2. s 3 s 4. directed arcs.

Automata-based Verification - III

Chapter 3: Linear temporal logic

A REACHABLE THROUGHPUT UPPER BOUND FOR LIVE AND SAFE FREE CHOICE NETS VIA T-INVARIANTS

Models for Efficient Timed Verification

Counter Automata and Classical Logics for Data Words

Synchronizing sequences. on a class of unbounded systems using synchronized Petri nets

The Alignment of Formal, Structured and Unstructured Process Descriptions. Josep Carmona

Partially Ordered Two-way Büchi Automata

Structure Preserving Bisimilarity,

Chapter 1. Automata over infinite alphabets

On Qualitative Analysis of Fault Trees Using Structurally Persistent Nets

Timed Petri Nets and Timed Automata: On the Discriminating Power of Zeno Sequences

On the modularity in Petri Nets of Active Resources

On positional strategies over finite arenas

The theory of regular cost functions.

A Polynomial-Time Algorithm for Checking Consistency of Free-Choice Signal Transition Graphs

Chapter 4: Computation tree logic

Synthesis of Asynchronous Systems

Modeling and Stability Analysis of a Communication Network System

Asynchronous Games over Tree Architectures

Information Systems Business Process Modelling I: Models

A Review of Petri Net Modeling of Dynamical Systems

Dense-Timed Pushdown Automata

Javier Esparza and Keijo Heljanko. A Partial-Order Approach to Model Checking

Causal Dataflow Analysis for Concurrent Programs

New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations

Automata-based Verification - III

Linear Time Analysis of Properties of Conflict-Free and General Petri nets

Trace- and Failure-Based Semantics for Responsiveness

Netcharts: Bridging the gap between HMSCs and executable specifications

Lecture Notes on Emptiness Checking, LTL Büchi Automata

A Note on Decidable Separability by Piecewise Testable Languages

Automatic Generation of Polynomial Invariants for System Verification

Decision, Computation and Language

The Downward-Closure of Petri Net Languages

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

Negotiation Games. Javier Esparza and Philipp Hoffmann. Fakultät für Informatik, Technische Universität München, Germany

SPECIFICATION MODELS. Chapter 3. Overview. Introducing Hierarchy. StateCharts

Logics and automata over in nite alphabets

Compact Regions for Place/Transition Nets

Some techniques and results in deciding bisimilarity

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

arxiv: v2 [cs.fl] 6 Apr 2018

The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems

SCOPE: A Situation Calculus Ontology of Petri Nets

Distributed games with causal memory are decidable for series-parallel systems

Petri Nets (for Planners) ICAPS Petri Nets (for Planners) Outline of the Tutorial. Introduction & Motivation

Liveness in L/U-Parametric Timed Automata

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Classes and conversions

Monoidal Categories, Bialgebras, and Automata

Limiting Behavior of Markov Chains with Eager Attractors

A New Method for Converting Trace Theoretic Specifications to Signal Transition Graphs

Temporal Logic Model Checking

Transcription:

Communication in Petri nets Kamal Lodaya work in progress with Ramchandra Phawade The Institute of Mathematical Sciences, Chennai February 2010

Petri nets - introduction Mathematical model. Widely used to study operating systems with concurrent processes. Example There are two processes Process 1 and Process 2. Both need a Resource to run. Process 1 Process 2 1. Ready to run. 2. Wait for resource. 3. Get resource and perform action. 4. Return resource and ready to run again. 1. Ready to run. 2. Wait for resource. 3. Get resource and perform action. 4. Return resource and ready to run again.

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 r 1 p 2 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 r 1 p 2 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Petri nets - example Process 1 Resource Process 2 p 1 p 3 t 1 t 3 p 2 r 1 p 4 t 2 t 4 Figure: An example Petri net representing two processes

Reachability problem Starting from t 1 p 1 t 2 p 2 r 1 p 3 p 4, can we reach? t 1 p 1 p 2 t 2 r 1 p 3 p 4 t 4 t 4 t 3 t 3 M i = M f = 1 0 1 0 1 0 1 0 1 0

Formal definitions (P, T, pre, post, M 0 ); pre, post : (P T) N; M 0 : P N A transition can be fired at marking M provided there are enough tokens in all its input places. This firing results in the new marking M : M t M. M (p) = M(p) Pre(p, t) + Post(p, t) for all p P. A firing sequence σ = t 1 t r is enabled at marking M 0 if M 0 t 1 M1 M r 1 t r Mr and each t i is enabled at M i 1. A maximal firing sequence: keep firing until you cannot any more. So one needs to consider infinite words over a finite alphabet. The (deadlock) language accepted by a Petri net is its set of maximal firing sequences.

Problems Given a Petri net system and a final marking M f, the reachability problem is to determine if there exists a firing σ sequence σ enabled at M 0 such that M 0 Mf. The coverability problem given M f is to determine if there is a firing sequence enabled at M 0 which reaches a marking which has in every place p at least as many tokens as M f (p). The boundedness problem is to determine if there exists a bound b such that the system is b-bounded: no reachable marking has more than b tokens in any place. E.W.Mayr gave an algorithm for the reachability problem in 1981/1984. S.R.Kosaraju and J.L. Lambert simplified the proofs in 1982 and 1992. Exact complexity of the reachability problem is not known. C.Rackoff showed that coverability and boundedness can be solved using exponential space.

Logic Note: we usually use labels on the transitions in the net (a function l : T A) so that we talk of abstract actions. The usual temporal logics which do not allow expressing numbers of tokens in places have decidable satisfiability. Even very simple temporal logics which allow expressing the number of tokens in places are undecidable. But Petri nets are widely used for modelling (for example, the central processing unit of the Control Data CDC 6400). There are tools available which allow checking linear algebraic properties (algorithms use Parikh vectors of firing sequences).

1-bounded Petri nets Specific properties satisfied by some nets can be exploited to get better algorithms. If we consider 1-bounded systems, we still deal with infinite words over an alphabet We have succinct representation of shuffles of words dictated by the structure of the net, not by the number of tokens in the markings. This was analyzed by Mazurkiewicz using alphabet-induced shuffles of words which he called traces. A subclass called elementary net systems was defined by Nielsen, Rozenberg and Thiagarajan for this analysis. Hmm...

Can we explain Petri s nets to Johan s dean? Theorem (Kleene) There is a syntax of (regular expressions) which is equivalent to finite automata. r ::= a A r 1 ; r 2 r 1 + r 2 r ω The last two model IF-THEN-ELSE and WHILE-DO but are more general. The expressions have the following semantics: Lang(a) = {a} Lang(r 1 ; r 2 ) = {w 1 w 2 w 1 Lang(r 1 ), w 2 Lang(r 2 )} Lang(r 1 + r 2 ) = Lang(r 1 ) Lang(r 2 ) Lang(r ω ) = {w 1 w 2 i, w i Lang(r)} In a talk in Chennai (ICLA 09), Moshe Vardi narrated an experience that people in industry prefer regular expressions to finite automata. Is there such a syntax for 1-bounded Petri net systems?

Shuffle with synchronization Consider the syntax r e ::= a A r 1 ; r 2 r 1 + r 2 r ω ::= r e 1 e 2 sync J (e 1, e 2 ), J A e 1 [ρ], ρ : A A Where the semantics is: Lang(e 1 e 2 ) = {w w is a shuffle of w 1, w 2 ; w 1 Lang(e 1 ), w 2 Lang(e 2 )} Lang(sync J (e 1, e 2 )) = {(w 10 w 20 )a 1... a n (w 1n w 2n ), i, w 1i J = w 2i J = ǫ, {a 1,...,a n } J, w 10 a 1... a n w 1n Lang(e 1 ), w 20 a 1... a n w 2n Lang(e 2 )} Lang(e 1 [ρ]) = {ρ(t 1 )...ρ(t n ) t 1... t n Lang(e 1 )} For more details on shuffling, ask Hans van Ditmarsch.

Examples Modulo counting example: sync {j} ((j; j) ω, (j; j; j) ω ) Threshold counting example: sync {j1,j 2 }((p(j 1 + n; a; j 2 )) ω, (a(j 1 + n; p; j 2 )) ω )[j/j 1, j/j 2 ] Note the difference with: sync {j} ((p(j + n; a; j)) ω, (a(j + n; p; j)) ω ) Note: synchronized shuffle says something about communication, garbled with the concurrency. Best, Devillers and Koutny developed a syntax where the synchronization is an operation by itself. Hmm...?

Syntax matches systems Theorem (Grabowski) The languages defined by the above syntax are exactly the languages accepted by labelled 1-bounded Petri net systems. The proof of the converse heavily uses the renaming operation. Theorem (Zielonka) Labelled 1-bounded Petri nets can be thought of as some number of finite automata synchronizing on joint transitions. The proof begins by assuming a decomposition of the net into components, and uses difficult ideas of history update.

Unbounded shuffle Consider the syntax r e ::= a A r 1 ; r 2 r 1 + r 2 r ω ::= r e 1 e 2 e1 α sync J(e 1, e 2 ) e 1 [ρ] Where the semantics is: Lang(e α 1 ) = {w w is a shuffle of w 1,...,w n ; n 1, w 1,...,w n Lang(e 1 )} Theorem (Garg and Ragunath) This syntax matches the languages of Petri net systems. The proof assumes a decomposition of the net into components. No normal form theorem analogous to Zielonka s theorem is known.

Concurrency versus communication The syntax emphasizes the concurrency, modelled as shuffle. Synchronizing two unbounded length words (generated by the Kleene power) introduces the need for counting. Renaming makes the synchronization too powerful: difficult to say what matches with what. Allows talking about individual transitions in the guise of abstract actions, this is what is used in the proofs. Can we limit the syntax to avoid this? Can we make communication unambiguous?

Unambiguous communication Consider the syntax s ::= a A s 1 ; s 2 c ::= s usync J (c 1, c 2 ), J A e ::= c 1 c2 ω e 1 e 2 The unambiguous J-synchronization of c 1 and c 2 is defined only if for every letter in J, there is at most one occurrence when synchronizing two words from Lang(c 1 ) and Lang(c 2 ). (Note: Is this pointing as described by Gärdenfors?) All synchronizations are inside Kleene powers. No renaming: the communication you ask for, you get. Theorem A restriction of this syntax matches the languages accepted by live and safe marked graphs (nets where transitions are directly connected to each other and places play no role). Work in progress: identifying the restriction.

Unambiguous joint choices A subclass of nets called free choice systems only allows several processes to synchronize and make a joint choice (for example, two processes consider whether to synchronize on j 1 or j 2 and both of them make the same choice). Conjecture We can extend the above syntax to match the languages accepted by live and safe free choice systems.