1 Formal Models for Distributed Negotiations Zero-Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.

Slides:



Advertisements
Similar presentations
Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer Presented by:
Advertisements

CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
Models of Concurrency Manna, Pnueli.
Knowledge Based Synthesis of Control for Distributed Systems Doron Peled.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Deterministic Negotiations: Concurrency for Free Javier Esparza Technische Universität München Joint work with Jörg Desel and Philipp Hoffmann.
On the Dynamics of PB Systems with Volatile Membranes Giorgio Delzanno* and Laurent Van Begin** * Università di Genova, Italy ** Universitè Libre de Bruxelles,
Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten 11 April 2003 /e.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Roberto Pisa, Italy 13 June 2008 WADT Tiles for Reo Roberto Bruni Dipartimento di Informatica Università di Pisa WADT th International.
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
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.
Introduction in algorithms and applications Introduction in algorithms and applications Parallel machines and architectures Parallel machines and architectures.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Tiling Transactions in Rewriting Logic Roberto Bruni (Pisa/Illinois) José Meseguer (Illinois) Ugo Montanari (Pisa) WRLA 2002 Pisa, Italia, Sept.
1 Formal Models for Transactions: Petri Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
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.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
1 Formal Models for Distributed Negotiations Workflows, BizTalk and ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Transactions in Linda Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
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.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
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.
Canonical Prefixes of Petri Net Unfoldings Walter Vogler Universität Augsburg in cooperation with V. Khomenko, M. Koutny (CAV 2002, Acta Informatica 2003)
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
Dipartimento di Informatica Università di Pisa Nested Commits for Mobile Calculi: Extending Join Roberto Bruni, Hernán Melgratti and Ugo Montanari.
1 Formal Models for Distributed Negotiations Introduction Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Complete Axioms for Stateless Connectors joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
A summary of our activities about WSI Philippe Giabbanelli CMPT 894 – Spring 2008.
Speaking Bluntly about SharpHDL: Some Old Stuff and Some Other Proposed Future Extensions Gordon J. Pace & Christine Vella Synchron’05 Malta, November.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
1 Levi Lúcio © A Test Selection Language for CO-OPN Specifications Levi Lúcio, Luis Pedro and Didier Buchs University of Geneva.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Language Joint work with Elena.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
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.
CAP 4800/CAP 5805: Computer Simulation Concepts
Reasoning about the Behavior of Semantic Web Services with Concurrent Transaction Logic Presented By Dumitru Roman, Michael Kifer University of Innsbruk,
Formal Specification: a Roadmap Axel van Lamsweerde published on ICSE (International Conference on Software Engineering) Jing Ai 10/28/2003.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
Diagnostic Information for Control-Flow Analysis of Workflow Graphs (aka Free-Choice Workflow Nets) Cédric Favre(1,2), Hagen Völzer(1), Peter Müller(2)
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
composition of workflows
Formal methods: Lecture
Clockless Computing COMP
SS 2017 Software Verification Software Model Checking 2 - Parallelism
Automatic Verification
Operating System Reliability
Operating System Reliability
Logical architecture refinement
Operating System Reliability
Operating System Reliability
Operating System Reliability
Presentation transcript:

1 Formal Models for Distributed Negotiations Zero-Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas (ECI 2003), Buenos Aires, July

Formal Models for Distributed Negotiations2 Why Extending Petri Nets The basic P/T net model does not offer any synchronization between transitions Only token synchronization Useful because Translating primitives of concurrent languages can involve complex constructions Needed for expressing transactions Useful in addressing Issues of refinement / abstraction System design, Sw architectures Moving from free-choice systems to deadlock-avoiding Reliable multicasts

Formal Models for Distributed Negotiations3 Why Zero-Safe Nets Zero-Safe Nets as a basis for modeling distributed transactions and workflows Simplicity (natural extension of Petri nets) Based on a concept easily exportable to other paradigms Offering both refined / abstract views Admit distributed interpreters / implementations based on unfolding, no backtracking based on join-calculus Easy to combine with other net flavors (e.g. read arcs)

Formal Models for Distributed Negotiations4 The Idea Zero-Safe Nets are like P/T Petri nets but places are partitioned in Stable places Ordinary places defining observable states Zero-Safe places (or just zero places) Idealized resources Empty in all observable states Temporarily used during transactions (coordinating activities) Transaction as transition synchronization A computation from observable states to observable states via non-stable markings Transactions can end when all tokens in zero places have been consumed

Formal Models for Distributed Negotiations5 Rendez-Vous sendreceive The message can be sent

Formal Models for Distributed Negotiations6 Rendez-Vous sendreceive Sender is blocked until message is received Frozen!

Formal Models for Distributed Negotiations7 Rendez-Vous sendreceive Ready to commit

Formal Models for Distributed Negotiations8 Rendez-Vous sendreceive Coordinated commit

Formal Models for Distributed Negotiations9 Nondeterministic Rendez-Vous send receive

Formal Models for Distributed Negotiations10 Origin of the Name In classic Petri net Theory A place a is n-safe if in any reachable marking it contains at most n tokens A net is n-safe if all its places are such Thus a place / net is 0-safe if in any reachable marking it is empty! Useless? We write zero-safe, not 0-safe Zero places must be empty in any observable marking

Formal Models for Distributed Negotiations11 From Free-Choice to Non-Deadlocking turn left right

Formal Models for Distributed Negotiations12 From Free-Choice to Non-Deadlocking turn left right

Formal Models for Distributed Negotiations13 From Free-Choice to Non-Deadlocking turn left right

Formal Models for Distributed Negotiations14 From Free-Choice to Non-Deadlocking turn left right Success!

Formal Models for Distributed Negotiations15 From Free-Choice to Non-Deadlocking turn left right

Formal Models for Distributed Negotiations16 From Free-Choice to Non-Deadlocking turn left right Deadlock!

Formal Models for Distributed Negotiations17 From Free-Choice to Non-Deadlocking turn left right Only successful choices by design!

Formal Models for Distributed Negotiations18 No Reuse of Stable Tokens Before Commit sendreceive The message can be sent…

Formal Models for Distributed Negotiations19 No Reuse of Stable Tokens Before Commit sendreceive …but no-one can receive it!

Formal Models for Distributed Negotiations20 Multicasting b a z c 2 new receive send reset copy

Formal Models for Distributed Negotiations21 Multicasting b a z c 2 new receive send reset copy

Formal Models for Distributed Negotiations22 Multicasting b a z c 2 new receive send reset copy

Formal Models for Distributed Negotiations23 Multicasting b a z c 2 new receive send reset copy

Formal Models for Distributed Negotiations24 Multicasting b a z c 2 new receive send reset copy

Formal Models for Distributed Negotiations25 Formal Definition A Zero-Safe net is B=(S ,T,pre,post,u 0,Z) N B =(S ,T,pre,post,u 0 ) is the underlying P/T Petri net Z  S is the set of zero places L=S-Z is the set of stable places u 0  L  is the initial marking Note: S  = (L  Z)   L   Z  Markings can be represented as pairs (u,x) u  L  x  Z 

Formal Models for Distributed Negotiations26 Operational Semantics We can exploit the operational semantics (step semantics) of the underlying P/T Petri net N B uxNBvyuxNBvy (u,x)  B (v,y) [underlying steps] (u,  )  B (v,  ) uBvuBv [commit] (u,x)  B (v,x’) (u’,x’)  B (v’,y) (u  u’,x)  B (v  v’,y) [horizontal composition] The key feature is horizontal composition it acts as sequential composition on zero places it acts as parallel composition on stable places

Formal Models for Distributed Negotiations27 Transactions as Transitions The admissible behaviors of the net are those that can be committed Such concurrent transactions can be regarded as atomic activities at the higher level of abstraction In general there can be several P/T Petri nets N such that  N   B We should select an abstract net A (B) which is an ordinary P/T Petri net its places are the stable places of B its transitions are the (minimal) transactions of B not decomposable in parallel activities all other steps can be inferred

Formal Models for Distributed Negotiations28 Rendez-Vous sendreceive B A (B)

Formal Models for Distributed Negotiations29 From Free-Choice to Non-Deadlocking turn left right turn-Lturn-R B A (B)

Formal Models for Distributed Negotiations30 Collective or Individual? Different philosophies can yield different abstract nets Define an algebra of computations Careful axiomatization of horizontal composition  *  Select only those computations  such that  goes from stable marking to stable marking If there exist ,  with  =  then either  =  or  =  Computations are processes of NB Select only those processes that satisfy suitable conditions connected – not decomposable in parallel active processes all and only minimal / maximal places stable full – no idle place CTPh ITPh

Formal Models for Distributed Negotiations31 Multicasting CTPh b a c new 1-1 reset n n+1 …… Infinitely many transitions!

Formal Models for Distributed Negotiations32 Multicasting ITPh b a c new 1-1 reset n n+1 …… 1-n n+1 … Different copy policies are distinguished! Infinitely many transitions!

Formal Models for Distributed Negotiations33 Concurrent Copies sendcopy receive

Formal Models for Distributed Negotiations34 Sequential Copies send copy receive

Formal Models for Distributed Negotiations35 The ITPh “Monster” BCTPhITPh 2 2 n n ……

Formal Models for Distributed Negotiations36 Distributed Interpreter The operational semantics relies on some sort of meta- definition: one computes on the underlying net, building transaction segments and discarding undesired behaviors Given an interpreter: Is backtracking needed? Correctness and completeness? Halting criteria? The problem: Given a ZS net B with initial marking u 0, is it possible to compute in a distributed fashion the set R (B,u 0 ) of markings that can be reached via atomic transactions?

Formal Models for Distributed Negotiations37 Proposed Solution The unfolding technique provides a distributed interpreter Initial marking is needed! We modify the distributed algorithm for P/T net unfolding and extend it with a COMMIT rule that enforces synchronization in the execution of a transaction

Formal Models for Distributed Negotiations38 ZS Nets Interpreter I ka  u 0  a,k,   S U (B) initial marking (as before) t:  i s i  (v,  j n j z j )  T  ={  s i,k i,H i  } i  S U (B) co(  ) e=  t,  T U (B)  ={  z j,m,{e}  | 1  m  n j } j  S U (B) pre(e)=  post(e)=  can be either stable or zero only zero! wait… where is v?

Formal Models for Distributed Negotiations39 ZS Nets Interpreter II u 0  R (B,u 0 )  T U (B) co(  ) ZProd(  )=ZCons(  ) u 0  SProd(  ) - SCons(  )  R (B,u 0 ) Together with the unfolding we compute R (B,u 0 )! Where we take the obvious extensions to  of: ZCons(e) is the set of zero tokens consumed by the ancestors of e (including e itself) ZProd(e) is the set of zero tokens produced by the ancestors of e (including e itself) SCons(e) =   t:(u,x)  (v,y),   e u SProd(e) =   t:(u,x)  (v,y),   e v sets multisets

Formal Models for Distributed Negotiations40 Results Proposition If  T U (B) such that co(  ) and ZProd(  )=ZCons(  ), then  e=  t,  we have that t does not produce any zero token Theorem R (B,u 0 ) = { v | u 0  B v } Proof:  : by rule induction  : by induction on the proof of u  B v

Formal Models for Distributed Negotiations41 Open Problems Computing the ITPh abstract net Identify isomorphic processes For v  R (B,u 0 ) we could add tokens with history  … Halting criteria The algorithm recursively enumerate R (B,u 0 ) Decidability proved by Nadia Busi using a result of Reinhardt Complexity The algorithm is as much as distributed as the classical unfolding applied to the abstract net To improve efficiency the sets ZProd(e) … could be encoded in e (they can be easily calculated from the history component)

Formal Models for Distributed Negotiations42 Recap We have seen Basic theory of Zero-Safe nets Formal definition Graphical representation Examples Abstract (CTPh / ITPh) nets Distributed interpreter based on unfolding

Formal Models for Distributed Negotiations43 References Zero-safe nets: comparing the collective and individual token approaches (Information and Computation 156(1-2):46-89, Academic Press 2000) R. Bruni, U. Montanari Executing transactions in zero-safe nets (Proc. ATPN’00, LNCS 1376, Springer 2000, pp ) R. Bruni, U. Montanari