Automatically deriving choreography-conforming systems of services

Similar documents
Dr. D.M. Akbar Hussain

Fig.25: the Role of LEX

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

COMP 423 lecture 11 Jan. 28, 2008

Definition of Regular Expression

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

UT1553B BCRT True Dual-port Memory Interface

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *

2 Computing all Intersections of a Set of Segments Line Segment Intersection

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries

Distributed Systems Principles and Paradigms

Pointwise convergence need not behave well with respect to standard properties such as continuity.

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

Jae-yoon Jung, Wonchang Hur, Hoontae Kim, and Suk-Ho Kang

What are suffix trees?

ASTs, Regex, Parsing, and Pretty Printing

Lecture 7: Integration Techniques

CS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific

9 Graph Cutting Procedures

CSCE 531, Spring 2017, Midterm Exam Answer Key

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

SOME EXAMPLES OF SUBDIVISION OF SMALL CATEGORIES

Slides for Data Mining by I. H. Witten and E. Frank

Topic 2: Lexing and Flexing

Presentation Martin Randers

ARCHITECTURES FOR TESTING DISTRIBUTED SYSTEMS

Lexical Analysis: Constructing a Scanner from Regular Expressions

MATH 25 CLASS 5 NOTES, SEP

INTRODUCTION TO SIMPLICIAL COMPLEXES

Registering as an HPE Reseller

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Midterm 2 Sample solution

From Dependencies to Evaluation Strategies

TO REGULAR EXPRESSIONS

Reducing a DFA to a Minimal DFA

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

Lexical Analysis. Amitabha Sanyal. ( as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay

The Greedy Method. The Greedy Method

A dual of the rectangle-segmentation problem for binary matrices

Misrepresentation of Preferences

An Efficient Divide and Conquer Algorithm for Exact Hazard Free Logic Minimization

Mobile IP route optimization method for a carrier-scale IP network

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have

PPS: User Manual. Krishnendu Chatterjee, Martin Chmelik, Raghav Gupta, and Ayush Kanodia

10.5 Graphing Quadratic Functions

Lexical analysis, scanners. Construction of a scanner

A Formalism for Functionality Preserving System Level Transformations

LR Parsing, Part 2. Constructing Parse Tables. Need to Automatically Construct LR Parse Tables: Action and GOTO Table

Deterministic. Finite Automata. And Regular Languages. Fall 2018 Costas Busch - RPI 1

Compiler Construction D7011E

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.

Synchronizability of Conversations Among Web Services

MTH 146 Conics Supplement

Suffix trees, suffix arrays, BWT

CS 241 Week 4 Tutorial Solutions

Coordinating Activities in Collaborative Environments: A High Level Petri Nets Based Approach

Simrad ES80. Software Release Note Introduction

An Event Structuring Approach to Real-Time Design Peter Gorm Larsen Abstract IFAD { Institute of Applied Computer Science Munkebjergvnget 17, DK-5230

A Heuristic Approach for Discovering Reference Models by Mining Process Model Variants

Tool Vendor Perspectives SysML Thus Far

Intermediate Information Structures

Efficient Algorithms For Optimizing Policy-Constrained Routing

OUTPUT DELIVERY SYSTEM

Typing with Weird Keyboards Notes

Improper Integrals. October 4, 2017

Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results

CS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata

PARALLEL AND DISTRIBUTED COMPUTING

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997.

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

Epson Projector Content Manager Operation Guide

Position Heaps: A Simple and Dynamic Text Indexing Data Structure

Engineer To Engineer Note

1.5 Extrema and the Mean Value Theorem

Ma/CS 6b Class 1: Graph Recap

Discussion 1 Recap. COP4600 Discussion 2 OS concepts, System call, and Assignment 1. Questions. Questions. Outline. Outline 10/24/2010

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos

McAfee Network Security Platform

2014 Haskell January Test Regular Expressions and Finite Automata

EasyMP Multi PC Projection Operation Guide

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers?

Graphs with at most two trees in a forest building process

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Finite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015

1 Quad-Edge Construction Operators

pdfapilot Server 2 Manual

Section 10.4 Hyperbolas

a(e, x) = x. Diagrammatically, this is encoded as the following commutative diagrams / X

Transcription:

Automticlly deriving choreogrphy-conforming systems of services Gregorio Díz Dept. de Sistems Informáticos Universidd de Cstill-L Mnch 02071. Alcete, Spin gregorio.diz@uclm.es Ismel Rodríguez Dept. Sist. Informáticos y Computción Universidd Complutense de Mdrid 28040. Mdrid, Spin isrodrig@sip.ucm.es Astrct We present forml method to derive set of we services from given choreogrphy, in such wy tht the system consisting of these services necessrily conforms to the choreogrphy. A forml model to represent orchestrtions nd choreogrphies is given, nd we define severl conformnce semntic reltions llowing to detect whether set of orchestrtion models representing some we services leds to the overll communictions descried in choreogrphy. 1 Introduction We services relted technologies re set of middlewre technologies for supporting Service-Oriented Computing [13]. The definition of we service-oriented system involves two complementry views: Orchestrtion nd choreogrphy. The orchestrtion concerns the internl ehvior of we service in terms of invoctions to other services. It is supported, e.g., y WS-PEL [1] (usiness Processes for We Services), which is lnguge for descriing the we service ehvior (workflow) in terms of the composition of other we services. On the other hnd, the choreogrphy concerns the oservle interction mong we services. It cn e defined, e.g., y using WS-CDL [18] (Choreogrphy Description Lnguge for We Services). Roughly speking, the reltion etween orchestrtion nd choreogrphy cn e stted s follows: The collortive ehvior, descried y the choreogrphy, should e the result of the interction of the individul ehviors of ech involved prty, which re defined vi the orchestrtion. In this pper we present some forml frmeworks to utomticlly derive we services (in prticulr, their orchestrtion definition) from given choreogrphy, in such wy tht the concurrent ehvior of these derived services necessrily conforms to the choreogrphy. The first derivtion method is sed on dding n orchestrtor service, which is kind of director tht is responsile of coordinting services nd controlling the system workflow. An lterntive method deriving decentrlized system, with no orchestrtor, is presented too. In order to fix the mening of conformnce in this context, we define severl semntic reltions such tht, given the orchestrtion of some we services nd choreogrphy defining how these we services should interct, they decide whether the interction of these we services necessrily leds to the required oservle ehvior. Models of orchestrtions nd choreogrphies re constructed y mens of two different forml lnguges. Lnguges explicitly consider chrcteristics such s service identifiers, specific senders/ddressees, messge uffers for representing synchronous communictions, or messge types. This pper mkes the following contriutions. First, the proposed method to derive conforming set of service models from given choreogrphy model cn e used to define models nd erly prototypes of we services systems, s well s to formlly/empiriclly nlyze the properties of these models/prototypes. Moreover, if service orchestrtions do not hve to e utomticlly derived ut re given, then the proposed conformnce reltions etween orchestrtions nd choreogrphies lso llow developers to select the dequte service tht ccomplishes the ehvior of certin role, thus iding we service discovery tsks. Models defined in the proposed modeling lnguges cn e used to nlyze the properties of systems of services, such s stuck-freeness nd other prolems derived from concurrent execution. For instnce, y nlyzing the order of exchnged messges we cn study whether the informtion is redy when required, which concerns correltion nd compenstion issues. 2 Relted Work There re few relted works tht del with the synchronous communiction in contrcts for we service context. In fct, we re only wre of three works from vn der Alst et l. [17], Kohei Hond et l. [12] nd, rvetti nd Zvttro [4]. In prticulr, vn der Alst et l. [17] present n pproch for formlizing complince nd refinement notions, which re pplied to service systems specified using open Workflow Nets ( type of Petri Nets) where the communiction is synchronous. The uthors show how the contrct refinement cn e done independently, nd they check whether contrcts do not contin cycles. Kohei Hond et l. [12] present generliztion of inry session types to multiprty sessions for π-clculus. They provide new notion 1

of types which cn directly strct the intended converstion structure mong n-prties s glol scenrios, retining n intuitive type syntx. They lso provide consistency criteri for converstion structure with respect to the protocol specifiction (contrct), nd type discipline for individul processes y using projection. rvetti nd Zvttro [4] llow to compre systems of orchestrtions nd choreogrphies y mens of the testing reltion given y [2, 9]. Systems re represented y using process lgeric nottion, nd opertionl semntics for this lnguge re defined in terms of leled trnsitions systems. On the contrry, our frmework uses n extension of finite stte mchines to define orchestrtions nd choreogrphies, nd semntic reltion sed on the conformnce reltion [15, 16] is used to compre oth models. In ddition, let us note tht [4] considers the suitility of service for given choreogrphy regrdless of the ctul definition of the rest of services it will interct with, i.e. the service must e vlid for the considered role y its own. This eses the tsk of finding suitle service fitting into choreogrphy role: Since the rest of services do not hve to e considered, we cn serch for suitle services for ech role in prllel. However, let us note tht sometimes this is not relistic. In some situtions, the suitility of service ctully depends on the ctivities provided y the rest of services. For instnce, let us consider tht trvel gency service requires tht either the ir compny service or the hotel service (or oth) provide trnsfer to tke the client from the irport to the hotel. A hotel providing trnsfer is good regrdless of whether the ir compny provides trnsfer s well or not. However, hotel not providing trnsfer is vlid for the trvel gency only if the ir compny does provide the trnsfer. This kind of sutle requirements nd conditionl dependencies is explicitly considered in our frmework. Thus, contrrily to [4], our frmework considers tht the suitility of service depends on wht the rest of services ctully do. Furthermore, this pper presents method to utomticlly derive services from choreogrphy in such wy tht the system consisting of these services necessrily conforms to the choreogrphy. This contrsts with the projection notion given in [4], which does not gurntee tht derived services do so. Other works concern the projection nd conformnce vlidtion etween choreogrphy nd orchestrtion with synchronous communiction. rvetti nd Zvttro [3] propose theory of contrcts for conformnce checking. They define n effective procedure tht cn e used to verify whether service with given contrct cn correctly ply specific role within choreogrphy. In [14], Zongyn et l. define the concept of restricted nturl choreogrphy tht is esily implementle, nd they propose two structurl conditions s criterion to distinguish the restricted nturl choreogrphy. Furthermore, they propose new concept, the dominnt role of choice for projection concerns. Crone et l. [7] study the description of communiction ehviors from glol point of view of the communiction nd end-point ehvior levels. Three definitions for proper-structured glol description nd theory for projection re developed. ultn nd Fu [6, 5] specify We Services s converstions y Finite Stte Mchines tht nlyze whether UML collortion digrms re relizle or not. 3 Forml model In this section we present our lnguges to define models of orchestrtions nd choreogrphies. This section constitutes extended, revised, nd motivted version of [10], where rief introduction to these lnguges is given. Some preliminry nottion is presented next. Definition 3.1 Given type A nd 1,..., n A with n 0, we denote y [ 1,..., n ] the list of elements 1,..., n of A. We denote the empty list y [ ]. Given two lists σ = [ 1,..., n ] nd σ = [ 1,..., m ] of elements of type A nd some A, we consider σ = [ 1,..., n, ] nd σ σ = [ 1,..., n, 1,..., m ]. Given set of lists L, pth-closure of L is ny suset V L such tht for ll σ V we hve tht () either σ = [ ] or σ = σ for some σ with σ V ; nd () there do not exist σ, σ V such tht σ = σ nd σ = σ with. We sy tht pth-closure V of L is complete in L if it is mximl in L, tht is, if there does not exist pth-closure V L such tht V V. The set of ll complete pthclosures of L is denoted y Comp(L). We present our model of we service orchestrtion. The internl ehvior of we service in terms of its interction with other we services is represented y finite stte mchine where, t ech stte s, the mchine cn receive n input i nd produce n output o s response efore moving to new stte s. Moreover, ech trnsition explicitly defines which service must send i: A sender identifier snd is ttched to the trnsition denoting tht, if i is sent y service snd, then the trnsition cn e triggered. We ssume tht ll we services re identified y given identifier elonging to set ID. Moreover, trnsitions lso denote the ddressee of the output o, which is denoted y n identifier dr. Let us note tht we services receive messges synchronously. This is represented in the model y considering n input uffer where ll inputs received nd not processed yet re cumulted. Ech input hs ttched the identifier of the sender of the input. A prtition of the set of possile inputs will e explicitly provided, nd ech set of the prtition will denote type of inputs. If service trnsition requires receiving n input i whose type is t, then we will check if the first messge of type t ppering in the input uffer is i indeed. If it is so (the predicte ville given in the next definition will e used to check this), then we will e le to consume the input from the input uffer nd tke the trnsition. 1 Definition 3.2 Given set of service identifiers ID, service for ID is tuple (id, S, I, O, s in, T, ψ) where id ID is the 1 Note tht, equivlently, we could spek out different input uffers, one for ech type, rther thn single input uffer. 2

identifier of the service, S is the set of sttes, I is the set of inputs, O is the set of outputs, s in S is the initil stte, T is the set of trnsitions, nd ψ is prtition of I, i.e. we hve p ψ p = I nd for ll p, p ψ we hve p p =. Ech trnsition t T is tuple (s, i, snd, o, dr, s ) where s, s S re the initil nd finl sttes respectively, i I is n input, snd ID is the required sender of i, o O is n output, nd dr ID is the ddressee of o. A trnsition (s, i, snd, o, dr, s ) is lso denoted y s (snd,i)/(dr,o) s. Given service M = (id, S, I, O, s in, T), n input uffer for M is list [(id 1, i 1 ),..., (id k, i k )] where id 1,..., id k ID nd i 1,..., i k I. A configurtion of M is pir c = (s, ) where s S is stte of M nd is n input uffer for M. The set of ll input uffers is denoted y. The initil configurtion of M is (s in, [ ]). Let us suppose tht, given set S, 2 S denotes the powerset of S. Let = [(id 1, i 1 ),..., (id k, i k )] with k 0 e n input uffer, id ID, i I, nd S 2 I. We hve ville(, id, i, S) iff, for some 1 j k, we hve (id j, i j ) = (id, i) nd there do not exist l < j, id ID, nd i S, such tht (id l, i l ) = (id, i ). We hve insert(, id, i) = (id, i). In ddition, we lso hve remove(, id, i) = [(id 1, i 1 ),..., (id j 1, i j 1 ), (id j+1, i j+1 ),..., (id k, i k )], provided tht j IN is the minimum vlue such tht j [1..k], id = id j, nd i = i j. Next we compose services into systems of services. Definition 3.3 Let ID = {id 1,..., id p }. For ll 1 j p, let M j = (id j, S j, I j, O j, s j,in, T j, ψ j ) e service for ID. Then, S = (M 1,..., M p ) is system of services for ID. For ll 1 j p, let c j e configurtion of M j. We sy tht c = (c 1,..., c p ) is configurtion of S. Let c 1,...,c p e the initil configurtions of M 1,..., M p, respectively. Then, (c 1,..., c p) is the initil configurtion of S. We formlly define how systems evolve, i.e. how service of the system triggers trnsition nd how this ffects other services in the system. Outputs of services will e considered s inputs of the services these outputs re sent to. esides, we consider specil cse of input/output tht will e used to denote null communiction. If the input of trnsition is null then we re denoting tht the service cn tke this trnsition without witing for ny previous messge from ny other service, tht is, we denote proctive ction of the service. Similrly, null output denotes tht no messge is sent to other service fter tking the corresponding trnsition. In oth cses, the sender nd the ddressee of the trnsition re irrelevnt, respectively, so in these cses they will lso y denoted y null symol. A system evolution will e denoted y tuple (c, snd, i, proc, o, dr, c ) where c nd c re the initil nd the finl configurtion of the system, respectively, i is the input processed in the evolution, o is the output sent s result of the evolution, proc is the service whose trnsition is tken in the evolution, snd is the sender of i, nd dr is the ddressee of o. There re two resons why n evolution cn e produced: () service proctively initites trnsition, tht is, trnsition whose input is null is tken; nd () service triggers trnsition ecuse there is n ville messge in its input uffer lelled y the sender identifier nd the input required y the trnsition. In oth cses () nd (), there re two possiilities regrding new output is sent or not: (1) if the trnsition denotes null output then no other input uffer is modified; (2) otherwise, i.e. if the trnsition denotes n output different from null, then this output is stored in the uffer of the ddressee s n input. y considering ny comintion of either () or () with either (1) or (2), four kinds of evolutions rise indeed. Definition 3.4 Let ID = {id 1,..., id p } e set of service identifiers nd S = (M 1,...,M p ) e system of services for ID where for ll 1 j p we hve tht M j = (id j, S j, I j, O j, s j,in, T j, ψ j ). Let c = (c 1,...,c p ) e configurtion of S where for ll 1 j p we hve c j = (s j, j ). An evolution of S from the configurtion c is ny tuple (c, snd, i, proc, o, dr, c ) where i I 1... I p is the input of the evolution, o O 1... O p is the output of the evolution, c = ((s 1, 1 ),...,(s p, p )) is the new configurtion of S, nd snd, proc, dr ID re the sender, the processer, nd the ddressee of the evolution, respectively. All these elements must e defined ccording to one of the following choices: () (evolution ctivted y some service y itself) For some (null,null)/(dr 1 j p, let us suppose s,o) j s T j. Then, s j = s nd j = j. esides, snd = null, proc = id j, dr = dr ; () (evolution ctivted y processing messge from the input uffer of some service) For some 1 j p, (snd let us suppose tht s,i)/(dr,o) j s T j nd we hve ville( j, snd, i, p), where p is the only set elonging to ψ j such tht i p. Then, s j = s nd j = remove( j, snd, i). esides, snd = snd, proc = id j, nd dr = dr ; where, oth in () nd (), the new configurtions of the rest of services re defined ccording to one of the following choices: (1) (no messge is sent to other service) If dr = null or o = null then for ll 1 q k with q j we hve s q = s q nd q = q. (2) ( messge is sent to other service) Otherwise, let id g = dr for some 1 g k. Then, we hve s g = s g nd g = insert( g, id j, o). esides, for ll 1 q k with q j nd q g we hve s q = s q nd q = q. Figure 1 (left nd center) shows simple client/server orchestrtion specifiction where the client (A) sends requests to the server () nd the server responds to them, until the 3

A Client (, response) /(, ) (, )/(, exit) (, )/ (, request) Server (A, request)/ (A, response) C Chor response A exit A request A (A, exit)/(, ) Figure 1. A client/server orchestrtion (left nd center) nd choreogrphy specifiction (right). client notifies tht it leves the system. Initil sttes re denoted y doule circle node, nd null inputs nd outputs re denoted y the dsh symol. As we will see lter, the conformnce of system of service orchestrtions with respect to choreogrphy will e ssessed in terms of the ehviors of oth mchines. We extrct the ehviors of systems of services s follows: Given ny sequence of consecutive evolutions of the system from its initil configurtion, we tke the sequence of inputs nd outputs lelling ech evolution nd we remove ll null elements from this sequence. The extrcted sequence (clled trce) represents the effective ehvior of the originl sequence. We distinguish two kinds of trces. A sending trce is sequence of outputs ordered s they re sent y their corresponding senders. A processing trce is sequence of inputs ordered s they re processed y the services which receive them, tht is, they re ordered s they re tken from the input uffer of ech ddressee service to trigger some of its trnsitions. oth trces ttch some informtion to explicitly denote the services involved in ech opertion. Definition 3.5 Let S e system, c 1 e the initil configurtion of S, nd (c 1, snd 1, i 1, proc 1, o 1, dr 1, c 2 ), (c 2, snd 2, i 2, proc 2, o 2, dr 2, c 3 ),..., (c k, snd k, i k, proc k, o k, dr k, c k+1 ) e k consecutive evolutions of S. Let 1... r denote ll indexes of non-null outputs in the previous sequence, i.e. we hve j { 1,..., r } iff o j null. Then, [(proc 1, o 1, dr 1 ),..., (proc r, o r, dr r )] is sending trce of S. In ddition, if there do not exist snd, i, proc, o, dr, c such tht (c k+1, snd, i, proc, o, dr, c ) is n evolution of S then we lso sy tht [(proc 1, o 1, dr 1 ),..., (proc r, o r, dr r ), stop] is sending trce of S. The set of ll sending trces of S is denoted y sndtrces(s). Let 1... r denote ll indexes of nonnull inputs in the previous sequence, i.e. we hve j { 1,..., r } iff i j null. Then, [(snd 1, i 1, proc 1 ),..., (snd r, i r, proc r )] is processing trce of S. In ddition, if there do not exist snd, i, proc, o, dr, c such tht (c k+1, snd, i, proc, o, dr, c ) is n evolution of S then we lso sy tht [(snd 1, i 1, proc 1 ),..., (snd r, i r, proc r ), stop] is processing trce of S. The set of ll processing trces of S is denoted y prctrces(s). Next we introduce our formlism to represent choreogrphies. Contrrily to systems of orchestrtions, this formlism focuses on representing the interction of services s whole. Thus single mchine, insted of the composition of severl mchines, is considered. Ech choreogrphy trnsition denotes messge ction where some service sends messge to nother one. Definition 3.6 A choreogrphy mchine C is tuple C = (S, M, ID, s in, T) where S denotes the set of sttes, M is the set of messges, ID is the set of service identifiers, s in S is the initil stte, nd T is the set of trnsitions. A trnsition t T is tuple (s, m, snd, dr, s ) where s, s S re the initil nd finl sttes, respectively, m M is the messge, nd snd, dr ID re the sender nd the ddressee of the messge, respectively. A trnsition (s, m, snd, dr, s ) is m/(snd dr) lso denoted y s s. A configurtion of C is ny stte s S. An evolution of C from the configurtion s S is ny trnsition (s, m, snd, dr, s ) T from stte s. The initil configurtion of C is s in. Coming ck to our previous exmple, Figure 1 (right) depicts choreogrphy C etween services A nd, tht is, the client nd the server. The trnsitions of this choreogrphy ctully denote the sme evolutions we cn find in system of services consisting of services A nd. As we did efore for systems of services, next we identify the sequences of messges tht cn e produced y choreogrphy mchine. Definition 3.7 Let c 1 e the initil configurtion of choreogrphy mchine C. Let (c 1, m 1, snd 1, dr 1, c 2 ),..., (c k, m k, snd k, dr k, c k+1 ) e k 0 consecutive evolutions of C. We sy tht σ = [(snd 1, m 1, dr 1 ),..., (snd k, m k, dr k )] is trce of C. In ddition, if there do not exist m, snd, dr, c such tht (c k+1, m, snd, dr, c ) is n evolution of C then we lso sy tht [(snd 1, m 1, dr 1 ),..., (snd k, m k, dr k ), stop] is trce of C. The set of ll trces of C is denoted y trces(c). 4 Conformnce reltions nd derivtion of choreogrphy-complint sets of services Now we re provided with ll the required forml mchinery to define our conformnce reltions etween systems of 4

orchestrtions nd choreogrphies. We will consider semntic reltion inspired in the conformnce testing reltion given in [15, 16]. This notion is devoted to check whether n implementtion meets the requirements imposed y specifiction. In our cse, we will check whether the ehvior of system of orchestrtion services meets the requirement given y the choreogrphy. However, there re some importnt differences etween the notion proposed in [15, 16] nd the notion considered here. Contrrily to those works, the ehvior of orchestrtions nd choreogrphies will not e compred in terms of their possile interctions with n externl entity (i.e. user, oserver, externl ppliction, etc) ut in terms of wht oth models cn/cnnot do y their own, ecuse oth models re considered s closed worlds. Let us lso note tht nondeterminism llows choreogrphy to provide multiple vlid wys to perform the opertions it defines. Consequently, we consider tht system of orchestrtion services conforms to choreogrphy if it performs one or more of these vlid wys. For ech of these vlid wys, cre must e tken not to llow the system of services to incompletely perform it, i.e. to finish in n intermedite stte provided tht the choreogrphy does not llow it either. In order to check these requirements, only complete pth-closures will e considered (see Definition 3.1). Moreover, the set of complete pth-closures of the system of choreogrphies is required to e non-empty ecuse the system is required to provide t lest one (complete) wy to perform the requirement given y the choreogrphy. Alterntively, we lso consider nother reltion where the system of orchestrtions is required to perform ll execution wys defined y the choreogrphy. This lterntive notion will e clled full conformnce. Let us recll tht we consider synchronous communictions in our frmework. Thus, the moment when messge is sent does not necessrily coincide with the moment when this messge is tken y the receiver from its input uffer nd is processed. In fct, we cn define choreogrphy in such wy tht defined communictions refer to either the former kind of events or the ltter (i.e., instnts where messges re sent, or instnts where messges re processed y their receivers, respectively). Thus, we consider two wys in which system of services my conform to choreogrphy: with respect to sending trces, nd with respect to processing trces. esides, we explicitly identify the cse where oth conformnce notions simultneously hold. Definition 4.1 Let S e system of services nd C e chorogrphy mchine. We sy tht S conforms to C with respect to sending ctions, denoted y S conf s C, if either we hve Comp(sndTrces(S)) Comp(trces(C)) or we hve = Comp(sndTrces(S)) = Comp(trces(C)). We sy tht S fully conforms to C with respect to sending ctions, denoted y S conf f s C, if Comp(sndTrces(S)) = Comp(trces(C)). We sy tht S conforms to C with respect to processing ctions, denoted y S conf p C, if we hve either Comp(prcTrces(S)) Comp(trces(C)) or = Comp(prcTrces(S)) = Comp(trces(C)). We sy tht S fully conforms to C with respect to sending ctions, denoted y S conf f p C, if Comp(prcTrces(S)) = Comp(trces(C)). We sy tht S conforms to C, denoted y S conf C, if S conf s C nd S conf p C. We sy tht S fully conforms to C, denoted y S conf f C, if S conf f s C nd S conf f p C. The sutle differences etween ll the previous semntic reltions re illustrted in detil, y mens of severl exmples nd smll cse study, in Appendix A. Once we re provided with pproprite notions to compre sets of orchestrtion models with choreogrphy models, we study the prolem of utomticlly deriving orchestrtion services from given choreogrphy, in such wy tht the system consisting of these derived services conforms to the choreogrphy. Next we consider deriving services y projecting the structure of the choreogrphy into ech involved service. Ech service copies the form of sttes nd trnsitions of the choreogrphy, though service trnsitions re leled only y ctions concerning the service. Unfortuntely, if services re derived in this wy then, in generl, the resulting set of services does not conform to the choreogrphy with respect to ny of the proposed conformnce notions. Let us consider Figure 4, depicted in Appendix A. Services 24, 25, nd 26 re projections of the choreogrphy 27 into ech service regrded in the definition of 27. However, the composition of 24, 25, nd 26 does not necessrily led to the ehvior required y 27. In prticulr, it could e the cse tht service 25 tkes its right choice (i.e. it sends c to 26) while 24 tkes its left choice (i.e. it sends to 25), which is not llowed y 27. Moreover, if only messges ppering in choreogrphy 27 re llowed in services then no lterntive definition of 24, 25, nd 26 llows to meet the requirement imposed y 27: Service 24 cnnot decide whether it must send or c to 25 ecuse it cnnot know the messge sent y 25 to 26. The prolem of investigting how we cn design synchronous communicting processes in such wy they will necessrily produce some ehvior or rech some configurtion hve een tckled in severl wys in the literture. For instnce, [11] studies the prolem of designing two synchronous processes in such wy tht their progress is gurnteed, while [8] studies the cses where we cnnot define some communicting processes conforming to given specifiction. We will mke ny choreogrphy relizle y dding some control messges to the definition of services. These messges will llow services to know wht is required t ech time to properly mke the next decision, ccording to the choreogrphy specifiction. Next we reconsider our conformnce reltions under the ssumption tht these dditionl messges re llowed indeed. Tht is, services re llowed to send/receive dditionl messges not included in the choreogrphy. In order to void confusion etween stndrd chorogrphy messges nd other messges, the ltter messges re required to e different to the former. Regrding the definition of conformnce reltions, we require 5

trces inclusion/equlity gin, though we remove dditionl messges prior to compring sets of trces. Definition 4.2 Let σ sndtrces(s) prctrces(s) where S is system of services. The constrin of σ to set of inputs nd outputs Q, denoted y σ Q, is the result of removing from σ ll elements (, m, ) with m Q. Let S e system of services for ID nd let C = (S, M, ID, s in, T) e choreogrphy. Let conf x {conf s, conf f s, conf p, conf f p}. We hve S conf x C if S conf x C provided tht the occurrences of sndtrces(s) nd prctrces(s) ppering in Definition 4.1 re replced y sets {σ M σ sndtrces(s)} nd {σ M σ prctrces(s)}, respectively. Now, let conf x {conf, conf f }. We hve S conf x C if S conf x C provided tht the occurrences of conf s, conf f s, conf p, conf f p ppering in the definition of conf nd conf f, given in Definition 4.1, re replced y conf s, conf f s, conf p, conf f p, respectively. We revisit our previous exmple. Let us modify services 24 nd 25 in such wy tht, right fter 25 sends or c to service 26, service 25 tells service 24 whether or c ws sent. This is done y sending to service 24 new messge d or e, respectively. Services 24 nd 25 (lso depicted in Figure 4) re the resulting new versions of services 24 nd 25, respectively. Let us note tht the system consisting in 24, 25, nd 26 conforms to 27 with respect to ll conformnce reltions introduced in the previous definition, ecuse ll of them ignore messges d nd e. Intuitively, derivtion of services sed on simple projection does not work ecuse it does not mke services follow the non-deterministic choices tken y the choreogrphy. In order to solve this prolem, next we consider n lterntive wy to extrct services from the choreogrphy. In prticulr, new control messges re dded to mke ll services follow the sme non-determinism choices of the choreogrphy, s we did in our previous exmple. In order to do it, we will introduce new service, clled the orchestrtor, which will e responsile of mking ll non-deterministic choices of the choreogrphy. For ech stte s j of the choreogrphy hving severl outgoing trnsitions, n equivlent trnsition will e non-deterministiclly tken y the orchestrtor (sy, the p-th ville trnsition). Next, the orchestrtor will tke severl consecutive trnsitions to nnounce its choice to ll services. In ech of these trnsitions, the orchestrtor will send messge jp to nother service, mening tht the p-th trnsition leving stte s j must e tken y the service. After () the orchestrtor nnounces its choice to ll services; nd () the orchestrtor receives messge jp from the ddressee of the choreogrphy trnsition (this messge denotes tht the ddressee hs processed the messge), the orchestrtor will rech stte representing the stte reched in the choreogrphy fter tking the selected trnsition, nd the sme process will e followed gin. y dding the orchestrtor, we mke sure tht ll services follow the sme non-deterministic choices of the choreogrphy, nd thus system consisting of the orchestrtion nd the corresponding derived services will conform to the choreogrphy with respect to ll conf x reltions given in Definition 4.2. Let us note tht, since the only messge required y the orchestrtor to continue is sent y the ddressee denoted in the choreogrphy trnsition, t given time the orchestrtor nd the services could hve reched different steps of the choreogrphy simultion execution (in generl, the orchestrtor will e in further step). There is no risk tht services confuse the order in which ech trnsition must e tken, ecuse ll messges controlling trnsition choices re introduced in input uffers (s the rest of messges) nd they will elong to the sme type. Thus, they will e processed in the sme order s the orchestrtor sent ech of them. This gurntees tht services will e led through the choreogrphy grph y following the orchestrtor pln, in the sme order s plnned. Next we will ssume tht the identifier of the orchestrtor is orc. Definition 4.3 Let C = (S, M, ID, s in, T) e choreogrphy mchine where ID = {id 1,..., id n } nd S = {s 1,..., s l }. For ll 1 i n, the controlled service for C nd id i, denoted controlled(c, id i ), is service M i = id i, S {s ij, s ij i, j [1..l]}, M { ij i, j [1..l]}, M { ij i, j [1..l]}, s in, T i, {{m} m M} {{ ij i, j [1..l]}} where for ll s j S the following trnsitions re in T i : Let t 1,..., t k e the trnsitions leving s j in C. For ll (orc, jp)/(null,null) 1 p k we hve s j s jp T i. m/(snd dr) Let t p = s j s j T e the p-th trnsition leving s j in C. For ll 1 j l nd 1 p k (snd we hve s,i)/(dr,o) jp u jp T i, where () if snd = id i then snd = i = null, dr = dr, o = m, nd u jp = s j. () else, if dr = id i then snd = snd, i = m, dr = o = null, nd u jp = s jp. esides, we lso hve (null,null)/(orc, jp) s j in T i. s jp (c) else snd = i = dr = o = null nd u jp = s j. The orchestrtor of C, denoted y orchestrtor(c), is service O = orc, S {s ijk i, j [1..l], k [1..n+1]}, M { ij i, j [1..l]}, M { ij i, j [1..l]}, s in, T o, {{m} m M} {{ ij i, j [1..l]}} where for ll s j S the following trnsitions re included in T o : Let t 1,..., t k e the trnsitions leving s j in C. For ll (null,null)/(null,null) 1 p k we hve s j s jp1 T o. 6

A C e f A o (A,1) (,1) (A,2) (,2) (,1)/ (A,2)/ A (o,1)/ (,e) (,f)/ (o,2) (o,2)/ (o,1)/ (A,e)/ (o,1) (A,f) Figure 2. Derivtion of services with orchestrtor. (o,2)/ Definition 4.5 We hve tht controlled (C, id i ) is defined s controlled(c, id i ) fter replcing cses () nd () of Definition 4.3 y the following expressions: () if snd = id i then snd = i = null, dr = dr, o = m, nd u jp = s jp. esides, we lso hve (null,null)/(orc, jp) s j in T i. s jp () else, if dr = id i then snd = snd, i = m, dr = o = null, nd u jp = s j. Theorem 4.6 Let C = (S, M, ID, s in, T) e choreogrphy with ID = {id 1,...,id n }. Let S = (controlled (C, id 1 ),..., controlled (C, id n ), orchestrtor(c)). For ll conf x {conf s, conff s } we hve S conf x C. m/(snd dr) Let t p = s j s j T e the p-th trnsition leving s j in C. For ll 1 p k, 1 i n we (null,null)/(id i, jp) hve s jpi s jp i+1 T o. (dr, jp)/(null,null) hve s jp n+1 s j T o. We lso Theorem 4.4 Let C = (S, M, ID, s in, T) e choreogrphy with ID = {id 1,..., id n }. Let S = (controlled(c, id 1 ),..., controlled(c, id n ), orchestrtor(c)). For ll conf x {conf s, conf p, conf, conf f s, conf f p, conf f } we hve S conf x C. Figure 2 shows choreogrphy C s well s the services derived from C y pplying Definition 4.3, including n orchestrtor O. If we do not need to meet the conformnce with respect to processing trces, tht is, if we only require conf s nd conf f s, then we do not need to require tht ddressees of choreogrphy trnsitions lock the dvnce of the orchestrtor until they process received messges. This restriction ws imposed just to force the messge processing follow the order required y the choreogrphy. Alterntively, if ddressees do not lock the orchestrtor then, for instnce, the service responsile of processing the second messge of the execution could process it efore the service responsile of processing the first one does so. Even if the orchestrtor were not required to wit for the ddressees, the order in which messges re sent would e correct s long s the orchestrtor is required to wit for the senders. Actully, if we only consider conformnce with respect to sending trces then replcing the restriction of witing for the ddresses y the restriction of witing for the senders is good choice in terms of efficiency. This is ecuse, in this cse, the orchestrtor will not e locked just witing for the messge to e processed; on the contrry, it will e le to go on even if the messge hs not een processed yet. Thus, y tking this lterntive, the rte of ctivities the services cn ctully execute in prllel is incresed. Let us note tht we cn remove the orchestrtor nd distriute its responsiilities mong the services themselves, thus mking decentrlized solution. Let s e choreogrphy stte with severl outgoing trnsitions. Insted of using n orchestrtor to choose which trnsition is tken, we do s follows: We sort ll outgoing trnsitions e.g. y the nme of the sender nd we mke the first sender choose etween () tking ny of the trnsitions where it is the sender; or () refusing to do so. In cse () it will nnounce its choice to the rest of services, thus plying the role of the orchestrtor in this step. In cse () it will notify its rejection to choose trnsition to the second service. Then, the second service will choose either () or () in the sme wy, nd so on up to the lst sender, which will e forced to tke one of its trnsitions. Let us note tht, in this lterntive design, service cn receive the request to tke given non-deterministic choice from severl services, nd thus ll corresponding trnsitions must e creted. This complictes the definition of the derivtion; due to the lck of spce, the forml definition of this derivtion is given in Appendix (see Definitions 5.1 nd 5.1). As it is shown in Theorems 5.2 nd 5.2, the set of services derived in this wy lso conforms to the choreogrphy with respect to ll reltions given in Definition 4.2 (if services wit for the ddressee of the choreogrphy trnsition) or with respect to conf s nd conff s (if they do not). An exmple of derivtion of the former kind is depicted in Figure 3. For the ske of simplicity, some trnsitions included in the forml derivtion hve een omitted. Service A receives the responsiility of either tking one of the trnsitions where it is the sender (there is only one in this exmple) or refusing to do so. In the former cse, it tells the next service in the list () tht it will decide the trnsition indeed (messge 2) nd next it tells ll services (i.e. just ) which of its trnsitions it will ctully tke (21). Then, it sends e to nd wits for signl indicting tht hs processed the messge (2). In the ltter cse, i.e. if it refuses to choose one of its trnsitions, then it tells its decision to next service (messge 1) nd wits for the rest of services (just ) to tell it which choice it must tke. When does so (11), it wits for receiving from nd next it cknowledges the 7

A C e f A A (,1) (,11)/ (,f)/ (,1) (,2) (,21) (,e) (,2)/ ( A,1 )/ ( A,2)/ (A,11) (A,f) (A,1)/ ( A,21)/ (A,e)/ (A,2) Figure 3. Derivtion of services without orchestrtor. reception (1). The ehvior of turns out to e dul to the ehvior of A. 5 Conclusions nd future work In this pper we hve presented forml frmework to utomticlly extrct system of services tht conforms to given choreogrphy. Two derivtion methods, one of them sed on n orchestrtor service nd the other one yielding decentrlized system, re presented. For ech method, we consider two lterntives: Mking the system conform with respect to instnts where messges re sent, or mking it conform with respect to ll proposed criteri. Lnguges for defining models of orchestrtions nd choreogrphies hve een presented, nd we hve defined some forml semntic reltions where, in prticulr, sending trces re distinguished from processing trces, nd the suitility of service for given choreogrphy my depend on the ctivities of the rest of services it will e connected with, which contrsts with previous works [4]. The proposed frmework is illustrted with severl toy exmples nd smll cse study, given Appendix A. References [1] T. Andrews nd F. Curer. We Service usiness Process Execution Lnguge, Working Drft, 2004. Version 2.0, 1. [2] M. orele, R. D. Nicol, nd R. Pugliese. Trce nd testing equivlence on synchronous processes. Inf. Comput., 172(2):139 164, 2002. [3] M. rvetti nd G. Zvttro. Towrds unifying theory for choreogrphy conformnce nd contrct complince. In Softwre Composition, pges 34 50, 2007. [4] M. rvetti nd G. Zvttro. Contrct complince nd choreogrphy conformnce in the presence of messge queues. In Proc. of 5th Interntionl workshop on We Services nd Forml Methods, WS-FM 08, LNCS (in press). Springer, 2008. [5] T. ultn nd X. Fu. Choreogrphy modeling nd nlysis with collortion digrms. IEEE Dt Eng. ull., 31(3):27 30, 2008. [6] T. ultn nd X. Fu. Specifiction of relizle service converstions using collortion digrms. Service Oriented Computing nd Applictions, 2(1):27 39, 2008. [7] M. Crone, K. Hond, nd N. Yoshid. Theoreticl spects of communiction-centred progrmming. Electr. Notes Theor. Comput. Sci., 209:125 133, 2008. [8] H. Cstejón, R. rek, nd G. ochmnn. Relizility of collortion-sed service specifictions. Asi-Pcific Softwre Engineering Conference, 0:73 80, 2007. [9] I. Cstellni nd M. Hennessy. Testing theories for synchronous lnguges. In FSTTCS, pges 90 101, 1998. [10] G. Díz nd I. Rodríguez. Checking the conformnce of orchestrtions with respect to choreogrphies in we services: A forml pproch (to pper s short pper). In FMOODS/FORTE 2009. Springer, 2009. [11] M. Goud nd Y. Yu. Synthesis of communicting finite-stte mchines with gurnteed progress. IEEE Trnsctions on Communictions, 32(7):779 788, 1984. [12] K. Hond, N. Yoshid, nd M. Crone. Multiprty synchronous session types. In POPL, pges 273 284, 2008. [13] M. Huhns nd M. Singh. Service-oriented computing: Key concepts nd principles. In IEEE Internet Computing, pges 75 81. IEEE Computer Society Press, 2005. [14] Z. Qiu, X. Zho, C. Ci, nd H. Yng. Towrds the theoreticl foundtion of choreogrphy. In WWW, pges 973 982, 2007. [15] J. Tretmns. Conformnce testing with lelled trnsition systems: Implementtion reltions nd test genertion. Computer Networks nd ISDN Systems, 29:49 79, 1996. [16] J. Tretmns. Testing concurrent systems: A forml pproch. In CONCUR 99, LNCS 1664, pges 46 65. Springer, 1999. [17] W. M. P. vn der Alst, N. Lohmnn, P. Mssuthe, C. Sthl, nd K. Wolf. From pulic views to privte views - correctness-y-design for services. In WS-FM, pges 139 153, 2007. [18] W3C. We Services Choreogrphy Description Lnguge, 2004. http://www.w3.org/tr/2004/ WD-ws-cdl-10-20041217. 8

1 2 3 4 5 6 7 8 (1,)/ (2,) (1,)/ (4,) (4,) (3,)/ 1 2 1 2 3 4 1 2 3 4 3 4 (2,) (1,)/ (1,)/ (4,) (4,) (3,)/ 1 2 1 2 1 2 3 4 3 4 3 4 9 (10,) 10 (9,) 11 9 10 12 10 9 9 10 11 (12,msg) 12 (11,msg)/ (11,ck) 13 (13,msg!) 14 (14,msg?)/ (9,)/ 9 10 10 9 (12,ck)/ 15 (17,) 15 16 (17,) 16 21 (22,) 22 (21,)/ 22' (21,)/ (21,)/ 23 21 22 17 18 (21,)/ (21,c)/ 21 22 (15,)/ (16,)/ 15 17 (22,) 16 17 (21,)/ (21,c)/ 24 (25,) 25 (24,)/ 26 27 24 25 24' (25',) (25',d)/ (25',e)/ 25' (24',)/ (26,) (26,c) (26,) (26,c) (25,)/ (25,c)/ 25 26 c 25 26 (24',d) (24',e) (25,) (25,c) (24,)/ (24,c)/ 24 25 c 24 25 (25',) (25',c) (24',)/ (24',c)/ Figure 4. Orchestrtions nd choreogrphies. 9

Appendix A: Exmples nd Cse Study In this ppendix we illustrte the use of the conformnce reltions given in Definition 4.1 with some simple exmples, nd next we show smll cse study including more elorted system. Intuitively, complete pthclosure (see Definition 3.1) is set consisting of (mximl) sequence s well s ll of its prefixes. Let us note tht the longest element of finite complete pth-closure of trces necessrily finishes with the stop symol. For the ske of clrity, from now on complete pth-closure will e referred just y its longest element not including the stop symol. For instnce, the complete pthclosure {[ ], [(1,, 2)], [(1,, 2), (1,, 2)], [(1,, 2), (1,, 2), stop]} will e referred just y [(1,, 2), (1,, 2)] (nd we will sy tht [(1,, 2), (1,, 2)] is complete trce). Following similr ide, n infinite complete pth-closure of the form {[ ], [( 1, 1, c 1 )], [( 1, 1, c 1 ), ( 2, 2, c 2 )], [( 1, 1, c 1 ), ( 2, 2, c 2 ), ( 3, 3, c 3 )],...} will e referred y the infinite list [( 1, 1, c 1 ), ( 2, 2, c 2 ), ( 3, 3, c 3 ),...]. Figure 4 presents severl orchestrtion services nd choreogrphies. For ll depicted services we will ssume ech input elongs to different type of inputs. Let S 1 e system of orchestrtion services consisting of services 1 nd 2. We check whether S 1 conforms to choreogrphies 5 nd 6. If we consider the conf s reltion, then we oserve tht S 1 conforms to oth 5 nd 6. This is ecuse the only possile complete sending trce of S 1 is [(1,, 2), (1,, 2)], which is included in the set of complete trces of 5 (which is {[(1,, 2), (1,, 2)], [(1,, 2), (1,, 2)]}) nd 6 ({[(1,, 2), (1,, 2)]}). Concerning full conformnce, we hve tht S 1 fully conforms to 6 with respect to sending trces, ut not to 5. Regrding processing trces, let us note tht S 1 cn generte the complete processing trces [(1,, 2), (1,, 2)] nd [(1,, 2), (1,, 2)] (note tht, fter nd re received in the input uffer of service 2, service 2 cn process them in ny order). oth complete processing trces re included in the set of complete trces of 5, ut not in the corresponding set of 6, which only includes [(1,, 2), (1,, 2)]. Thus, if either conf p or conf f p re considered, then S 1 conforms to 5, ut not to 6. Let S 2 e the system consisting of services 3 nd 4, nd let us compre it with choreogrphies 7 nd 8. In this cse, we hve the opposite result s efore. In prticulr, if processing trces re considered, then S 2 conforms to oth choreogrphies (if full conformnce is considered, it only conforms to 8). However, S 2 does not conform to 8 when sending trces re considered, regrdless of whether full conformnce is considered or not. Let us note tht S 2 cn perform the sending trces [(3,, 4), (3,, 4)] nd [(3,, 4), (3,, 4)]. However, the sets of complete trces of choreogrphies 7 nd 8 re {[(3,, 4), (3,, 4)], [(3,, 4), (3,, 4)]} nd {[(3,, 4), (3,, 4)]}, respectively. Thus, if conf s or conf f s re considered, then S 2 conforms to choreogrphy 7, ut not to choreogrphy 8. Next, let S 3 e the system consisting of services 9 nd 10. We compre S 3 with choreogrphies 11 nd 12. The set of complete sending trces of S 3 is equl to {[(9,, 10), (9,, 10)], [(9,, 10), (9,, 10)]}, while the set of complete processing trces of S 3 is {[(9,, 10)]}. On the one hnd, the only complete trce of choreogrphy 11 is [(9,, 10)], so S 3 conforms to 11 only if processing trces re considered (with respect to oth conf p nd conf f p ). On the other hnd, choreogrphy 12 cn produce oth [(9,, 10), (9,, 10)] nd [(9,, 10), (9,, 10)]. Since only complete trces re considered, S 3 conforms to 12 only if sending trces re regrded (ccording to oth conf s nd conf f s ). Despite of the fct tht only synchronous communictions re considered in our frmework, synchronous communictions cn e trivilly defined indeed. Let us consider the system S 4 consisting of services 13 nd 14. After 13 sends messge msg to 14, service 13 will e locked until 14 performs its unique trnsition nd sends messge ck ck to 13. So, synchronous communiction etween 13 nd 14 is ctully expressed y this trivil structure. A syntctic sugr to denote synchronous communiction like this is implicitly proposed in pictures of services 15 nd 16, which re intended to e equivlent to 13 nd 14, respectively. In prticulr, we propose to denote synchronous communiction on messge msg y using new symols msg? nd msg!. Let us note tht if only these kind of messges re used in orchestrtions, then conf s = conf p = conf nd conf f s = conff p = conff. Let us recll tht the suitility of n orchestrtion service to fulfill given choreogrphy depends on the ehvior of the rest of involved services. In order to illustrte this, we revisit the trvel gency exmple presented in Section 2. A trvel gency (service 17) wits for messge (stnding for we provide you with trnsfer service ) from ny of two possile services: n ir compny or hotel. We consider two possile ir compnies, represented y services 15 nd 15. Service 15 provides service 17 with trnsfer service, while 15 does nothing. Similrly, services 16 nd 16 represent two hotels, where only 16 provides the trvel gency with trnsfer. Most comintions of, on one hnd, either 15 or 15 nd, on the other hnd, either 16 or 16, llow 17 to stisfy the choreogrphy 18 with respect to (non-full) sending nd processing conformnce. In fct, only comining 15 with 16 fils to meet oth non-full semntic reltions. Thus, either the ir compny or the hotel must provide the trnsfer. If full conformnce is required, then the only vlid comintion of ir compny nd hotel consists in tking 15 nd 16, respectively. We show tht systems of orchestrtions re required to complete ll strted sequences, tht is, they re required not to finish strted sequence until the choreogrphy explicitly llows it. Let us consider orchestrtion services 21, 22, nd 22, s well s choreogrphy 23. Let S 5 e system consisting of services 21 nd 22. The sequence [(21,, 22), (21,, 22)] is oth the only complete sending trce nd the only complete processing trce of S 5. Thus, S 5 conforms to choreogrphy 23 with respect to oth kinds 10

of trces. Let us sustitute the definition of service 22 y tht given for service 22, nd let S 5 e the resulting system. The set of complete sending trces of S 5 is the sme s S 5, so S 5 lso conforms to 23 with respect to sending trces. However, the set of complete processing trces of S 5 is {[(21,, 22 ), (21,, 22 )], [(21,, 22 )]} ecuse 22 could tke its right pth nd get stuck fter receiving (more formlly, [(21,, 22 ), stop] is processing trce of S 5). Since [(21,, 22 )] is not complete processing trce of 23, S 5 does not conform to 23 with respect to processing trces. Finlly, we consider cse where there re infinite complete trces in systems due to the presence of loops. Let us revisit the orchestrtions nd the choreogrphy previously depicted in Figure 1, nd let S e the composition of A nd. The infinite set of complete trces of choreogrphy C is T = {σ, σ 1, σ 2, σ 3,...}, where σ is the infinite conctention of the susequence α = [(A, request, ), (, response, A)], tht is, σ = α α α..., nd for ll i IN we hve σ i = (α) i (A, exit, ). In fct, the infinite set of complete sending nd processing trces of S is T s well, so we hve tht S conforms to C with respect to ll reltions conf s, conf p, conf, conf f s, conf f p, nd conf f. Finlly, we present smll cse study consisting in more elorted system. This is typicl purchse process tht uses Internet s usiness context for trnsction. There re three ctors in this exmple: customer, seller nd crrier. The purchse works s follows: A customer wnts to uy product y using Internet. There re severl sellers tht offer different products in Internet Servers sed on We-pges. The customer contcts seller in order to uy the desired product. The seller checks the stock nd contcts with crrier. Finlly, the crrier delivers the product to the customer. Figures 5 nd 6 depict the orchestrtion of the three ctors represented in this purchse process, tht is, the customer, the seller nd the crrier. The ehvior of ech prticipnt is defined s follows: Customer: It contcts the seller to uy product. After consulting the product list, it cn either order product or do nothing. If the customer decides to uy product, then it must send the seller the informtion out the product nd the pyment method. After the pyment, it wits to receive the product from crrier. Seller: It receives the customer order nd the pyment method. The seller checks if there is enough stock to deliver the order nd sends n cceptnce notifiction to the customer. If there is stock to deliver the order, then it contcts with crrier to deliver the product. Crrier: It picks up the order nd the customer informtion in order to deliver the product to the customer. Figure 7 shows the choreogrphy of this Internet purchse process. Once the orchestrtions of the three service nd the choreogrphy specifiction re defined, we use the conformnce reltions given in Definition 4.1 to check if the coms 1 (1,iProduct,2), (2,lProduct,1), (1,Nothing,2) s 2 (1,iProduct,2), (2,lProduct,1), (1,Product), (2,NoStock,1) s 3 (1,iProduct,2), (2,lProduct,1), (1,Product), (2,Stock,1), (1,iPyment,2), (2,Receipt,1), (2,PickOrder,3), (3,DeliverOrder,1) Tle 1. The choreogrphy C trces. position of the proposed orchestrtion services stisfies the choreogrphy. Let us consider the system S = (1, 2, 3), where 1, 2, nd 3 represent the client service, the seller service, nd the crrier service, respectively. Let C e the choreogrphy mchine depicted in Figure 7, nd let s 1, s 2, s 3 e the sequences depicted in Tle 1. For ll complete trce σ of C, σ is n infinite conctention of susequences σ = α 1 α 2 α 3 α 4... where for ll i IN we hve α i {s 1, s 2, s 3 }. Let us note tht ny complete sending or processing trce σ of S must lso e n infinite conctention of susequences s 1, s 2, s 3. Hence, for ll σ Comp(sndTrces(S)) Comp(prcTrces(S)) we hve σ Comp(trces(C)), nd thus we hve oth Sconf s C nd Sconf p C, which implies SconfC. Moreover, in this cse we lso hve tht, for ll σ Comp(trces(C)), σ Comp(sndTrces(S)) nd σ Comp(prcTrces(S)). Therefore, we lso hve Sconf f s C, Sconff p C, nd Sconff C. Appendix : Derivtion of decentrlized systems of services In this ppendix we formlly present the derivtion of decentrlized systems of services from choreogrphies. Two lterntives re considered: Mking the system conform to the choreogrphy with respect to ll proposed conf x conformnce reltions, nd mking it conform only with respect to sending trces. Theorems 5.2 nd 5.4 show the correctness of oth pproches. Definition 5.1 Let C = (S, M, ID, s in, T) e choreogrphy mchine where ID = {id 1,..., id n } nd S = {s 1,..., s l }. For ll s S nd id ID, let T s,id = {(s, m, id, dr, s ) dr, m, s : (s, m, id, dr, s ) T } nd m s,id = T s,id. For ll 1 j m s,id, let t s,id,j denote the j-th trnsition of T s,id ccording to some ritrry ordering criterium. Let [id s,.. s.,ids 1 ] denote the sequence s hs of ll identifiers id ID such tht m s,id 1, ordered ccording to some ritrry ordering criterium. For ll 1 i n, the decentrlized service for C nd id i, denoted decentrl(c, id i ), is service M i = (id i, S i, I i, O i, s in, T i, {I i }), where S i, I i, O i consist of ll sttes, inputs, nd outputs ppering in trnsitions descried next nd, for ll s S, the following trnsitions re in T i : [CASE 1] If there re trnsitions leving s in which id i is the sender, ut id i is neither the first nor the lst service 11