1 GT-VC 2005, San Francisco, August 22, 2005 Ugo Montanari Università di Pisa Ivan Lanese Università di Pisa Hoare vs. Milner: Comparing Synchronizations.

Slides:



Advertisements
Similar presentations
Jeremy S. Bradbury, James R. Cordy, Juergen Dingel, Michel Wermelinger
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.
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
1 PROPERTIES OF A TYPE ABSTRACT INTERPRETATER. 2 MOTIVATION OF THE EXPERIMENT § a well understood case l type inference in functional programming à la.
ARTIST2 - MOTIVES Trento - Italy, February 19-23, 2007 Model Transformation and UML Reiko Heckel University of Leicester, UK Foundations of Model Transformation.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Programming Paradigms for Concurrency Lecture 11 Part III – Message Passing Concurrency TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
1 Towards formal manipulations of scenarios represented by High-level Message Sequence Charts Loïc Hélouet Claude Jard Benoît Caillaud IRISA/PAMPA (INRIA/CNRS/Univ.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
Roberto Pisa, Italy 13 June 2008 WADT Tiles for Reo Roberto Bruni Dipartimento di Informatica Università di Pisa WADT th International.
Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock.
A. Bucchiarone / Dagstuhl/ 2007 APL Antonio Bucchiarone PhD Student – IMT Graduate School Piazza S. Ponziano, Lucca (Italy)
SHReQ: Coordinating Application Level QoS Speaker: Ivan Lanese Dipartimento di Informatica Università di Pisa Authors: Dan Hirsch & Emilio Tuosto Dipartimento.
1 Ivan Lanese Computer Science Department University of Bologna Italy Exploiting user-definable synchronizations in graph transformation.
1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
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.
Synchronization Algebras with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese.
1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion.
1 Ugo Montanari Dipartimento di Informatica Università di Pisa Roberto Bruni, GianLuigi Ferrari, Hernan Melgratti, Emilio Tuosto (Pisa) Cosimo Laneve (Bologna)
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
1212 Models of Computation: Automata and Processes Jos Baeten.
1 Ivan Lanese Computer Science Department University of Bologna Italy Evolvable systems: some ideas for modelling With input from Davide Sangiorgi, Fabrizio.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
New insights on architectural connectors joint work with Roberto Bruni University of Pisa, Italy Ugo Montanari University of Pisa, Italy José Luiz Fiadeiro.
07/06/98 知的インタフェース特論 1 Operational Semantics Again, the question? Operational Model = Labeled Transition System If P and Q yields a same LTS. How to define.
1 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari From Graph Rewriting to Logic Programming joint work with.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio.
1 Mapping Fusion and Synchronized Hyperedge Replacement into Logic Programming joint work with Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
1 Formal Models for Transactions: Zero Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 Ivan Lanese Computer Science Department University of Pisa Prof. Ugo Montanari Synchronization strategies for global computing Relator: Thesis Progress.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
1 CoMeta, final workshop, /12/2003 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari A graphical Fusion Calculus Joint work.
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Modeling a Service and Session Calculus with Hierarchical Graph Transformation Roberto Bruni, Andrea Corradini, Ugo Montanari (based on joint work with.
Modeling Community with Tiles joint work with Ivan Lanese Ugo Montanari Dipartimento di Informatica Università di Pisa Roberto Bruni Dipartimento di Informatica.
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.
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.
Synchronizations with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
Lecture 6 Template Semantics CS6133 Fall 2011 Software Specification and Verification.
Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
Coalgebraic Symbolic Semantics Filippo Bonchi Ugo Montanari.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
Introduction to Graph Grammars Fulvio D’Antonio LEKS, IASI-CNR Rome,
A. Bucchiarone, Juan P. Galeotti / GT-VMT’08 Dynamic Software Architectures Verification using DynAlloy Antonio Bucchiarone IMT Graduate School of Lucca,
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Weak Bisimilarity Coalgebraically Andrei Popescu Department of Computer Science University of Illinois.
Modeling a Service and Session Calculus with Hierarchical Graph Transformation Joint work with Roberto Bruni and Andrea Corradini, second part Ugo Montanari.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
Architectural Design Rewriting as Architectural Description Language R. Bruni A. LLuch-Lafuente U. Montanari E. Tuosto.
Compiler Construction Lecture Five: Parsing - Part Two CSC 2103: Compiler Construction Lecture Five: Parsing - Part Two Joyce Nakatumba-Nabende 1.
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
Validating Reconfigurations of Reo Circuits
Internet of Things A Process Calculus Approach
Abstraction.
CASL-Common Algebraic Specification Language
A MODULAR LTS FOR OPEN REACTIVE SYSTEMS
Presentation transcript:

1 GT-VC 2005, San Francisco, August 22, 2005 Ugo Montanari Università di Pisa Ivan Lanese Università di Pisa Hoare vs. Milner: Comparing Synchronizations in a Graphical Framework With Mobility in collaboration with

2 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

3 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

4 GT-VC 2005, San Francisco, August 22, 2005 Graphical Approach to Distributed Systems Motivations: Intuitive representation of distribution Natural concurrent semantics No need of structural axioms Existing modeling languages, e.g. UML Applications to software architectures and ADL’s Well-developed foundations

5 GT-VC 2005, San Francisco, August 22, 2005 Graph vs. Term Transformations Terms Terms –LTS defined via SOS rules –Reduction rules –Abstract semantics –Non-interleaving semantics Graphs Graphs –Double-pushout derivations –Concurrent semantics based on shift equivalence –Synchronized (hyper)edge replacement

6 GT-VC 2005, San Francisco, August 22, 2005 (Hyper)Graphs Edge: Atomic item with a label from alphabet LE= {LE n } n=0,1,… with as many (ordered) tentacles as the rank of its label. Graph: A set of nodes and a set of edges such that each edgeis connected, by its tentacles, to its attachment nodes. A set of external nodes, identified by distinct names, defines the connecting points with the environment. L M L M x y z

7 GT-VC 2005, San Francisco, August 22, 2005 A Notation For Graphs Edge: Atomic item with a label from alphabet LE= {LE n } n=0,1,… with as many (ordered) tentacles as the rank of its label. Graph: A set of nodes and a set of edges such that each edgeis connected, by its tentacles, to its attachment nodes. A set of external nodes, identified by distinct names, defines the connecting points with the environment.  G  G ::= L(x) | G|G | x. G | nil Representation of graphs as syntactic judgements   N set of names G set of edges fn(G)   binds as usual

8 GT-VC 2005, San Francisco, August 22, 2005 A Notation For Graphs Well formed judgements for graphs Structural Axioms (AG5) x.G = G if x  fn(G) (AG1) (G 1 |G 2 )|G 3 = G 1 |(G 2 |G 3 ) (AG2) G 1 |G 2 = G 2 |G 1 (AG3) G 1 | nil = G 1 (AG4) x. y.G = y. x.G (AG6) x.G = y.G {y/x} if y  fn(G) (AG7) x.(G 1 |G 2 ) = ( x. G 1 ) | G 2 if x  fn(G 2 )

9 GT-VC 2005, San Francisco, August 22, 2005 A Notation For Graphs Well formed judgements for graphs (RG1)  x 1,…,x n nil (RG2) x 1,…,x n L(y 1,…,y m )  L  LE m y i  {x j }  G 1 |G 2 (RG3)  G 1  G 2    Syntactic Rules (RG4) , x G   x. G 

10 GT-VC 2005, San Francisco, August 22, 2005 x,y z, w. C(x,w) | C(w,y) | C (y,z) | C(z,x)  A Notation For Graphs Ring Example w z

11 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

12 GT-VC 2005, San Francisco, August 22, 2005 Edge Replacement Systems Productions: A context free production rewrites a single edge labeled by L into an arbitrary graph R. (Notation: L  R) L R H

13 GT-VC 2005, San Francisco, August 22, 2005 Edge Replacement Systems Productions: A context free production rewrites a single edge labeled by L into an arbitrary graph R. (Notation: L  R) R R’ Rewritings of different edges can be executed concurrently L L’ H

14 GT-VC 2005, San Francisco, August 22, 2005 Synchronized Edge Replacement Synchronized rewriting: Actions are associated to nodes in productions. Each rewrite of an edge must match actions with (a number of) its adjacent edges and they have to move simultaneously How many edges synchronize depends on the synchronization policy Synchronized rewriting propagates synchronization all over the graph

15 GT-VC 2005, San Francisco, August 22, 2005 Synchronized Edge Replacement Hoare Synchronization: All adjacent edges must match the actions on the shared node Milner Synchronization: Only two of the adjacent edges synchronize by matching their complementary actions a a a 3 3 B1A1 B2A2 Hoare synchronization a

16 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

17 GT-VC 2005, San Francisco, August 22, 2005 Adding Mobility Synchronized rewriting with name mobility – Add to an action in a node a tuple of names that it wants to communicate – The synchronization step has to match actions and tuples – The declared names that were matched are used to merge the corresponding nodes a ( x ) ( y ) B1A1 a = a B2A2 a a x= y

18 GT-VC 2005, San Francisco, August 22, 2005 Transitions as Judgements Formalization of synchronized rewriting as judgements Transitions  G 1  ,   G 2     :   (A x N* ) (x, a, y)   if  (x) = (a, y)   is the set of new names that are used in synchronization   = {z |  x.  (x) = (a, y), z  , z  set(y)} o

19 GT-VC 2005, San Francisco, August 22, 2005 Transitions as Judgements Formalization of synchronized rewriting as judgements Derivations  0 G 0   1 G 1  …   n G n   11 22 nn  x 1,…,x n L(x 1,…,x n )  x 1,…,x n,  G Productions    Free names can: i) be added to productions; and ii) renaming is possible Transitions are generated from the productions by applying the transition rules of the chosen synchronization mechanism

20 GT-VC 2005, San Francisco, August 22, 2005 Synchronization via Unification Hoare synchronization On each node all edges must have the same action Synchronization is possible if there is a most general unifier of the new nodes For any R   x A x N* (not necessarily a partial function)  (R):    n(R) is the mgu of equations (a= b)  (Y = Z) with (x,a,Y) and (x,b,Z) in R where (as usual)   = {z | (x,a,Y)  R, z  set(Y), z   }

21 GT-VC 2005, San Francisco, August 22, 2005 Example b) x C Brother C C C C C C CCC (4)(3)(2)(1) x Initial Graph C Brother: C C C Star Rec. S S SS (5) C S Star Reconfiguration: (w) r(w)

22 GT-VC 2005, San Francisco, August 22, 2005 Synchronization via Unification Milner synchronization On each node at most two edges must have actions, and in this case they must be complementary Synchronization is possible if there is a most general unifier of the new nodes

23 GT-VC 2005, San Francisco, August 22, 2005 Adding Fusion Synchronized rewriting with mobility and fusion  G 1  ,  G 2    yy  :   (A x N* ) (x,a,y)   if  (x) = (a, y)  :    idempotent yy n(  ) = { z |  x.  (x)=(a,y), z  Set(y) }   = n(  ) \   =  +   o

24 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

25 GT-VC 2005, San Francisco, August 22, 2005 Rewriting Rules, Hoare Synchronization I

26 GT-VC 2005, San Francisco, August 22, 2005 Rewriting Rules, Hoare Synchronization II

27 GT-VC 2005, San Francisco, August 22, 2005 Rewriting Rules, Milner Synchronization I

28 GT-VC 2005, San Francisco, August 22, 2005 Rewriting Rules, Milner Synchronization II

29 GT-VC 2005, San Francisco, August 22, 2005 Related Work Grammars for distributed systems [Castellani and Montanari, LNCS 1953, 1982], [Degano and Montanari, JACM 1987] Graph amalgamation [Boehm, Fonio and Habel, JCSS, 1987] CHARM (R for restriction) [Corradini, Montanari and Rossi, TCS 1994] Mobile version (w. applications to software architectures, only  -I-like mobility, Hoare synchronization) [Hirsch and Montanari, Coordination 2000] Modeling  -calculus (Milner synchronization) [Hirsch and Montanari, Concur 2001] Modeling Ambient calculus [Ferrari, Montanari and Tuosto, ICTCS 2001] Modeling Fusion calculus [Lanese and Montanari, to appear in TCS]

30 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

31 GT-VC 2005, San Francisco, August 22, 2005 Expressiveness Measure (S 1,C 1 ) ≥ (S 2,C 2 ) (i.e. style S 1 is more expressive than style S 2 ) iff there exists a uniform simulation function f such that for all P and G C 2 -behav S 2 (P)(G) = C 1 -behav S 1 (f(P))(G) C-behav S (P)(G) = reachable graphs 1 : one-step computations max: maximal computations all: all computations synchronization style: H, M set of productions initial graph

32 GT-VC 2005, San Francisco, August 22, 2005 Hoare and Milner, Direct Comparison, I (Milner,C 1 ) ≥ (Hoare,C 2 ) for all C 1 and C 2 i.e. Hoare cannot be uniformely simulated by Milner The reason is that Milner synchronization style is monotone, i.e. in a Milner computation we can always add to a graph an additional part which stays idle, while Hoare style is not monotone

33 GT-VC 2005, San Francisco, August 22, 2005 Hoare and Milner, Direct Comparison, II (Hoare,C 1 ) ≥ (Milner,C 2 ) for all C 1 and C 2 i.e. Milner cannot be uniformely simulated by Hoare The reason is that in Hoare synchronization style restriction just hides part of the observation, while in Milner style restriction may forbid computations

34 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

35 GT-VC 2005, San Francisco, August 22, 2005 Translation via Amoeboids Amoeboids are graphs with suitable edge labels and corresponding productions which simulate the behavior of nodes in a different synchronization style Function [[-]] replaces nodes with amoeboids while function [[-]] -1 replaces amoeboids with nodes. We always have that [[([[G]])]] -1 = G

36 GT-VC 2005, San Francisco, August 22, 2005 Implementing Hoare with Milner H-amoeboids implement broadcasting. C-amoeboids saturate nodes with less than 3 tentacles. We have rules for every action a (here with arity 2). We have C-behav H (P)(G) = [[C-behav M (f(P))([[G]])]] -1

37 GT-VC 2005, San Francisco, August 22, 2005 Implementing Milner with Hoare M-amoeboids implement routing. We have rules for every action a and two analogous productions for synchronizing x with z and y with z. We have only C-behav M (P)(G)  [[C-behav H (f(P))([[G]])]] -1 since the amoeboids can also synchronize several pairs in parallel.

38 GT-VC 2005, San Francisco, August 22, 2005 Outline Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility Hoare and Milner Synchronization, with Fusion Direct Comparison Comparison with Translations Conclusions and Future Work

39 GT-VC 2005, San Francisco, August 22, 2005 Conclusions and Future Work Graph models with synchronized hyperedge replacement allow for more general synchronization mechanisms than ordinary process algebras, e.g. processes can synchronize at more than one channel and with more than one other process. These extensions are needed for implementing one synchronization style into another. Reachability in Hoare/Milner synchronization styles cannot be simulated uniformely No countexample uses mobility, and thus the expressivenesses are incomparable even without mobility, and mobility does not bridge the gap Distributed simulation via amoeboids of Milner style routers allows only concurrent pairwise synchronization Generic synchronization styles and more general notions of implementation and refinement involving atomicity and bisimilarity can be considered: see the forthcoming PhD thesis of Ivan Lanese