1 Formal Models for Transactions: Petri Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.

Slides:



Advertisements
Similar presentations
CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Advertisements

Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
Based on: Petri Nets and Industrial Applications: A Tutorial
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Merged Processes of Petri nets Victor Khomenko Joint work with Alex Kondratyev, Maciej Koutny and Walter Vogler.
On the Dynamics of PB Systems with Volatile Membranes Giorgio Delzanno* and Laurent Van Begin** * Università di Genova, Italy ** Universitè Libre de Bruxelles,
IE 469 Manufacturing Systems
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
ISBN Chapter 3 Describing Syntax and Semantics.
Roberto Pisa, Italy 13 June 2008 WADT Tiles for Reo Roberto Bruni Dipartimento di Informatica Università di Pisa WADT th International.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
Firewall Policy Queries Author: Alex X. Liu, Mohamed G. Gouda Publisher: IEEE Transaction on Parallel and Distributed Systems 2009 Presenter: Chen-Yu Chang.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
1 Formal Models for Distributed Negotiations Description Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations Zero-Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Synchronization Algebras with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 Formal Models for Distributed Negotiations Petri Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations Exercises Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
1 Formal Models for Transactions: Zero Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
Pre-nets, (read arcs) and unfolding: A functorial presentation Paolo Baldan (Venezia) Roberto Bruni (Pisa/Illinois) Ugo Montanari (Pisa) WADT Frauenchiemsee,
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
*Department of Computing Science University of Newcastle upon Tyne **Institut für Informatik, Universität Augsburg Canonical Prefixes of Petri Net Unfoldings.
Describing Syntax and Semantics
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
Merged processes – a new condensed representation of Petri net behaviour V.Khomenko 1, A.Kondratyev 2, M.Koutny 1 and W.Vogler 3 1 University of Newcastle.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 Algebraic Theories for Contextual Pre-Nets Roberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with: José Meseguer (UIUC) Ugo.
1 Ivan Lanese Computer Science Department University of Bologna Synchronization strategies for global computing models.
Complete Axioms for Stateless Connectors joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad.
Propositional Calculus Math Foundations of Computer Science.
Partial Order Semantics of Types of Nets Robert Lorenz, Gabriel Juhás, Sebastian Mauser SOFSEM 2009, Špindlerův Mlýn, CZ, 27th February 2009.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Introduction to ASMs Dumitru Roman Digital Enterprise Research Institute
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Reactive systems – general
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
Language: Set of Strings
Modelling by Petri nets
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
School of Computer Science & Software Engineering
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications Chapter.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Operational Semantics Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Technology of information systems Lecture 5 Process management.
Process Mining – Concepts and Algorithms Review of literature on process mining techniques for event log data.
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
Polynomial analysis algorithms for free-choice workflow nets
Unit-III Algebraic Structures
Introduction to the Theory of Computation
Clockless Computing COMP
Petri Nets Laurie Frazier.
Presentation transcript:

1 Formal Models for Transactions: Petri Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration IMT- Institutions Markets Technologies - Alti Studi Lucca

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 2 Models and Languages for Coordination and Orchestration Contents Orchestration with Petri Nets Transactions with Zero Safe Nets From BizTalk to Zero Safe Nets

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 3 Models and Languages for Coordination and Orchestration Contents Orchestration with Petri Nets Transactions with Zero Safe Nets From BizTalk to Zero Safe Nets

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 4 Models and Languages for Coordination and Orchestration Petri Nets Place/Transition Petri nets [Petri 1962] Well-known model of concurrency Theory / Applications Well-supported by a large community Academy / Industry Well-developed tools A media for conveying ideas to non-expert Suggestive graphical presentation

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 5 Models and Languages for Coordination and Orchestration Foundational Model of Concurrency Basic monoidal structure of states A graph whose set of nodes is a monoid Precursor of most modern models and calculi of concurrency Monoidal structure of computations Essentially multiset rewriting Framework for studying issues of Causality, concurrency, conflict Event structures and domain Deadlock, liveness, boundedness Reachability, coverability, invariants

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 6 Models and Languages for Coordination and Orchestration General-purpose Model of (Concurrent) Computation Algebraic representations of data, states, transitions, steps, computations Basic rewriting system later generalized by Term rewriting, graph rewriting, term-graph rewriting, concurrent constraint models A framework where to mix concurrency with other features Data types, time, probability, dynamic reconfiguration, read- without-consuming, negative preconditions, objects, Semantic framework for encoding other models and languages Useful in studying and comparing expressiveness issues

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 7 Models and Languages for Coordination and Orchestration Practical Specification Language Standard theory and notation Simple and natural graphical representation Exploited in many heterogeneous areas Supported by tools of “industrial quality” Suitable for concurrent orchestration!

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 8 Models and Languages for Coordination and Orchestration Terminology and Notation Places a,b,c,… classes of resources Transitions t,t’,… basic activities Tokens  instances of a resource class Markings u,v,w,… multisets of resources Multiset union u  w Empty marking  Places are unary markings a Multiset inclusion  (e.g.   2a  3c  3a  b  3c) Pre-sets  t resources necessary to execute t multiset fetched by the execution of t Post-sets t  resources produced by t We write t:u  v for  t=u and t  =v

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 9 Models and Languages for Coordination and Orchestration Formal Definition A P/T Petri net is a graph N=(S ,T,pre,post,u 0 ) S  is the set of markings (is the free monoid over the set of places S) Nodes of the graph T is the set of transitions Arcs of the graph pre:T  S  assigns pre-sets to transitions pre(t) =  t   Source map of the graph post:T  S  assigns post-sets to transitions post(t) = t  Target map of the graph u 0 is the initial marking

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 10 Models and Languages for Coordination and Orchestration Graphically a2a2 a1a1 a5a5 a4a4 a3a3 2 2 places are circles transitions are boxes weighted arcs model pre-/post-sets t1t1 t2t2 t3t3 t4t4 t5t5

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 11 Models and Languages for Coordination and Orchestration Enabling A transition t is enabled in the marking u if  t  u Meaning that there exists u’ such that u=u’   t If t is enabled in u, it means that the system has enough resources to execute t

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 12 Models and Languages for Coordination and Orchestration Firing The execution of t is called a firing t can first fetch the resources in its pre-set and then release fresh resources according to its post-set the system moves from the state u = u’   t to the state v = u’  t  the firing is usually written u [t  v

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 13 Models and Languages for Coordination and Orchestration Steps A multiset of transition  i n i t i is enabled in the marking u if there exists u’ such that u = u’   i n i  t i Several transitions that are concurrently enabled can fire concurrently their concurrent execution is called a step from u = u’   i n i  t i to v = u’   i n i t i  Usually written u [  i n i t i  v

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 14 Models and Languages for Coordination and Orchestration Example: Step Sequences a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 :a 5  a 1 t 2 :2a 1  a 4  a 2  2a 5 t 3 :a 2  a 3 t 4 :a 3  a 2 t 5 :a 3  a 4 4a 1  2a 2

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 15 Models and Languages for Coordination and Orchestration Example: Step Sequences a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 :a 5  a 1 t 2 :2a 1  a 4  a 2  2a 5 t 3 :a 2  a 3 t 4 :a 3  a 2 t 5 :a 3  a 4 4a 1  2a 2 [2t 3  4a 1  2a 3

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 16 Models and Languages for Coordination and Orchestration Example: Step Sequences a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 :a 5  a 1 t 2 :2a 1  a 4  a 2  2a 5 t 3 :a 2  a 3 t 4 :a 3  a 2 t 5 :a 3  a 4 4a 1  2a 2 [2t 3  4a 1  2a 3 [t 4  t 5  4a 1  a 2  a 4

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 17 Models and Languages for Coordination and Orchestration Example: Step Sequences a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 :a 5  a 1 t 2 :2a 1  a 4  a 2  2a 5 t 3 :a 2  a 3 t 4 :a 3  a 2 t 5 :a 3  a 4 4a 1  2a 2 [2t 3  4a 1  2a 3 [t 4  t 5  4a 1  a 2  a 4 [t 2  2a 1  2a 2  2a 5

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 18 Models and Languages for Coordination and Orchestration Operational Semantics We can describe concurrent computations by means of three simple inference rules: aSaS aNaaNa [reflexivity] t:u  v  T uNvuNv [firing] u  N v u’  N v’ u  u’  N v  v’ [parallel composition] u  N v v  N w uNwuNw [sequential composition] uNwuNw *

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 19 Models and Languages for Coordination and Orchestration Basic Properties Proposition There is a step sequence leading from u to v iff u  N v Decidable properties termination reachability coverability *

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 20 Models and Languages for Coordination and Orchestration An Algebra of Computations We can use proof terms to denote computations: aSaS a:a  N a [reflexivity] t:u  v  T t:u  N v [firing]  :u  N v  :u’  N v’  :u  u’  N v  v’ [parallel composition]  :u  N v  :v  N w ;:uNw;:uNw [sequential composition] associative commutative unit  :  N  monoid homomorphism identities u:u  N u

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 21 Models and Languages for Coordination and Orchestration Example: Step Sequences a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 :a 5  a 1 t 2 :2a 1  a 4  a 2  2a 5 t 3 :a 2  a 3 t 4 :a 3  a 2 t 5 :a 3  a 4 4a 1  2a 2 [2t 3  4a 1  2a 3 [t 4  t 5  4a 1  a 2  a 4 [t 2  2a 1  2a 2  2a 5 (4a 1  2t 3 );(4a 1  t 4  t 5 );(2a 1  a 2  t 2 ) idle resourcesactivities : 4a 1  2a 2  2a 1  2a 2  2a 5

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 22 Models and Languages for Coordination and Orchestration Basic Facts About Concurrency idlingmonoid homomorphism Suppose t:u  v and t’:u’  v’ t;v = t = u;t Idle steps are immaterial t  t’: u  u’  N v  v’ // concurrent execution t  t’ = (t;v)  (u’;t’) = (t  u’);(v  t’) // t precedes t’ t  t’ = (u;t)  (t’;v) = (u  t’);(t  v’) // t’ precedes t If two activities can be executed concurrently, they can be executed in any order The vice versa is not true Take t:a  a and t’:a  a t;t’ and t’;t are very different from t  t’

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 23 Models and Languages for Coordination and Orchestration Token Philosophies This semantics follows the so-called Collective Token Philosophy (CTPh) Any two tokens in the same place are indistinguishable one from the other computationally equivalent Other semantics follow the Individual Token Philosophy (ITPh) Any token carries its own history tokens have unique origins fetching one token makes an activity causally dependent from the activities that produced it such analysis can be important for recovery purposes, detecting intrusions, increase parallelism, …

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 24 Models and Languages for Coordination and Orchestration Process Semantics Non-sequential behaviour of nets Causality and concurrency within a single run Runs are described by Processes  = (P,  ) A process net P acyclic net pre-/post-sets are just sets, not multisets transitions have disjoint pre-sets transition have disjoint post-sets A net morphism  :P  N places to places transitions to transitions

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 25 Models and Languages for Coordination and Orchestration Example a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 Graphically  is rendered by a suitable labeling (here we use colours for simplicity) a1a1 a1a1 a1a1 a1a1 a4a4 a2a2

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 26 Models and Languages for Coordination and Orchestration Example a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t3t3 t2t2 a3a3 a5a5 a5a5 a2a2 a1a1 a1a1 a1a1 a1a1 a4a4 a2a2

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 27 Models and Languages for Coordination and Orchestration Example t5t5 t1t1 a4a4 a1a1 a2a2 a1a1 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 t3t3 t2t2 a3a3 a5a5 a5a5 a2a2 a1a1 a1a1 a1a1 a1a1 a4a4 a2a2

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 28 Models and Languages for Coordination and Orchestration Example: Process  1 t2t2 a5a5 a5a5 a2a2 a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 a2a2 a1a1 t5t5 t1t1 a4a4 a1a1 t3t3 t2t2 a3a3 a5a5 a5a5 a2a2 a1a1 a1a1 a1a1 a1a1 a4a4 a2a2 the last firing of t 2 causally depends on all other events

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 29 Models and Languages for Coordination and Orchestration Example: Process  2 Now there are two disjoint activities! a5a5 a4a4 a3a3 2 2 t1t1 t2t2 t3t3 t4t4 t5t5 a2a2 a1a1 t2t2 a5a5 a5a5 a2a2 t5t5 t1t1 a4a4 a1a1 t3t3 t2t2 a3a3 a5a5 a5a5 a2a2 a1a1 a1a1 a1a1 a1a1 a4a4 a2a2

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 30 Models and Languages for Coordination and Orchestration FOURTH HOMEWORK Using the algebra of computations that we have seen: write the expression associated with  1 ( 2a 1  t 2  t 3 ) ;... write the expression associated with  2 show that the two expressions can be proved equal to ( t 2 ; a 2  a 5  t 1 )  ( 2a 1  t 3 ; 2a 1  t 5 ; t 2 )

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 31 Models and Languages for Coordination and Orchestration Concatenable Processes Each process  defines an initial marking u  -image of the set of places with no antecedents – minimal places and a final marking v  -image of the set of places with no successors – maximal places  :u  v Can processes be composed analogously to CTPh runs? In general there is some ambiguity The correspondence between final places of the first process and initial places of the second process must be fixed Concatenable processes come equipped with suitable orders on minimal / maximal places of P The orders concern places that are mapped to the same place of N unique source of ambiguity

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 32 Models and Languages for Coordination and Orchestration Concatenable Processes: Graphically a’ 1 a’ 2 a’ n’ b’ 1 b’ 2 b’ m’ superscripts denote order on minimal places subscripts denote order on maximal places d’ 1 d’ 2 d’ k’ a1a1 a2a2 anan b1b1 b2b2 bmbm d1d1 d2d2 dkdk  : na  mb  …  kd  n’a’  m’b’  …  k’d’ a,b,…d are places of N

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 33 Models and Languages for Coordination and Orchestration Composing Concatenable Processes Idle computations any place is both minimal and maximal (no transitions) minimal and maximal orders coincide Parallel composition  1  2 juxtaposition (NOT COMMUTATIVE) the orders in the result are obtained by assuming that places of the first process precede places of the second process Sequential composition  1 ;  2 maximal places of  1 are merged with minimal places of  2 according to their orders

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 34 Models and Languages for Coordination and Orchestration Symmetries Special concatenable processes allow to rearrange the orders of minimal and maximal places called symmetries  : u  v  v  u (note that u  v = v  u) no real computation the order of minimal places differs from that of maximal places symmetries are important to generate all possible causal dependencies arising from different combination of minimal and maximal places during composition

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 35 Models and Languages for Coordination and Orchestration Unfolding Semantics Instrumental in giving denotational semantics to nets a unique prime event structure that faithfully represent causality, concurrency and conflict between all possible events that can be generated from the net unfolding approximations can be used for verification Unfolding combines all processes in a unique structure non-deterministic exploration of computation space define a nondeterministic net U (N) together with a net morphism from U (N) to N acyclic, no backward conflicts, pre-/post-sets are sets places are tokens, transitions are events

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 36 Models and Languages for Coordination and Orchestration a Example: Three Processes b t s t a r a c s r c b t t a a s r c b a a s r c b 11 22 33 N

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 37 Models and Languages for Coordination and Orchestration c Example: Unfolding I b t s r a c a s r b t a r a t r

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 38 Models and Languages for Coordination and Orchestration a c Example: Unfolding II b t s r a c t t a a s r b #  co r r Three relations:  : Causality co : Concurrency # : Conflict

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 39 Models and Languages for Coordination and Orchestration Unfolding Construction Immediate precedence < 0 = { (a,t) | a  t}  {(t,a) | a  t } Causal dependence  is the transitive closure of < 0 Binary Conflict # is the minimal symmetric relation that is hereditary w.r.t.  and contains # 0 defined by: s# 0 t iff s  t  s  t  Concurrency co(x,y) iff  (x<y  y<x  x#y) we also write co(X) iff for all x,y  X we have co(x,y) Note that  and # have empty intersection

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 40 Models and Languages for Coordination and Orchestration Unfolding Construction: Notation Places of U (N)  a,n,H  a is the corresponding place in N n is a positive natural number introduced to distinguish tokens with the same history H is the history of the place either the empty set or a single event (the transition that generated the token) Transitions of U (N) (events)  t,H  t is the corresponding transition in N H is the history of the event (the set of fetched tokens)

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 41 Models and Languages for Coordination and Orchestration b t s r a c x 1 =  a,1,   x 2 =  b,1,   e 1 =  t,{x 1 }  x 3 =  a,1,{e 1 }  e 3 =  r,{x 1,x 4 }  e 2 =  s,{x 2 }  x 4 =  c,1,{e 2 }  r e 4 =  r,{x 3,x 4 }  r e 6 =  r,{x 5,x 4 }  Unfolding Construction: Example e 5 =  t,{x 3 }  x 5 =  a,1,{e 5 } 

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 42 Models and Languages for Coordination and Orchestration Unfolding Construction: Inference Rules The net U (N) is the minimal net generated by the two rules below ka  u 0  a,k,   S U (N) initial marking of U (N) t:  i a i   j n j b j  T  ={  a i,k i,H i  } i  S U (N) co(  ) e=  t,  T U (N)  ={  b j,m,{e}  | 1  m  n j } j  S U (N) pre(e)=  post(e)= 

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 43 Models and Languages for Coordination and Orchestration Unfolding Construction: Remarks The condition co(  ) depends exclusively on the histories H i and cannot be altered by successive firings Histories can be completely cabled inside the tokens so that it is not necessary to re-compute them at every firing (as in memoizing or dynamic programming) Histories retain concurrent information, not just sequential Each token / event is generated exactly once It can be referred several times successively Several occurrences of the second rule can be applied concurrently The unfolding can be implemented as a distributed algorithm

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 44 Models and Languages for Coordination and Orchestration References I Kommunikation mit automaten (PhD Thesis, Institut fur Instrumentelle Mathematik, Bonn 1962) C.A. Petri Petri nets: an introduction (EATCS Monograph on TCS, Springer Verlag 1985) W. Reisig Petri nets are monoids (Information and Computation 88(2): , Academic Press 1990) J. Meseguer, U. Montanari

Roberto IMT Lucca 12 April 2005 Institutions Markets Technologies IMT 45 Models and Languages for Coordination and Orchestration References II The non-sequential behaviour of Petri nets (Information and Computation 57: , Academic Press 1983) U. Goltz, W. Reisig Petri nets, event structures and domains, part I (Theoretical Computer Science 13:85-108, 1981) M. Nielsn, G. Plotkin, G. Winskel Configuration structures (Proc. LICS’95, IEEE, pp ) R.J. van Glabbeek, G.D. Plotkin