WSMO logo

D14v0.2. Ontology-based Choreography and Orchestration of WSMO Services

WSMO Working Draft 9 December 2005

This version:
http://www.wsmo.org/TR/d14/v0.2/20051209/
Latest version:
http://www.wsmo.org/TR/d14/v0.2/
Previous version:
http://www.wsmo.org/TR/d14/v0.2/20051008/
Editors:
James Scicluna
Axel Polleres
Dumitru Roman
Co-Authors:
Dieter Fensel

This document is also available in non-normative PDF version.
Copyright © 2005 DERI®, All Rights Reserved. DERI liability, trademark, document use, and software licensing rules apply.



Table of contents


1. Introduction

This document describes the Choreography and Orchestration parts of the interface definition of a WSMO service description [Roman et al., 2005]. These parts of a WSMO description describe the behavior of the service from two orthogonal perspectives: communication (how to communicate with the service from the client side such that the service will provide its capability), and respectively collaboration (how the service collaborates with other WSMO services or which goals it needs to resolve in order to achieve its capability). Both views are separate abstractions of the actual implementation of the service.

The Choreography part of a service interface describes the behavior of the service from a client point of view; this definition is in accordance to the following definition given by W3C Glossary [W3C Glossary, 2004]: Web Services Choreography concerns the interactions of services with their users. Any user of a Web service, automated or otherwise, is a client of that service. These users may, in turn, may be other Web Services, applications or human beings.

The Orchestration part of a service interface defines how the overall functionality of the service is achieved in terms of the cooperation with other service providers with the actual implementation. It describes how the service works from the provider's perspective (i.e. how a service makes use of other WSMO services or goals in order to achieve its capability). This complies with the W3C definition of Web Service Orchestrations [W3C Working Group]: An orchestration defines the sequence and conditions in which one Web Service invokes other Web Services in order to realize some useful function. That is, an orchestration is the pattern of interactions that a Web Service agent must follow in order to achieve its goal.

The aim of this document is to provide a core conceptual model for describing choreography and orchestration interfaces in WSMO. The state-based mechanism for describing WSMO choreography and orchestration interfaces is based on the Abstract State Machine [Gurevich, 1993] methodology. An ASM is used to abstractrly describe the behavior of the service with respect to an invocation instance of a service. We have chosen an abstract machine model for the description of this interface since such a service invocation (e.g. the purchase of a book at amazon) may consist of a number of interaction steps where these possible interactions can be abstractly described by a stateful abstract machine.

ASMs have been chosen as the underlying model for the following three reasons:

The remainder of this document is organized as follows: Section 2 provides an Overview of Abstract State Machines. Section 3 provides a core conceptual model for WSMO choreographies, Section 4 presents the conceptual model for WSMO orchestration interfaces, and finally Section 5 and Section 6 outline future work and draw conclusions with some remarks.

2. Classical Abstract State Machines

In this section, we give a brief overview of the main concepts of Abstract State Machines. Abstract State Machines (ASMs for short), formerly known as Evolving Algebras [Gurevich, 1995], provide means to describe systems in a precise manner using a semantically well founded mathematical notation. The core principles are the definition of ground models and the design of systems by refinements. Ground models define the requirements and operations of the system expressed in mathematical form. Refinements allow to express the classical divide and conquer methodology for system design in a precise notation which can be used for abstraction, validation and verification of the system at a given stage in the development process.

As described in [Börger & Stärk, 2003], Abstract State Machines are divided into two main categories, namely, Basic ASMs and Multi-Agent ASMs. The former express the behavior of a system within the environment. Multi-Agent ASMs allow to express the behavior of the system in terms of multiple entities that are collaborating to achieve a functionality. The latter can be further divided in two categories: Synchronous and Asynchronous Multi-Agent ASMs, both of which can be of a distributed or non-distributed nature. This classification is depicted in Figure 1 below.

 
Figure 1: Different types of Abstract State Machines

2.1 Single-Agent ASM

A single-agent ASM (most commonly known as Basic ASM) is defined in terms of a finite set of transition rules which are executed in parallel. It may involve non-determinism as described below.

2.1.1. Basic Transition Rules

The most basic rules are Updates which take the form of assignments (also called function updates) as follows:

f(t1,...,tn) := t

The execution of a set of such updates is carried out by changing the value of the occurring functions f at the indicated arguments to the indicated values in parallel. Hence, the parameters ti and t are for example evaluated to vi, v. The value of f(v1,...,vn) is then updated to v which represents the value of the function f(v1,...,vn) in the next state. The pair of the function name f (specified by the signature) and the optional arguments (v1,...,vn) (which is a list of dynamic parameter values of any type), are called locations. These locations form the concept of the basic ASM object containers or memory units. The location-value pairs (loc,v) are called updates and represent a basic unit of state change in the ASM.

More complex transition rules are defined recursively, as follows. (Note that for the sake of clarity, we slightly deviate here from the original syntax used in [Börger & Stärk, 2003].) First, transition rules can be guarded by a Condition as follows:

if Condition then Rules endIf

Here, the Condtion is an arbitrary closed first order formula. Such a guarded transition rule has the semantics that the Rules in its scope are executed in parallel, whenever the condition holds in the current state.

Next, basic ASMs allow some form of universally quantified parallelism by transition rules of the form

forAll Variable with Condition do Rules(Variable) endForAll

Here, the Variable is a variable occurring freely in Condition, with the meaning that the Rules[Variable/Value] are executed in parallel for all possible bindings of the Variable to a concrete Value such that the Condition[Variable/Value] holds in the current state. Here, Condition[Variable/Value] (and Rules[Variable/Value], resp.) stand for the condition (or rule, resp.) where each occurence of Variable is replaced by Value.

Similarly, basic ASMs allow for non-deterministic choice by transition rules of the form

choose Variable with Condition do Rules(Variable) endChoose

Here, as opposed to the forAll rule, one possible binding of the Variable such that the condition holds is picked non-deterministically by the machine and the Rules are executed in parallel only for this particular binding.

A single ASM execution step is summarized as follows:

  1. Unfold the rules, according to the current state and conditions holding in that state, to a set of basic updates.
  2. Execute simultaneously all the updates.
  3. If the updates are consistent (i.e. no two different updates update the same location with different values, which means that there must not be a pair of updates {(loc,v),(loc,v')} with v ≠ v' ), then the result of execution yields the next state.
  4. All locations which are not affected by updates, keep their values.

These steps are repeated until no condition of any rule evaluates to true, i.e. the unfolding yields an empty update set. In case of inconsistent updates, the machine run is either terminated or an error is reported (or both).

2.1.2. Function Classification

ASMs define a classification for functions that can be subject to updates or used in conditions. All functions are either static or dynamic. On the one hand, static functions never change during a run of a machine. Dynamic functions can be classified in four other categories, namely, controlled, monitored (or in), interaction (or shared) and out. Controlled functions are directly updatable by the rules of the machine M only. Thus, they can neither be read nor updated by the environment. Monitored functions can only be updated by the environment and read by machine M and hence constitute the externally controlled part of the state. Shared functions can be read and updated by both the environment and the rules of the machine M. Out functions can be updated but not read by M, but can be read by the environment. Furthermore, ASMs define the so-called derived functions. Theres are functions neither updatable by the machine or the environment but which are defined in terms of other static and dynamic (and derived) functions.

As we will see later, we will base our model of the behavioral aspects of a single service on basic ASMs, operating on dynamic WSMO Ontologies, describing the state of the machine in terms of concepts, relations and their instances, where we can define the ontological axioms in terms of derived functions.

2.1.3. Control State ASMs

Readability and structure of general ASMs can be improved by introducing so called control states as syntactic sugar. Such control states allow to view ASMs as a straightforward extension of finite state machines and thus have desirable properties like high-level graphical representation and modularization of the machine. A Control State ASM is an ASM with one particular controlled function ctl_state (which has as its range a finite number of integers or a finite enumeration of state-descriptors) and each transition rule having the form:
   if ctl_state = i then
       if Cond1 then
                Rule1
                ctl_state := j1
       endIf
       ...
       if Condn then
                Rulen
                ctl_state := jn
       endIf
   endIf

 

2.1.4. Modularization

In order to structure and modularize ASM descriptions, it is allowed to define modules which take the following form:

ModuleName(Variable1, ..., Variablen) = {Rules}

In the definition of other rules these modules can be used as (possibly recursive) "rule calls" only when the parameters are instantiated by legal values (objects, functions, rules, so that the resulting rule has a well defined semantical meaning on the basis of the (informal) explanations given in the previous subsection. For details, cf. [Börger & Stärk, 2003]. Such modularization may be viewed as submachine calls which can also be recursive and nested, nut not directly as composition of different (possibly distributed) ASMs since in a scenario with multiple ASMs run by different agents one need to consider details such as snchronous vs. asynchronous invocation, different clocks, etc. which is discussed in the following subsection.

2.2 Multi-Agent ASM

As described above, there are two types of Multi-Agent ASMs, namely, synchronous and asynchronous. A synchronous Multi-agent ASM consists of a set of basic ASMs each running their own rules and which are synchronized by an implicit global system clock. Such ASMs are equivalent to the set of all single-agent ASMs operating in the global state over the union of their state signatures. The global clock is considered as a step counter. Synchronous ASMs are particularly useful for analysing the interaction between components using precise interfaces over common locations. We consider this model insufficent for the description of the collaboration of Web services.

Asynchronous ASMs consist of a finite number of independent agents each executing a basic or structured ASM in its own local state. The problem which arises in such a scenario is that moves of the different agents cannot be compared due to different data, clocks and duration of execution. Furthermore, the global state is difficult to define since different agents may partially share the same state(s) or may not. The coherence condition for such ASMs is the well-definedness for a relevant portion of a state in which an agent is supposed to perform a step, thus providing the notion of "local" stable view of "the" state in which an agent makes a move.

3. WSMO Choreography

WSMO Choreography deals with interactions of the Web service from the client's perspective. We base the description of the behavior of a single service exposed to its client on the basic ASM model. WSMO Choreography interface descriptions inherit the core principles of such kind of ASMs, which summarized, are: (1) they are state-based, (2) they represents a state by a signature, and (3) it models state changes by transition rules that change the values of functions and relations defined by the signature of the algebra.

In order to define the signature we use a WSMO ontology, i.e. definitions of concepts, their attributes, relations and axioms over these. Instead of dynamic changes of function values as represented by dynamic functions in ASMs we allow the dynamic modification of instances and attribute values in the state ontology. Note that the choreography interface describes the interaction with respect to a single instance of the choreography. The key extension compared with basic ASMs based above is that the machine signature is defined in terms of a WSMO ontoloy and the logical language used for expressing conditions is WSML.

Taking the ASMs methodology as a starting point, a WSMO choreography consists of three elements which are defined as follows:

Listing 1. WSMO choreography definition in the WSMO meta-model
Class wsmoChoreography
      hasNonFunctionalProperties type nonFunctionalProperties
      hasStateSignature type stateSignature
      hasTransitionRules type transitionRules
Non-FunctionalProperties
Non-FunctionalProperties are the same as defined in [Roman et al., 2005] in Section 4.1.
State Signature
The State signature defines the state ontology used by the service together with the definition of the types of modes the concepts and relations may have.
Transition Rules
Transition rules that express changes of states by changing the set of instances.

The remainder of this section describes the main elements of the ASM-based choreography model. Section 3.1 describes the state signature and Section 3.2 describes the transition rules of the ASM.

3.1 State Signature

The signature of the machine is defined by (1) importing an ontology (possibly more than one) which defines the state signature over which the transition rules are executed, (2) a set of statements defining the modes of the concepts (Section 3.1.1) and a set of update functions (Section 3.1.2). The default mode for concepts of the imported ontologies not listed explicitly in the modes statements is static. Note: It is not allowed to assign the one of the modes in or out to concepts which have explicitly defined instance data in the imported ontologies by the state signature.

Listing 2. Definition of the State Signature in the WSMO meta-model
Class stateSignature
      hasNonFunctionalProperties type nonFunctionalProperties
      importsOntology type ontology
      hasIn type in
      hasOut type out
      hasControlled type controlled
      hasShared type shared
      hasStatic type static

3.1.1 State

The state for the given signature of a WSMO choreography is defined by all legal WSMO identifiers, concepts, relations and axioms. The elements that can change and that are used to express different states of a choreography, are instances of concepts and relations which are used similar to locations in ASMs. These changes are expressed in terms of creation of new instances or changes of attribute values.

3.1.2 Roles of Concepts and Relations

In a similar way to the classification of locations and functions in ASMs, the concepts and relations of an ontology are marked to support a particular role (or mode). These roles are of five different types:

Since Web services deal with actual instance data, the classification inherits to instances of the respectively classified concepts and relations. That is, instances of controlled concepts and relations can only be created and modified by the choreography interface, instances of in concepts can only be read by the choreography, instances of out concepts can only be created by the choreography but not read or further modified after its creation. Instances of shared concepts and relations are supposed to be read and written by both the choreography and possibly the environment, i.e. can also be modified after creation. We suppose shared concepts particularly important for groundings alternative to WSDL which do not rely on strict message passing such as semantically enables TupleSpaces (cf. [Fensel D., 2004]), in the future.

3.2 Transition Rules

As opposed to basic ASMs, the most basic form of rules are not assignments, but we deal with basic operations on instance data, such as adding, removing and updating instances to the signature ontology. To this end, we define atomic update functions to add delete, and update instances, which allow us do add and remove instances to/from concepts and relations and add and remove attribute values for particular instances. In WSMO Choreography, these basic updates are defined as a set of fact modifiers which are of three different types:

A fact can be either a membership fact (memberOf), an attribute fact (hasValue) or a combination in the form of a WSML molecule abbreviating conjunctions of membership and attribute facts (cf. [Bruijn et al., 2005]). The add modifier adds a new fact to the state unless it is already present. The delete modifier deletes a fact from the state, if present. For a formal definition of the fact modifiers, please refer to Definition 3 of Appendix A.

More complex transition rules are defined recursively, analogous to classical ASMs by if-then rules:

if Condition then Rules endIf

Compared with basic ASMs, in WSMO choreography the following restrictions apply to Conditions and Variables:

For a formal specification of the conditons, please refer to Definition 4 of Appendix A. We might extend the definition of conditions along future versions of WSML or as needed.

4. WSMO Orchestration

It is envisioned that orchestration should make use of the Multi-Agent asynchronous ASM model to describe the interactions between Web services and Goals. These aspects are still to be further investigated and will be defined in future versions of this document.

As for the requirements of Orchestration Interfaces, it is planned by the authors to proceed as follows. The language will be based on the same ASMs model as Choreography interfaces which - in order to link to externally called services or (sub)goals that the service needs to invoke to fullfill its capability - needs to extended as follows:

 
Figure 2: WSMO Orchestration

 

5. Future Work

Our current model of Ontology ASMs shall be further refined with future versions of WSML. The formal semantics of rules in our ontology ASM model which is currently defined in the Appendix needs further refinement and further proof-of concept descriptions. A more readable high-level language with possibly graphical representation to ease modeling and tool support is on our agenda. Such language should be mappable to the ASM model defined in this document. Such a high-level language could be based on UML Activity Diagrams and work relating ASMs to this notation is already defined in [Börger & Stärk, 2003].

Orchestration descriptions should address interactions with Goals and Web services using an asynchronous scenario with multi-agent ASMs.

6. Conclusions

This document presented a core conceptual model for modeling WSMO Choreographies and Orchestrations based on the ASMs methodology. To this end we defined an ontology based ASM model for Single-Agent ASMs that are used as the base model for choreography interfaces. The state of these ontology ASMs machine are described by an ontology (or possibly a set of ontologies). The types of concepts are marked with in, out, shared, controlled and static definining the role of the particular concept in the machine. The interactions with a service can then be descibed with a set of transition rules.

Multi-Agent ASMs shall be used as the model for describing interactions between different Web services in the orchestration in order to achieve the required functionality.

Appendix A. Definitions

The definitions for the choreography language elements will be updated in future versions of this document.

Definition 4: Conditions in basic WSMO Choreography

Conditions in the basic WSMO choreography are syntactically deriveded form of WSML Logical Expressions as defined in [De Bruijn et al., 2005]. More precisely, we restrict WSML Logical Expressiond by disallowing the use of the use of naf, !-, and :-.

Semantically, we slightly deviate from the definition of WSML logical expressions as in Section 2.8 of [De Bruijn et al., 2005] with respect to the scope of variables:

The scope of a variable in a condition is always defined by its quantification. If a variable is neither quantified inside the condition nor bound by an enclosing forall or choose rule, the variable is implicitly existentially quantified outside the condition.

The intuitive reason why we close off free variables is that conditions can be viewed as queries over the state ontology: When checking such a condition over the state we are not interested in proving that it holds for all possible bindings of a free variable, but only whether such a binding exists.

Formal Semantics of Choreography Interfaces

The intuitive semantics of the Ontology ASMs defined in this document is as follows. When beginning to interact with a service via its choreography interface you start with the initial state and all possible interaction sequences with the service are defined by the possible runs of the Ontology ASM defined in the Choreography interface.

Definition (initial state): The initial state of a Choreography Interface (i.e. at the time when interaction with the service starts, is defined by the state signature. That is, the initial state is the set S0 consisting of all instances of all concepts and relations defined in the imported ontologies.

A run of an Choreography interface is defined analogously to the runs of basic ASMs in [Börger & Stärk, 2003], i.e. runs are defined as sequences of possible single execution steps:

Possible executions steps are defined by
S'= S \ {fact | delete(fact ε U} ∪ {fact | add(fact ε U)}
where S is the current state, U is a consistent update set, and S' is the resulting state of applying U in S.

We recall that the choreography interface is defined by a set of transition rules R: Let O denote the imported signature ontology(/ies). We define update sets for U<R,S> inductively:

An update set U is consistent if it does not contain any two elements add(fact) and delete(fact) and the resulting state
S'= S \ {fact | delete(fact ε U} ∪ {fact | add(fact ε U}}
is consistent with the signature ontology, i.e. S' ∪ O is satisfiable.

A run of an ASM stops if the update set induced by the rules above is empty, i.e. no more rules can fire.

References

[Börger, 1998] Egon Börger: "High Level System Design and Analysis Using Abstract State Machines", Proceedings of the International Workshop on Current Trends in Applied Formal Method: Applied Formal Methods, p.1-43, October 07-09, 1998

[Börger & Stärk, 2003]] Egon Börger and Robert Stärk: "Abstract State Machines: A Method for High-Level System Design and Analysis", Springer-Verlag, 2003

[Bruijn et al., 2005] J. de Bruijn, H. Lausen, R. Krummenacher, A. Polleres, L. Predoiu, M. Kifer, D. Fensel: The Web Service Modeling Language WSML. WSML Final Draft v0.2, 2005. Available from http://www.wsmo.org/TR/d16/d16.1/v0.2/.

[Gurevich, 1993] Yuri Gurevich: "Evolving Algebras 1993: Lipari Guide", Specification and Validation Methods, ed. E. Börger, Oxford University Press, 1995, 9--36.

[Fensel D., 2004] D. Fensel: Triple-space computing: Semantic Web Services based on persistent publication of information. Proc. of IFIP Int'l Conf. on Intelligence in Communication Systems 2004, Bangkok, Thailand, Nov 2004:43-53.

[Kopecky et. al., 2005]J. Kopecky, D. Roman (authors): WSMO Grounding, WSMO deliverable D24.2 version 0.1. available from http://www.wsmo.org/2005/d24/d24.2/v0.1/20050119/

[Roman et al., 2005] D. Roman, H. Lausen, and U. Keller (eds.): Web Service Modeling Ontology (WSMO), WSMO deliverable D2 version 1.1. available from http://www.wsmo.org/TR/d2/v1.2/

[W3C Glossary, 2004] Hugo Haas, and Allen Brown (editors): Web Services Glossary, W3C Working Group Note 11 February 2004, available at http://www.w3.org/TR/ws-gloss/

Acknowledgement

The work is funded by the European Commission under the projects DIP, Knowledge Web, InfraWebs, SEKT, SWWS, ASG and Esperonto; by Science Foundation Ireland under the DERI-Lion project and by the FIT-IT (Forschung, Innovation, Technologie - Informationstechnologie) under the projects RW² and TSC. The editors would like to thank to all the members of the WSMO working group for their advice and input into this document.
Valid XHTML 1.1! webmaster $Date: 2005/12/13 14:37:29 $