Comparing coordination models and architectures using embeddings

Similar documents
CONTROL SYSTEMS, ROBOTICS AND AUTOMATION Vol. XV - Modeling of Discrete Event Systems - Stéphane Lafortune

Causal closure for MSC languages

Deflation of the I-O Series Some Technical Aspects. Giorgio Rampa University of Genoa April 2007

Analyzing Simulation Results

. The univariate situation. It is well-known for a long tie that denoinators of Pade approxiants can be considered as orthogonal polynoials with respe

Prerequisites. We recall: Theorem 2 A subset of a countably innite set is countable.

Data-Driven Imaging in Anisotropic Media

3.8 Three Types of Convergence

Distributed Subgradient Methods for Multi-agent Optimization

ADHESIVE AND QUASIADHESIVE CATEGORIES

Tight Bounds for Maximal Identifiability of Failure Nodes in Boolean Network Tomography

Generalized Queries on Probabilistic Context-Free Grammars

A note on the multiplication of sparse matrices

Block designs and statistics

Math 262A Lecture Notes - Nechiporuk s Theorem

Midterm 1 Sample Solution

Embedded Systems Development

This model assumes that the probability of a gap has size i is proportional to 1/i. i.e., i log m e. j=1. E[gap size] = i P r(i) = N f t.

Fast Montgomery-like Square Root Computation over GF(2 m ) for All Trinomials

Kernel Methods and Support Vector Machines

arxiv: v1 [math.nt] 14 Sep 2014

relations are not sucient for describing the seantics of these classes of systes, and thus it would be liitative to use values as observables. On the

Chapter 6 1-D Continuous Groups

Revealed Preference with Stochastic Demand Correspondence

A method to determine relative stroke detection efficiencies from multiplicity distributions

Refining UML interactions with underspecification and nondeterminism. Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen

Birthday Paradox Calculations and Approximation

e-companion ONLY AVAILABLE IN ELECTRONIC FORM

Solutions of some selected problems of Homework 4

Handout 7. and Pr [M(x) = χ L (x) M(x) =? ] = 1.

Revealed Preference and Stochastic Demand Correspondence: A Unified Theory

A Better Algorithm For an Ancient Scheduling Problem. David R. Karger Steven J. Phillips Eric Torng. Department of Computer Science

Polygonal Designs: Existence and Construction

MULTIPLAYER ROCK-PAPER-SCISSORS

Vulnerability of MRD-Code-Based Universal Secure Error-Correcting Network Codes under Time-Varying Jamming Links

The Transactional Nature of Quantum Information

Reduced Length Checking Sequences

Constant-Space String-Matching. in Sublinear Average Time. (Extended Abstract) Wojciech Rytter z. Warsaw University. and. University of Liverpool

Low complexity bit parallel multiplier for GF(2 m ) generated by equally-spaced trinomials

Upper bound on false alarm rate for landmine detection and classification using syntactic pattern recognition

OPTIMIZATION in multi-agent networks has attracted

SPECTRUM sensing is a core concept of cognitive radio

arxiv: v1 [cs.ds] 17 Mar 2016

Constrained Consensus and Optimization in Multi-Agent Networks arxiv: v2 [math.oc] 17 Dec 2008

On Process Complexity

p1 t1 p2 t2 p3 t3 p4 t4 p5 t5 p6 t6 p7 t7 p8 t8 p0 r2+ r1+ a1+ a2+ r2- r1- a1- a2- (a) (b)

Handwriting Detection Model Based on Four-Dimensional Vector Space Model

Iterative Decoding of LDPC Codes over the q-ary Partial Erasure Channel

Graphical Models in Local, Asymmetric Multi-Agent Markov Decision Processes

Distributed supervisory control of workflows

Non-Parametric Non-Line-of-Sight Identification 1

1 Proof of learning bounds

In this chapter, we consider several graph-theoretic and probabilistic models

A Markov Framework for the Simple Genetic Algorithm

Fixed-to-Variable Length Distribution Matching

The Weierstrass Approximation Theorem

The Universe of Symmetry Breaking Tasks

Defect-Aware SOC Test Scheduling

13.2 Fully Polynomial Randomized Approximation Scheme for Permanent of Random 0-1 Matrices

A Low-Complexity Congestion Control and Scheduling Algorithm for Multihop Wireless Networks with Order-Optimal Per-Flow Delay

Intelligent Systems: Reasoning and Recognition. Perceptrons and Support Vector Machines

About the definition of parameters and regimes of active two-port networks with variable loads on the basis of projective geometry

time time δ jobs jobs

Randomized Recovery for Boolean Compressed Sensing

The Semantics of Data Flow Diagrams. P.D. Bruza. Th.P. van der Weide. Dept. of Information Systems, University of Nijmegen

Finite fields. and we ve used it in various examples and homework problems. In these notes I will introduce more finite fields

are equal to zero, where, q = p 1. For each gene j, the pairwise null and alternative hypotheses are,

A Model for the Selection of Internet Service Providers

A Study of Information Dissemination Under Multiple Random Walkers and Replication Mechanisms

Actuators & Mechanisms Actuator sizing

The Theory of Joins in Relational Data Bases

Genetic Quantum Algorithm and its Application to Combinatorial Optimization Problem

Lecture #8-3 Oscillations, Simple Harmonic Motion

G G G G G. Spec k G. G Spec k G G. G G m G. G Spec k. Spec k

Equational Security of a Lattice-based Oblivious Transfer Protocol

CSE525: Randomized Algorithms and Probabilistic Analysis May 16, Lecture 13

Replication Strategies in Unstructured Peer-to-Peer Networks

Linguistic majorities with difference in support

Elliptic Curve Scalar Point Multiplication Algorithm Using Radix-4 Booth s Algorithm

Computation in the Higher Visual Cortices: Map-Seeking Circuit Theory and Application to Machine Vision

On Poset Merging. 1 Introduction. Peter Chen Guoli Ding Steve Seiden. Keywords: Merging, Partial Order, Lower Bounds. AMS Classification: 68W40

New Slack-Monotonic Schedulability Analysis of Real-Time Tasks on Multiprocessors

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 15: Unstructured search and spatial search

Pattern Recognition and Machine Learning. Learning and Evaluation for Pattern Recognition

Algebraic Approach for Performance Bound Calculus on Transportation Networks

Uniform Approximation and Bernstein Polynomials with Coefficients in the Unit Interval

MULTIAGENT Resource Allocation (MARA) is the

arxiv: v3 [cs.ds] 22 Mar 2016

Arithmetic Unit for Complex Number Processing

Warning System of Dangerous Chemical Gas in Factory Based on Wireless Sensor Network

1 Bounding the Margin

Algebraic Implementation of CTL Model Checker

2 Q 10. Likewise, in case of multiple particles, the corresponding density in 2 must be averaged over all

On the Communication Complexity of Lipschitzian Optimization for the Coordinated Model of Computation

Ensemble Based on Data Envelopment Analysis

Ph 20.3 Numerical Solution of Ordinary Differential Equations

Physics 139B Solutions to Homework Set 3 Fall 2009

Error Exponents in Asynchronous Communication

Complexity reduction in low-delay Farrowstructure-based. filters utilizing linear-phase subfilters

Nonmonotonic Networks. a. IRST, I Povo (Trento) Italy, b. Univ. of Trento, Physics Dept., I Povo (Trento) Italy

Transcription:

Science of Coputer Prograing 46 (2003) 31 69 www.elsevier.co/locate/scico Coparing coordination odels and architectures using ebeddings Marcello M. Bonsangue a, Joost N. Kok b, Gianluigi Zavattaro c; a CWI, P.O. Box 94079, 1090 GB Asterda, The Netherlands b Leiden Institute of Advanced Coputer Science, Leiden University, P.O. Box 9512, 2300 RA Leiden, The Netherlands c Bologna University, Departent of Coputer Science, Mura Anteo Zaboni 7, I-40127 Bologna, Italy Abstract We rene the notion of ebedding in order to obtain a foral tool for the coparison of the relative expressive power of dierent languages, by taking into account also the intended architectures on which the software coponents described using those languages are executed. The new notion, called architectural ebedding, is suitable for the coparison of dierent counication echaniss, and gives rise to a natural notion of ipleentability. We will use this notion to present equivalence and dierence results for several coordination odels based on coponents that counicate either through an unordered broadcast, through an atoic broadcast, or through a synchronous broadcast. c 2002 Elsevier Science B.V. All rights reserved. Keywords: Coordination odels languages and architectures; Data-driven and control-driven coordinations; Structured operational seantics; Architectural ebeddings 1. Introduction In this paper we introduce the notion of coordination architecture as a class of congurations described in ters of the coordination actions of the active processes, the repository of the data each process can observe, and the echaniss used to counicate data aong processes. Coordination architectures are not intended to support a general or coplete architectural style: they focus only on the specic issue Corresponding author. E-ail address: zavattar@cs.unibo.it (G. Zavattaro). 0167-6423/03/$ - see front atter c 2002 Elsevier Science B.V. All rights reserved. PII: S0167-6423(02)00086-2

32 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 of coordination. For exaple, processes are the only type of coponents specied by a coordination architecture. Furtherore, a coordination architecture provides only a predenite interaction abstraction rather than a set of generic descriptions of protocols governing the software coposition. The introduction of the abstraction of coordination architecture besides the typical notion of coordination language [17] has two ain otivations: At the one hand, coordination architectures deal only with the echaniss adopted for the interaction aong coponents, and abstract away fro the linguistic support adopted for the description of these coponents. For this reason coordination architectures can be considered a coon fraework for the coparison of dierent coordination languages even inspired by dierent onthologies; for exaple, in Section 5 we show that the sae coordination architecture can be seen as the basis for both Splice [6], a coordination language based on the notion of shared data space, and Manifold [4], inspired on the contrary by the event notication etaphor. On the other hand, coordination languages are designed in order to be portable and adaptable to dierent syste platfors [17]; e.g., the sae coordination language should be ipleentable on either a centralized eory syste or a distributed syste. Using our notion of coordination architectures this concept can be rephrased by saying that it is desirable for a coordination language to be ipleentable on dierent coordination architectures. In this scenario it could be of interest to know whether it is possible to ove coponents described in a coordination language fro one coordination architecture to another one without altering the behavior of the whole syste. In this paper we present a notion of equivalence between coordination architectures which can be exploited to provide an answer to this question. Moreover, the coordination architecture abstraction allows us to introduce a new interesting denition of coordination odel which separates the linguistic aspects fro the behavioral concerns. Forally, we dene a coordination odel S as a function S : L A which aps a coordination language L used to describe the coponents of the intended systes, to a coordination architecture A which describes the way the specied coponents interact. In this paper we consider three styles of coordination architectures which are general enough to describe several well known coordination odels as described in Section 5. Each architecture consists of a nuber of interacting processes together with local stores used as data repositories. Interaction takes place by broadcasting essages to all other processes. The three styles of architectures we consider dier in their broadcasting echanis. (1) The siplest broadcast echanis to describe is the synchronous one: there is no observable delay between the broadcast and the receiving of data in the local store of each process. We call this type of architectures undelayed.

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 33 (2) In a second type of architectures, called globally delayed, the broadcast is atoic, eaning that there can be a delay between the broadcast of a data and its actual reception in the local store of a process, but the local store of all processes are guaranteed to receive the broadcast data value at the sae tie. (3) In a third type of architectures, that we call locally delayed, the broadcast is unordered: the local store of each process ay receive a broadcast data value at a dierent oent of tie. For each type of architecture we consider two possible structures for the data repositories: ultiset and set. In the rst case ultiplicity of data is signicant and hence data is interpreted as a resource. In the second case, ultiplicity is insignicant and data is seen as inforation. Furtherore we paraeterize our architectures on the collection of coordination actions that can be executed by an active process. We consider language priitives for producing and consuing data values and for testing for the presence or absence of data. The production and consuption of one datu can be either local or global. In the rst case only the data repository associated to the process is odied, whereas in the latter case a essage containing the request for insertion or deletion of the intended data is broadcast according to the broadcast echanis of the given architecture. We denote by lo and ld the operations for local production and consuption of data, and by go and gd the operations for global production and consuption of data. We consider only local testing operations, as it sees not reasonable in a distributed environent to force a global test on all the data repositories of all processes. We denote by ta the test for absence, and by tp the test for presence of a given data. All these coordination actions are blocking with the exception of the priitives for production of data lo and go. Thus a process can always produce a datu and continue iediately with the execution of other stateents. In order to copare coordination architectures we adapt to our new setting the coparison ethod introduced by Shapiro [23] under the nae of ebedding, thus obtaining a new notion we call architectural ebedding. The idea is to study, given a conguration of one architecture, whether it is possible to ebed the coponents in this conguration in a conguration of the other architecture without altering the overall behavior. We say that two architectures are equivalent when it is possible to dene such an ebedding fro any of the congurations of the rst architecture to congurations of the second one and vice versa; on the contrary, if this is not the case, we say that the two architectures are dierent. The analysis of the equivalence between coordination architectures gives interesting insights concerning the basic features characterizing the various architectures. Moreover, a notion of ipleentability for coordination odels directly follows fro our analysis: let S : L A be a coordination odel dened on a coordination architecture A and let A be a coordination architecture equivalent to A, then the coordination odel S can be ipleented in ters of the architecture A siply by exploiting the ebedding of A into A. We perfor an exhaustive coparison of the considered architectures, proving for each pair of architectures whether they are equivalent or dierent. Table 1 suarizes the equivalence and dierence results that we prove. The table is split in three parts; the

34 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 Table 1 set ultiset set ultiset L G L U G U L G L U G U tp; lo; go = = = = = = = tp; lo; go; ta = tp; lo; go; ld = = = tp; lo; go; gd rst part considers data repositories as sets, the second one data repositories as ultisets, and the third one copares the choice between sets and ultisets. The coparison is ade by taking into account dierent groups of coordination priitives described in the rst colun of the table. Here L stands for the locally delayed architectural style, G for the globally delayed one, and U for the undelayed one. The results can be interpreted as follows: (i) in the absence of consuing operators (either local or global) and tests for the absence of data the three types of architectures are all equivalent and the choice between a set or a ultiset structure of the data repositories does not ake a dierence; (ii) the addition of tests for the absence of data perits to distinguish aong the three architectures but not between the choice of data repositories as sets or ultisets; (iii) the presence of local consuing operators perits to distinguish aong the three counication echaniss we consider, but only if the data repositories are sets; and (iv) the presence of global consuing operators perits to distinguish all types of counication echanis we consider regardless of the structure of the adopted data repositories. 1.1. Related work This paper is a revised and extended version of [9,10]. In both papers equivalence and separation results are studied for several architectures, but without an explicit notion of architectural ebedding as tool for coparison. The use of ebedding as a ethod for language coparison has been proposed by Shapiro [23] and rened by De Boer and Palaidessi [7]. There are several variations of the notion of ebedding depending upon a set of conditions on the coder and on the decoder functions. Soe of these conditions have been tailored for analyzing the expressiveness of coordination languages. For exaple, in [11], a nuber of dierent coordination languages is copared, all relying on the sae architecture, siilar to our undelayed one. In [12] dierent ipleentations of an output operator have been studied in the setting of the coordination language Linda [15]. In [25] the expressiveness of several negative test operators has been investigated for a coordination language ebodying an undelayed architecture. All these works analyse the expressive power of two languages for the point of view of their basic operators and constructors, while our ephasis is ore on the architectural properties of the odel underlying the languages.

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 35 The closest approaches to ours are taken in [1,16], where languages which do not dier on their operators but only on their counication echaniss are copared. In [1] two possible ipleentations for the broadcast echanis of the coordination language LO [2] are presented; the rst one corresponds to the broadcast used in our undelayed architecture while the second coincides with that of the locally delayed one. The equivalence between the two ipleentations is shown by proving that they are both correct ipleentations of the broadcasting echanis of LO. We strengthened this equivalence result by presenting a third equivalent broadcast echanis, the one used by the globally delayed architecture. Furtherore we prove that the equivalence holds because no global consuing operators are considered and because all data repositories have a ultiset structure rather than a set structure. In [16] 50 counication odels for essage sequence charts are analysed, and a hierarchy is dened according to a notion of ipleentability, dened by eans of set of sequences of production, transission and reception of essages. There are no operators for testing the presence or absence of data. Furtherore, the structure of the data repositories in all counication odels is either a FIFO buer or a ultiset. In the latter case, our undelayed and globally delayed architectures can be apped in two of their odels, and our equivalence result between the two architectures coincides with their equivalence between the two respective counication odels. All other odels are incoparable to the architectures we considered. 1.2. Structure of the paper The rest of the paper consists of ve sections. Section 2 forally introduces our ethod of coparison. Section 3 deals with the odeling of the coordination architectures. Then in Section 4 we copare the dierent coordination architectures. Three coordination odels based on existing languages (Linda, Splice and Manifold) are introduced in Section 5. Finally, in Section 6 we give conclusions and discuss future work. 2. The ethod of coparison: ebedding In this section we rst describe how languages can be copared and then we propose an extension for the coparison of architectures. A natural way to copare the expressive power of two languages is to study whether it is possible to translate all stateents of one language into stateents of the other language with the sae observable behavior. In general, however, this ethod of coparison is too restrictive because it requires that the seantic doains of the two languages are sae. This restriction can be relaxed by introducing an abstraction fro the seantic doain of the second language to the doain of the rst language. This relative coparison ethod has been introduced by Shapiro [23] under the nae of ebedding. Assue given two languages L 0 and L 1 together with their seantic functions M 0 : L 0 O 0 and M 1 : L 1 O 1. Then L 1 ebeds L 0 if there exists a coder ap C : L 0 L 1 and a decoder ap D : O 1 O 0 such that the following

36 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 diagra coutes: C L 0 M 0 L 1 O0 D M1 O 1 The notion of ebedding is too weak if no restrictions are iposed on C and D. In fact, if L 1 is a Turing coplete language then in general it ebeds any other language L 0. There is no general agreeent on what restrictions should be required on the coder and decoder aps, since these ay depend on the goal of the coparison between the two languages [7,11,21,25]. Coonly, the following properties are required: (1) the coder should be copositional with respect to soe of the operators of the language (e.g., the parallel coposition operator), (2) the decoder should preserve soe predened seantics (e.g., the behavior with respect to terination). In general one proves the ebedding of a language into another one by giving a translation of all the language operators. In this paper we rene the notion of language ebedding by introducing the concept of coordination architecture into the notion of ebedding in order to copare dierent ways a syste can be coposed. As described in the introduction, we are interested in rening the notion of ebedding to the ore specic notion of architectural ebedding. Before discussing this, we need to introduce the foral denition of coordination architecture. We describe a coordination architecture A by the collection of all its congurations. Each conguration C consists of a ultiset of active processes Proc(C) and of structural eleents needed for their counication, like data repositories and=or counication channels. We identify by Init(A) the set of all initial congurations of the architecture A. The behavior of an architecture A is dened in ters of a seantic ap T : A O, where O is soe suitable seantic doain. A coordination language is the linguistic support for describing the run-tie interactions specied in ters of a specic coordination architecture. A coordination odel is a function S : L A fro a (coordination) language L to an initial conguration of a coordination architecture A. A coordination language focuses on the description of the interactions between the concurrent and distributed processes that have to cooperate or synchronize to achieve a coon goal [3]. Let S : L A be a coordination odel. In order to dene the seantics of the coordination language L it is enough to have a seantic ap T : A O, where O is soe suitable seantic doain. This approach to the seantics of a coordination language is odular since once we have xed the seantics of a coordination architecture A, we then have a seantics for all coordination languages which ebody A in their coordination odel. Furtherore it allows for an extension of the language ebedding

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 37 as coparison ethod by taking into account the architectures underlying the languages. Consider two coordination odels S 0 : L 0 A 0 and S 1 : L 1 A 1 and assue given the seantic functions T 0 : A 0 O 0 and T 1 : A 1 O 1 for soe suitable doains of observables O 0 and O 1. Then we say that the coordination odel S 1 : L 1 A 1 ebeds S 0 : L 0 A 0 if there exists a language coder C : L 0 L 1, an architectural encoder E : A 0 A 1 and a decoder D : O 1 O 0 such that the following diagra coutes (i.e., all the paths fro L 0 to A 1 are equivalent as also all paths fro L 0 to O 0 ): C L 0 S 0 L 1 T 0 A0 O0 S1 E D A 1 T1 O 1 In order to use the above notion as a tool for the coparison of coordination odels and architectures we add the following restrictions on the encoder and decoder functions: (P1) The architectural encoder E : A 0 A 1 should preserve the active processes and their distribution. More forally, we require that Proc 0 (C)=Proc 1 (E(C)) for any conguration C of the architecture A 0, where Proc 0 and Proc 1 are two functions returning ultisets of active processes fro each conguration of the architectures A 0 and A 1, respectively. This requireent is justied by the fact that we are interested in coparing architectures only in ters of their syste structure, like counication echaniss and data repositories. In other words, we want to use architectural encodings to ove the active coponents fro the source architecture to the target one changing only the interaction echaniss and not the coponent. (P2) The architectural encoder E : A 0 A 1 should ap initial conguration of one architecture into initial conguration of the other. More forally, we require that E(C) Init 1 (A 1 ) for all C Init 0 (A 0 ). (P3) The decoder D : O 1 O 0 should preserve the behavior of the original syste with respect to a reasonable seantics, that is a seantics that distinguishes two systes whenever in a coputation of one syste it is possible to observe the production of one of soe intended data values that cannot be observed in any coputation of the other syste. Forally, if { 1 ;:::; n } is the set of our intended values, we require that given o O 1, then, for any i 1 :::n; i ov 1(o) if and only if i ov 0(D(o)), where ov 0 and ov 1 are two functions extracting the observable values of each coputation in O 0 and O 1, respectively. Note that no requireents are iposed on the coder ap C : L 0 L 1, as these ay depend on the purpose of the language coparison. We say that an ebedding between two coordination odels is architectural if the encoder and decoder functions satisfy the properties listed above. Given a coordination odel S 0 : L 0 A 0 (with the given seantic function T 0 : A 0 O 0 ) and an architecture A 1 (with its given seantic function T 1 : A 1 O 1 ), we say that S 1 : L 0 A 1 is an ipleentation of the coordination odel S 0 on the architecture A 1 if there exists an architectural ebedding of S 0 into S 1 with the identity as coder

38 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 function. It is interesting to observe that S 0 has an ipleentation on the architecture A 1 if and only if there exists a universal ebedding of the architecture A 0 into A 1, dened as an encoder E : A 0 A 1 and a decoder D : O 1 O 0 satisfying the above three properties and such that D T 1 E = T 0. Indeed, if there exists such an universal ebedding between A 0 and A 1, then the ipleentation S 1 : L 0 A 1 is siply dened as S 1 = E S 0, that is, the functional coposition of the encoder function E of the universal ebedding and the given function S 0. On the other hand, given an ipleentation of S 1 on the architecture A 1, the universal ebedding of A 0 into A 1 is given by the encoder and decoder functions of the corresponding architectural ebedding of S 0 into S 1. 2.1. The operational seantics The behavior of the congurations is described by eans of rooted transition systes (C; r; ). The nodes C are the congurations of the considered architecture, the root node r is an eleent of the initial congurations, and the transition species how the architecture evolves: a transition c o c states that the conguration c of an architecture ay evolve to a conguration c by producing an observable o and an eect. The observables odel the data that the syste akes available to the environent, whereas the eects specify the inforation needed for odeling the process interaction. We assue that only the broadcast of essages is observable, and write on top of a transition when it produces no observables. Siilarly, we write at the botto of a transition when it produces no eect, for exaple because the transition species an evolution of the architecture that does not involve any interaction. For siplicity, we will abbreviate c c as c c ;c o c as c o c, and c c as c c. In the following we use c c to denote a possibly epty path of unobservable transitions fro the node c to the node c ; forally, c c i either c = c or there exist c 1 ;:::;c n and 1 ;:::; n+1 (possibly equal to ) such that c c 1 c n c. 1 2 n n+1 Having in ind that the only observable transitions are those with a label dierent fro on top, we say that two rooted transition systes are equivalent if every possible observable transition in the one syste corresponds with an equivalent transition in the other (as for usual bisiulation equivalence), apart fro soe arbitrary long sequences of unobservable transitions that are allowed to precede or follow, and furtherore every unobservable transition corresponds to an arbitrary long (possibly epty) of unobservable transitions. Thus we use as seantic doains the collection of rooted transition systes odulo weak bisiulation [19,20]: Denition 1. Let (C 1 ;r 1 ; 1 ) and (C 2 ;r 2 ; 2 ) be two rooted transition systes. We say that a relation R C 1 C 2 is a weak bisiulation if for each (c 1 ;c 2 ) R we have that 0 (1) if c 1 1 c 1 then either o = and (c 1 ;c 2) R, or there exists an eect 2 and a path 1 c 2 2 c o 2 c 2 c 2 such that (c 1 ;c 2 ) R and 2

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 39 o (2) if c 2 2 c 2 then either o = and (c 1;c 2 ) R, or there exists an eect 1 and a path 2 c 1 1 c o 1 c 1 c 1 such that (c 1 ;c 2 ) R. 1 We say that the two rooted transition systes are weakly bisiilar if there exists a weak bisiulation R C 1 C 2 such that (r 1 ;r 2 ) R. We denote by TS= the class of all rooted transition systes odulo weak bisiulation. According to this seantic doain, the existence of an universal ebedding of an architecture A 0 into another architecture A 1 intuitively eans that an observer is not capable to distinguish whenever a progra is executed according to the counication echanis of A 0 or A 1. Conversely, the non-existence of such a universal ebedding eans that there is a progra that if it executes according the counication echanis of A 0 it produces a datu that cannot be observed when the sae progra is executed using the counication echanis of the other architecture. Of course, it ay be the case that this progra cannot be written in a specic coordination odel S : L A 0, and thus it is still possible that S can be ipleented by the architecture A 1. 3. Modeling coordination architectures The three styles of coordination architectures we consider are uniforly described by a collection of congurations, describing the architectural coponents, and by an operational seantics, dening the behavior of the coponents. In each architecture there are a nuber of active processes which interact only by broadcasting data. Each process is associated with a local eory used as a data repository. We rst present a syntax for the description of the process coponents of the architecture, and introduce soe basic building blocks needed for the specication of its behavior. 3.1. Processes and data repositories Let Data, ranged over by a;b;:::; be a set of data values that we assue will be used by the active processes for their interactions. We consider two basic types of interactions for each datu a: the request for its insertion in a data repository (denoted by the essage a), and the request for its deletion fro a data repository (denoted by the assage a). Messages are thus eleents of the set Msg = {a; a a Data}; ranged over by ; ;::: : We use the convention that = for Msg. A data repository is a structured collection of eleents taken fro this set. In this paper we consider two siple structures: ultiset and set. We denote by DS = Msg N the set of all data repositories with a ultiset structure, and by DS = Msg {0; 1} the set of

40 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 all data repositories with a set structure. In the following we use d to range over both the sets DS and DS ; given a set d with a slight abuse of notation we soeties use d to denote the corresponding ultiset containing one occurrence for each datu contained in d. We write 0 for the epty (ulti) set, that is, 0() = 0 for every essage Msg. We dene the predicate in testing if a essage is in the data repository d by in(d; ) d(x) 0; and the function for inserting the essage into the data repository d by d[x=d() + 1] if d() + 1 cod(d) and in(d; ) tt; d = d[ =d( ) 1] if in(d; ) =tt; d otherwise; where, for any function f : X Y we denote by cod(f) its codoain Y, and, for x X and y Y, we denote by f[x=y] the function apping x to y and acting as f otherwise. The above operation is dened for both data repositories with a set or ultiset structure (the condition on the codoain of d akes the distinction here), and for both adding and reoving values fro a data repository. Inforally, a data value a is inserted into a data repository only if no request for deletion a is present. Otherwise a is not inserted and a is reoved fro the data repository. Conversely, a data value a fro a data repository is reoved when the essage a arrives. In case the essage a arrives and the value a is not present in the data repository then a is stored into the data repository. When produced, essages are associated to a sort used by the counication protocol to guarantee a coon order in their reception aong all processes. For exaple an architecture ay use a protocol that guarantees two essages to be received by any process in the sae order they were produced only if they are both produced by the sae coponent. We assue the existence of an abstract set Sorts of data sorts, ranged over by s;t;:::; and dene the set of broadcast-able essages as follows: = { : s Msg; s Sorts}: Intuitively, two essages with sae sort will be received by any agent in the sae order as they were produced. Forally this is achieved by using queues of pending essages. A queue q is a partially coutative string dened as a congruence class of nite strings in the onoid (? ; ; ) odulo the least congruence such that, for all : s; : s, : s : s = : s : s if s s :

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 41 We let DQ be the set of all queues of pending essages, and write for the string concatenation odulo the above congruence. Also, we denote a congruence class containing a single eleent by the eleent itself. Hence : s is the congruence class containing the one-eleent string : s and the congruence class containing the epty string. The way sorts are associated to data is an architectural issue and therefore should be transparent at the level of the coordination odel. They are foraliss to abstract fro the ipleentation of a specic type of broadcast. For exaple one architecture ay use a broadcast algorith that guarantees that all essages broadcast by the sae source are received in the sae order they were produced. This type of broadcast can be specied in our foralis by assigning the sae sort to all data broadcast by a process, and dierent sorts to data broadcast by dierent processes. Another architecture ay guarantee that all processes receive data in the sae order they were produced. This type of broadcast corresponds to associating to each data the sae sort, regardless of the process producing it. The behavior of each process in isolation is syntactically described by a synchronization tree labeled by a collection of coordination actions. We have adopted this representation of processes as we would like to abstract away fro the syntax of the dierent languages by observing the behavior of progras only. The coordination actions that we consider are either internal, local or global. Local actions only consider the data repository of their own process, and do not produce any essage. Global actions produce essages that are broadcast in order to act on reote data repositories too. Because of the broadcast, global actions will require the data value to be broadcasted and its sort to be used during the counication protocol. We start our analysis by taking into account only three basic coordination priitives: the local and global output operations lo and go, and the local test for presence tp. The other priitives will be introduced later. Forally, a process is a ter of the following graar: P ::= 0 I i :P i ; ::= tp(a) lo(a) go(a : s); where a Data, s Sorts, and I is a non-epty (possibly innite) index set. The ter 0 denotes the inactive process, and it is usually oitted for the sake of siplicity. Further we consider the usual action prexing, and choice operators. We denote the collection of all process by the set Process, ranged over by P; Q. We do not treat recursion in this paper, but it sees rather straightforward to add it a later stage. Inforally, the eaning of the prexes is as follows: denotes soe internal activity, tp(a) tests for the presence of an occurrence of the value a in the local data repository without consuing it, lo(a) introduces a new instance of value a in the local data space, and go(a : s) eits a new instance of the value a that is broadcast to all the coponents as the essage a : s. The tp action is blocking, eaning that it is executed only if the required data is present. The actions lo and go do not depend on the actual

42 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 content of the local data repository and can always be executed. In Section 4 we will extend the set of prexes with coordination actions for locally testing for the absence of a value, for consuing a local occurrence of value, and for broadcasting a request of the deletion of a value. The sort associated to the data value in the go priitive is used to odel specic types of broadcast. We can abstract fro this architectural issue by eans of the function prc on processes, dened inductively as follows: prc(0) = 0; ( ) prc i :P i = prc( i :P i ); I I prc(: P) = :prc(p); prc(tp(a):p) prc(lo(a):p) prc(go(a : s):p) = tp(a):prc(p); = lo(a):prc(p); = go(a):prc(p): This function will be used when dening the ultiset of active processes of a conguration of an architecture. In the next three subsections we introduce three styles of coordination architectures. For each of the three styles, we consider two instantiations, one in which data spaces are sets, and one in which they are ultisets. In this way we obtain six dierent coordination odels. In order to abstract away fro the choice between sets or ultisets, we use a general index which ranges over the set {; } where represents sets and represents ultisets. We present, for each architecture A, the collection of all its congurations Conf (A), a set Init(A) of initial congurations, a function apping each conguration C Conf (A) to the ultiset of its active processes Proc A (C), and a transition syste specication which denes a general labelled transition syste with states taken fro Conf (A). The behavior of an initial conguration C Init(A) is given by the rooted transition syste TS A (C) obtained by selecting the part of the general syste reachable fro the root C. Thus, the seantics of the architecture A is de- ned as the function T A apping a conguration C Init(A) to the equivalence class (with respect to weak bisiulation) containing the rooted transition syste TS A (C). In the description of property (P3) we have adopted a function ov which extracts the observable values produced during a coputation. Forally, let C be the considered conguration and let TS A (C) be the rooted transition syste describing its behavior; the corresponding observable values ov(ts A (C)) are siply the observable labels present in the transition syste TS A (C). As the bisiulation relation is dened in ters of the observable labels only, and provided that they are the sae for each of the dened transition systes, we have

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 43 that the doain of the transition systes up to weak bisiulation is the sae for each architecture. For this reason, we will oit the index A writing TS(C) instead of TS A (C). 3.2. The locally delayed architectures L In the locally delayed architectures counication between processes is established by broadcasting essages using a protocol that does not guarantee that all processes receive data values at the sae tie they were produced. The set of congurations Conf (L ) of a locally delayed architecture is dened by the graar C ::= [P; d; q] C C; where P Process is a process, and d DS is its associated data repository. Each process P in a conguration C is associated to a queue q DQ containing the essages already produced by soe process but not yet received by P. The operator denotes the parallel coposition of the processes that copose the actual conguration of the architecture. Its intended eaning is to be a coutative and associative operator. Forally this is achieved by eans of a structural congruence L dened as the least congruence on Conf (L ) such that C 1 C 2 L C 2 C 1 and C 1 (C 2 C 3 ) L (C 1 C 2 ) C 3 : In the following we will reason up to the structural congruences dened for each architecture; in other words, we do not ake any distinction between C and C if they are structural congruent. A conguration is initial if no value is present in all data repositories and there are no pending essages. Thus Init(L ) is the subset of Conf (L ) dened by the graar C ::= [P; 0; ] C C; where P Process. The ultiset of active process Proc L (C) of a conguration C Conf (L ) is dened as expected: Proc L ([P; d; q]) = { prc(p) }; Proc L (C 1 C 2 )=Proc L (C 1 ) Proc L (C 2 ): Here { prc(p) } denotes the singleton ultiset containing the ter obtained by abstracting fro P the architectural inforation it encodes, and denotes the usual ultiset union.

44 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 The transition syste specication of the locally delayed architecture is given by the following axios and rules: (L1) [:P; d; q] [P; d; q] (L2) [tp(a):p; d; q] [P; d; q] if in(d; a) =tt (L3) [lo(a):p;d;q] [P; d a; q] (L4) [go(a : s):p;d;q] a [P; d; a : s q] a : s (L5) [P; d; q : s] [P; d ; q] (L6) (L7) (L8) (L9) [ k :P k ;d;q] o [P k ;d ;q ] [ I i:p i ;d;q] o [P k ;d ;q ] if k I C o C [P; d; q] C o [P; d; q] C C o C : s [P; d; q] C o : s [P; d; : s q] C C L D C o C C L D D o D The rst four axios describe the behavior of the priitive actions. The side condition in axio (L2) reects the fact that the tp action ay block. Axio (L5) describes the receiving of a essages by a single process. Finally, the other rules are the usual for copound processes, with the exception of the rules (L8) that species the interaction aong processes: when a essage is broadcast its eect is global to all processes. At each transition, eect and observations are siilar. The only dierence is that the observation of a broadcast is the essage produced, while its eect can also depend on the sort of the essage. This because dierent processes ay receive essages with dierent sorts in a dierent order. Notice that the observer has no knowledge about the process executing the broadcast. 3.3. The globally delayed architectures G In the globally delayed architectures processes counicate through an atoic broadcast that guarantees that all processes receive data values at the sae tie. The set of congurations of a globally delayed architecture is dened by the set Conf(G )={(A; q) A Agents ;q DQ}; where Agents is a set dened by the graar A ::= [P; d] A A:

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 45 Here P Process is a process, and d DS is its associated data repository. The dierence with the conguration of the previous architectures is that here all processes share the sae queue of pending essages. As before, the operator is used to copose processes in parallel. It is a coutative and associative operator as specied by the structural congruence G, that is the least congruence on Agents such that A 1 A 2 G A 2 A 1 and A 1 (A 2 A 3 ) G (A 1 A 2 ) A 3 : A conguration (A; q) is initial if q = and A is an agent dened by the graar A ::= [P; 0] A A; where P Process. Thus no value is present in all data repositories and there are no pending essages. The ultiset of active processes Proc G (C) of a conguration C Conf (G )isde- ned as for the locally delayed architectures: Proc G ([P; d];q)={ prc(p) }; Proc G (A 1 A 2 ;q)=proc G (A 1 ;q) Proc G (A 2 ;q): Finally, the transition syste specication of the globally delayed architecture is given by the following axios and rules: (G1) (G2) (G3) (G4) (G5) (G6) (G7) (G8) (G9) [:P; d];q [P; d];q [tp(a):p;d];q [P; d];q if in(d; a)=tt [lo(a):p;d];q [P; d a];q [go(a : s):p;d];q a [P; d];a: s q [P; d];q : s [P; d ];q [ k :P k ;d];q o [P k ;d ];q [ I i:p i ;d];q o if k I [P k ;d ];q A; q o A ;q [P; d] A; q o [P; d] A ;q A; q o A ;q [P; d] A; q o [P; d ] A ;q A G B A;q o A ;q A G B B; q o B ;q

46 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 The axio (G4) shows that when a data ite is broadcast then it is not iediately visible to all agents. The fact that they eventually will receive a essage at the sae tie is odeled by (G5) together with (G8). As in the previous architecture, the tp operator is blocking (expressed by the side condition of axio (G2)), the lo operation is local (axio (G3)) and the go operation has a global eect obtained through the broadcasting of a essage. Notice that the broadcast of a essage has eect on the other processes only when the essage is actually delivered. For unifority with the other two architectures, we assue that the observations take place when the essage is produced. 3.4. The undelayed architectures U Finally we consider the undelayed architectures. Counication happens via a synchronization aong all active processes that guarantees they all receive data values at the sae tie at which they were produced. The set Conf (U ) of congurations of an undelayed architecture is dened by the graar C ::= [P; d] C C: Here P Process is a process, and d DS is its associated data repository. The dierence with the congurations of the previous two architectures is that here there are no queues of pending essages. As before, the operator is used to copose processes in parallel. It is a coutative and associative operator specied by the structural congruence U, that is the least congruence on Agents such that C 1 C 2 U C 2 C 1 and C 1 (C 2 C 3 ) U (C 1 C 2 ) C 3 : A conguration is initial if it is generated by the graar C ::= [P; 0] C C; where P Process. Thus no value is present in all data repositories. The ultiset of active processes Proc U (C) of a conguration C Conf (U )isde- ned as for the other two architectures: Proc U ([P; d]) = { prc(p) }; Proc U (C 1 C 2 )=Proc U (C 1 ) Proc U (C 2 ): Finally, the transition syste specication of the undelayed architecture is given by the following axios and rules:

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 47 (U1) [:P; d] [P; d] (U2) [tp(a):p;d] [P; d] if in(d; a)=tt (U3) [lo(a):p;d] [P; d a] (U4) [go(a : s):p;d] a [P; d a] a (U5) (U6) (U7) (U8) [ k :P k ;d] o [P k ;d ] [ I i:p i ;d] o [P k ;d ] if k I C o C [P; d] C o [P; d] C C o C [P; d] C o [P; d ] C C U D C o C C U D D o D The synchronous behavior of the go operation is odeled by the axio (U4) together with rule (U7). All other operations are local (the reaining axios together with (U6)). As in the previous architectures, the tp operation is blocking, while the lo and the go operations are not. In the undelayed architectures there is no dierence between observables and eects. This is because in the broadcast of a essage, the production coincides with the delivering of the essages, and the sort associated to the essage does not play any role, and can safely be oitted. 4. Coparing coordination architectures In this section we copare the coordination architectures that were introduced in the previous section. Given a pair of architectures, we investigate the possibility to dene a universal ebedding of the rst architecture in the second one, and vice versa. If this is possible, we say that the two architectures are equivalent, otherwise we say that they are dierent. This kind of analysis perits to investigate the specic features of the coordination architectures independently of the coordination odels which ebed the. Moreover, given two equivalent coordination architectures, we can state that each coordination odel dened using one of the, can be ipleented also in the other one. An interesting general observation is related to the possibility to copose the universal ebeddings. As an exaple, consider the existence of three architectures A 0 ; A 1 and A 2. Suppose now the existence of two universal ebeddings, the rst fro A 0 to A 1 and the second fro A 1 to A 2. It is easy to see that the functional coposition

48 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 of the encoding and decoding functions dene a universal ebedding fro A 0 to A 2. Given this observation, we can conclude that our relation of equivalence aong architectures is transitive, thus it is an equivalence relation (it is trivially also reexive and coutative). The rst result that we present in this section is that, if we consider only the basic coordination priitives, the six architectures are all equivalent. After, we independently introduce the other three operators (test for absence, local, and global delete) and we investigate if the equivalence results continue to hold or not. 4.1. Coparison with the basic operators We start by considering the six coordination architectures as introduced in the previous section, and we prove that they are all equivalent. This allows us to conclude that the local read tp(a), local output lo(a), and global output go(a : s) operations do not perit to distinguish aong the dierent characteristics of the considered architectures. Intuitively, the three styles of coordination architecture cannot be discriinated because the unique operation able to test the actual state of the data spaces, the tp(a) priitive, is blocking and is not able to observe the dierent delays characterizing the three considered broadcasts. On the other hand, the ultiplicity of data has no iportance because, in the absence of consuption operators, it is not possible to observe the presence of ultiple occurrences of the sae datu. In order to prove these results, we need to introduce soe notation. Let d DS and q DQ such that no data a (representing deletion) is present neither in d nor in q. It is easy to see that in the absence of essages of kind a, the operator is associative and coutative, i.e., (d a) b is equal to (d b) a for any data space d and data values a and b. Given this observation, the following two denitions are well fored even if q denotes an equivalence class and not a xed queue. We denote by d q the data space obtained after all the values in the queue q have been ushed in the data space d. We dene it as follows: d = d; d q : s =(d ) q: Consider now A Agents and q DQ, we denote by A q the agent obtained after that all values in the queue q have been ushed in all the local data spaces of A. We dene it by induction on the structure of A: [P; d] q =[P; d q]; (A 1 A 2 ) q = A 1 q A 2 q: The set DQ of queues can be turned into a eet-seilattice by dening a prex order as follows: q 1 q 2 if and only if there exists q DQ such that q 1 q = q 2 [18]. If every broadcastable essage has the sae sort then the above order coincides with the usual prex ordering, while if they have all a dierent sort then the order coincides

M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 49 with the usual ultiset inclusion ordering. For q 1 and q 2 in DQ, we denote by q 1 q 2 their greatest lower bound. We also introduce a attening operation which, given a ultiset, produces a set containing eleents which are present in the initial ultiset. Forally, given the ultiset d, its attening is denoted by d, where d() = 1 if and only if d() 0. We divide our analysis in three parts: we rst copare the locally and the globally delayed styles, then the globally delayed and the undelayed, and nally we copare sets and ultisets. 4.1.1. Locally delayed is equivalent to globally delayed We now consider the locally and the globally delayed styles of coordination architectures, without aking any assuptions on the kind of data space (either set or ultiset). Forally, we consider the architectures L and G without aking any assuption on, which could be either or. We rst dene a universal ebedding of G in L, then we consider the opposite ebedding. In order to ebed the globally in the locally delayed architecture, we dene the encoder E GL : Conf (G ) Conf (L ) inductively as follows: E GL ([P; d];q)=[p; d; q]; E GL ([P; d] A; q)=[p; d; q] E GL (A; q): This encoder siply replicates the shared queue as local queue for each process in the conguration. Furtherore, we take as decoder function D GL : TS= TS= the identity. Conversely, we can encode the locally in the globally delayed architectures by using the function E LG : Conf (L ) Conf (G ) that is inductively dened by: E LG ([P; d; q]) = [P; d];q; E LG ([P; d; q] C) = (([P; d] q P ) (A q C ));q q where A ;q = E LG (C); (q q ) q P = q, and (q q ) q C = q. In this case, we construct a shared queue as the greatest lower bound aong all the local queues, and we ush in the data space of each agent the essages that are in the local queue but not in the shared one. As in the previous case, we take as decoder D LG : TS= TS= the identity function. It is not dicult to see that both the ebeddings satisfy (P1) (P3). It reains to prove that the corresponding general diagra correctly coutes in both the cases. This is a consequence of two ore general results that we will present in two theores, stating that the rooted transition syste of a conguration (taken fro one of the two considered architectures) is the sae (odulo weak bisiulation) as the rooted transition syste of its encoding. The proofs of the theores are reported in Appendix A. Theore 2. Let C Conf (G ); its transition syste (Conf (G );C; ) is weakly bisiilar to the rooted transition syste (Conf (L ); E GL (C); ).

50 M.M. Bonsangue et al. / Science of Coputer Prograing 46 (2003) 31 69 Theore 3. Let C Conf (L ); its transition syste (Conf (L );C; ) is weakly bisiilar to the rooted transition syste (Conf (G ); E LG (C); ). 4.1.2. Globally delayed is equivalent to undelayed We now consider the globally delayed and the undelayed styles of architectures. Also in this case we do not ake any assuptions on the kind of adopted data space (set or ultiset). Forally, we consider the architectures G and U without aking any assuption on, which could be either or. The ebedding of the undelayed in the globally delayed architecture is based on an encoding E UG : Conf (U ) Conf (G ) which siply adds an epty coon queue E UG (A) =A; The corresponding decoder D UG : TS= TS= is the identity function. The opposite encoder E GU : Conf (G ) Conf (U ) ushes the data in the coon queue in each local data space: E GU (A; q) =(A q): Also in this case, the decoder D GU : TS= TS= is the identity. Both the ebeddings satisfy the three considered properties. As in the previous section, we show that they also ake the general diagra coute by presenting two ore general theores stating that the rooted transition syste of a conguration is the sae (odulo weak bisiulation) as the rooted transition syste of its corresponding encoding. The proof of the theores is reported in Appendix B. Theore 4. Let C Conf (U ); its transition syste (Conf (U );C; ) is weakly bisiilar to the rooted transition syste (Conf (G ); E UG (C); ). Theore 5. Let C Conf (G ); its transition syste (Conf (G );C; ) is weakly bisiilar to the rooted transition syste (Conf (U ); E GU (C); ). 4.1.3. Set is equivalent to ultiset Finally, we show that the choice between data spaces as sets or ultisets is insignificant; ore precisely, given an architectural style, the version with data spaces as sets and the version with data spaces as ultisets are equivalent. We show this only for the locally delayed architecture, but the sae approach can be siply applied to the other two kinds of architectures. We rst present a universal ebedding of the locally delayed architecture with ultisets in that with sets. The encoder E MS : Conf (L ) Conf (L ) siply applies a attening operation on all the local data spaces: E MS ([P; d; q])=[p; d; q]; E MS ([P; d; q] C) =[P; d; q] E MS (C): Also in this case the decoder D MS : TS= TS= is the identity function.