ieee transactions on service computing, vol. **, no ...ieee transactions on service computing, vol....

15
IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware Web Services Xiuguo Zhang, Hongbo Liu, Ajith Abraham Senior Member, IEEE Abstract—Context-aware web services have been attracting significant attention as an important approach for improving the usability of web services. In this paper, we explore a novel approach to model dynamic behaviors of interacting context-aware web services, aiming to effectively process and take advantage of contexts and realize behavior adaptation of web services and further to facilitate the development of context-aware application of web services. We present an interaction model of context-aware web services based on Context-aware Process Network (CAPN), which is a dataflow and channel based model of cooperative computation. CAPN is extended to context-aware web service network by introducing a kind of sensor processes, which is used to catch contextual data from external environment. Through modeling the register link’s behaviors, we present how a web service can respond to its context changes dynamically. The formal behavior semantics of our model is described by Calculus of Communicating Systems (CCS) process algebra. The behavior adaptation and context-awareness in our model are discussed. A XML (eXtensible Markup Language) formatted service behavior description language named BML4WS is designed to describe behaviors and behavior adaptation of interacting context-aware web services. Finally, an application case is demonstrated to illustrate the proposed model how to adapt context changes and describe service behaviours and their changes. Index Terms—Context-aware web service, service behavior, CCS process algebra, CAPN, service interaction. 1 I NTRODUCTION C Ontext-aware web service can help its system to understand situational context and share that context with other services. ”Context” mainly refers to the information about clients and their environ- ment that may be used by web services to provide clients with a customized and personalized behavior [1], [2]. Context information includes any additional information, e.g. a consumer’s name, current location and address, type of client device and so on, which can be used to improve the behavior of a service in a situation [3], [4], [5], [6]. Without such additional information, the service would be operable as normal but with context information, which is arguable that the service can operate better or more appropriately [7], [8], [9], [10]. Context-awareness is considered as a kind of ability of the application to discover and take advantage of context information. In context-aware application of web services [11], [12], a web service can adapt its operations according to its contexts, that is, service behaviors change as the context changes. In order to respond to context changes, a context- aware web service has to accommodate for a variety of context types and tune their behaviors dynamically with the changing contexts. Context-aware web ser- vices have been attracting significant attention as an X. Zhang and H. Liu are with the School of Information Science and Technology at Dalian Maritime University, Dalian, 116026. E-mail: {zhangxg, lhb}@dlmu.edu.cn A. Abraham is a Director at Machine Intelligence Research Labs, Seattle, Washington 98071, USA. E-mail: [email protected] important approach to improving the usability of web services [13], [14], [15], [16], [17], [18], [19]. In this paper, we focus on the behavior of inter- acting context-aware web services and automatic be- havior adaptation of web services to context changes. We tackle the problem of how contexts are processed and how they affect service behaviors dynamically. A novel approach is proposed to model dynamic behav- iors of interacting context-aware web services, aiming to effectively process and take advantage of contexts and realize behavior adaptation of web services and further to facilitate the development of context-aware application of web services. We present an interaction model of context-aware web services based on a for- mal model, Context-aware Process Network (CAPN) [20], [21], which is a dataflow and channel based model of cooperative computation. CAPN is extended to context-aware web service network by adding a kind of additional sensor processes which is used to catch contextual data from external environment. In CAPN, the application data and context data are not distinctly separated, while in context-aware web service network, the separation of application data and context data is enforced by separating respective reading and writing semantics. This separation helps us to realize behavior adaptation of context-aware we- b service. We use unidirectional register link of CAPN to carry context information of web services. Through modeling the register link’s behaviors, we present how the web service’s behavior dynamically changes as context changes. Using CAPN, we aim to reduce unanticipated circumstances and uncooperative cases of interacting web services. 0000–0000/00$00.00 c 2011 IEEE

Upload: others

Post on 20-Mar-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1

A Novel Process Network Model forInteracting Context-aware Web Services

Xiuguo Zhang, Hongbo Liu, Ajith Abraham Senior Member, IEEE

Abstract—Context-aware web services have been attracting significant attention as an important approach for improving theusability of web services. In this paper, we explore a novel approach to model dynamic behaviors of interacting context-aware webservices, aiming to effectively process and take advantage of contexts and realize behavior adaptation of web services and furtherto facilitate the development of context-aware application of web services. We present an interaction model of context-awareweb services based on Context-aware Process Network (CAPN), which is a dataflow and channel based model of cooperativecomputation. CAPN is extended to context-aware web service network by introducing a kind of sensor processes, which isused to catch contextual data from external environment. Through modeling the register link’s behaviors, we present how a webservice can respond to its context changes dynamically. The formal behavior semantics of our model is described by Calculus ofCommunicating Systems (CCS) process algebra. The behavior adaptation and context-awareness in our model are discussed. AXML (eXtensible Markup Language) formatted service behavior description language named BML4WS is designed to describebehaviors and behavior adaptation of interacting context-aware web services. Finally, an application case is demonstrated toillustrate the proposed model how to adapt context changes and describe service behaviours and their changes.

Index Terms—Context-aware web service, service behavior, CCS process algebra, CAPN, service interaction.

F

1 INTRODUCTION

COntext-aware web service can help its systemto understand situational context and share that

context with other services. ”Context” mainly refersto the information about clients and their environ-ment that may be used by web services to provideclients with a customized and personalized behavior[1], [2]. Context information includes any additionalinformation, e.g. a consumer’s name, current locationand address, type of client device and so on, whichcan be used to improve the behavior of a service ina situation [3], [4], [5], [6]. Without such additionalinformation, the service would be operable as normalbut with context information, which is arguable thatthe service can operate better or more appropriately[7], [8], [9], [10]. Context-awareness is considered as akind of ability of the application to discover and takeadvantage of context information. In context-awareapplication of web services [11], [12], a web servicecan adapt its operations according to its contexts, thatis, service behaviors change as the context changes.In order to respond to context changes, a context-aware web service has to accommodate for a varietyof context types and tune their behaviors dynamicallywith the changing contexts. Context-aware web ser-vices have been attracting significant attention as an

• X. Zhang and H. Liu are with the School of Information Science andTechnology at Dalian Maritime University, Dalian, 116026.E-mail: {zhangxg, lhb}@dlmu.edu.cn

• A. Abraham is a Director at Machine Intelligence Research Labs,Seattle, Washington 98071, USA.E-mail: [email protected]

important approach to improving the usability of webservices [13], [14], [15], [16], [17], [18], [19].

In this paper, we focus on the behavior of inter-acting context-aware web services and automatic be-havior adaptation of web services to context changes.We tackle the problem of how contexts are processedand how they affect service behaviors dynamically. Anovel approach is proposed to model dynamic behav-iors of interacting context-aware web services, aimingto effectively process and take advantage of contextsand realize behavior adaptation of web services andfurther to facilitate the development of context-awareapplication of web services. We present an interactionmodel of context-aware web services based on a for-mal model, Context-aware Process Network (CAPN)[20], [21], which is a dataflow and channel basedmodel of cooperative computation. CAPN is extendedto context-aware web service network by adding akind of additional sensor processes which is usedto catch contextual data from external environment.In CAPN, the application data and context data arenot distinctly separated, while in context-aware webservice network, the separation of application dataand context data is enforced by separating respectivereading and writing semantics. This separation helpsus to realize behavior adaptation of context-aware we-b service. We use unidirectional register link of CAPNto carry context information of web services. Throughmodeling the register link’s behaviors, we presenthow the web service’s behavior dynamically changesas context changes. Using CAPN, we aim to reduceunanticipated circumstances and uncooperative casesof interacting web services.

0000–0000/00$00.00 c⃝ 2011 IEEE

Page 2: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 2

This paper is organized as follows: Related worksare presented in Section 2. Section 3 describes theservice interaction model of context-aware web ser-vice network. Section 4 presents behavior seman-tics of context-aware web service network. Section5 introduces the realization of behavior adaptationand context-awareness in context-aware web servicenetwork. Section 6 provides a XML formatted servicebehavior description language for describing behav-iors and behavior adaptation of interacting context-aware web services. Section 7 presents a case to showhow the application can adapt to context changes andhow to describe service behaviours and their changes.Section 8 draws conclusions and future work.

mdsMay 1, 2011

2 RELATED WORKS

2.1 Context-aware Web ServiceRecently, different technologies, approaches andframeworks for context-aware web services and theirapplication have been researched [1], [4], [22], [23],[24], [25], [26], [27]. A context-aware web service is asmart web service, which can understand situationalcontext and can share that context with other services[4], [28]. In this paper, we are mainly concerned aboutdynamic behaviors of interacting web services. Weconsider a web service as context-aware if it usescontext to provide customized and personalized be-haviors during its interaction with other services.

The definition of context depends on the purpose ofthe application. For example, in its broad sense in [29],context is defined as any information that can be usedto characterize the situation of an entity. An entity isa person, place or object that is considered relevantor the interaction between a user and an application,including the user and applications themselves. Forweb services [5], context is defined as the informationcharacterizing the situation in which the services arebeing executed. In this paper, we consider a context asany information that can be used to characterize thesituation of interactions among web services, includ-ing state of interaction environment, state of entitiesin interaction environment such as user state and webservice state.

Context types also differ form situation to situation.For example, Keidl et al. [1], presented several contexttypes including the consumer’s location, client’s de-vices, information about the consumer invoking theweb service, e.g., name and email address, connectionpreferences, which allows to specify properties of theconnections to Web services. In [29], three categoriesof context are distinguished: physical (location, time,etc), computing (terminal form-factor, battery life,available bandwidth, accessible computing facilities,etc) and user context (current activity, schedule, intent,etc). In this paper, we use three kinds of contexts

to characterize the situation of service interactions,including interaction environment context (networkbandwidth, operating system, client’s devices, etc),user context (user preference, user location, etc) andservice context (business restriction, service availabil-ity, execution time, success rate, etc).

2.2 Web Service Behavior ModelingAt present, the main methods of modeling web ser-vice behaviors are Petri Net based method [30], [31],process algebra based method [32], [33] and finitestate machine based method [34]. These methods areformal and commonly used to describe and verifyweb service behaviors. For example, Petri Net basedbehavior modeling method focus on describing be-havior process inside web service and is fit to verifycorrectness of composite service behaviors. Processalgebra based behavior modeling method focus ondescribing behavior process outside web service andis fit to verify interaction correctness among webservices. Finite state machine based method describesservice behaviors from the view of state transitionand message passing. But it is difficult to describebehaviors of sophisticated process using finite statemachine.

In this paper, we use Context-aware Process Net-work (CAPN) to model dynamic behaviors of inter-acting context-aware web services. We think CAPNis more fit for modeling interacting context-awareweb services in several aspects, including its paral-lelism and communication mechanism, compositionalproperty, executable property and context-awarenesssemantics.

2.3 Behavior Adaptation of Context-aware WebServicesAdaptation is the capability to provide different ver-sions of a service or different presentations of a doc-ument, in order to suite the needs of the user, ofthe environment, of the equipment, etc [35]. In thispaper, we consider behavior adaptation of a context-aware web service as its capability to provide differentversions of customized and personalized behaviorsfor meeting the needs of context changes.

Chaari et al. [36] categorized context adaptationinto three categories, which are services adaptation,content adaptation and UI adaptation. Here, servicesrefer to the services of the application, content is theexchanged data with the user and UI is the visual-ization. They developed a platform which makes theservices, data and the user interface of applicationsadaptable to different context situations.

Jacob et al. [25] defined the notion of context func-tions which is a statement about the relative influenceof a context parameter on the behavior of the respec-tive service. Context functions can be a mathematicalfunction or a regular expression and can be easily

Page 3: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 3

adapted to directly affect the context-aware servicebehavior.

Zhou et al. [26] proposed the concept of Context-Aware Pervasive Service Composition (CAPSC) anddesign a CAPSC architecture by taking into accountcontext-aware peer coordination, context-aware pro-cess service adaptation, and context-aware utility ser-vice adaptation.

Hervas et al. [27] exploited semantics to apply con-text in run-time adaptation. They implement mecha-nisms to support the dynamic behavior of the usersand their surroundings, including techniques to adaptcontext model to their future needs, to maintain thecontext information at run-time and to be interopera-ble with external context models.

To summarize, different behavior adaptation ap-proaches tackle the problem of behavior adaptationin different manners. In this paper, based on CAPNmodel, we present our own context processing andbehavior adaptation approaches. Similar to servicesadaptation in [36], we also provide different behaviorversions for a context-aware web service, but we pro-vide a register link based behavior adaptation strat-egy and a more detailed version selection approach.We adopt context influence functions to denote theinfluence of contexts on web service. The influencefunction in this work is similar to context function in[25], but their context function is not used for behaviorversion selection of context-aware web service. Alsoour behavior adaptation strategy is different from [25],since we provide a unified and formatted influencefunction for every context in order to calculate therank of a behavior version, but [25] does not. UsingCAPN to model context-aware web service interac-tion, we can present an explicit formal semantic forinteracting context-aware web service that facilitatesthe development of context-aware application of webservices.

3 CONTEXT-AWARE WEB SERVICE NET-WORK: A SERVICE INTERACTION MODEL

Service interaction describes how services can com-municate with each other at the message level. In thissection, we describe an interaction model of context-aware web services. We name this interaction modelas a context-aware web service network. Its designidea comes from a dataflow and channel based modelof cooperative computation, i.e. Context-aware Pro-cess Network [20], [21]. Next, we briefly introduce themodel of context-aware process network.

3.1 Context-aware Process Network

Kahn Process Network (KPN) [20] is a model ofcomputation based on dataflow and has been widelyused in many areas [37], [38], [39]. A strong aspectof KPNs is that they make (task-level) parallelism

and communication in an application explicit, whichmeans that they are very suitable for execution on dis-tributed architectures. In KPN, nodes represent com-putations (concurrent processes) and arcs representtotally ordered sequences of data (commonly calledtokens). Concurrent processes communicate with eachother using FIFO channels which are unidirection-al unbounded queues of data tokens between twoprocesses. Read actions from these FIFOs block untilat least one data item (or token) becomes available.The FIFOs have unbounded size, so writing actionsare non-blocking. Reading actions from the FIFOs aredestructive, which means that a token can only beread once. KPN are determinate, i.e. given an input,the output result of its computation is independent ofexecution order. This allows us to execute the networkin parallel, as well as sequentially. KPNs implementasynchronous communication but synchronous coor-dination. Geilen and Basten [40] presented an opera-tional semantics for Kahn Process Network.

In order to facilitate asynchronous coordination,H. van Dijk et al. [21] extended the Kahn modelof computations to Context-aware Process Network(CAPN) with a simple indeterminate construct, i.e. aunidirectional non-blocking register link (REG), whichhas destructive and replicative behavior. They definedthe behavior of a REG link as follows. Writing toa full register overwrites a previously written value.Reading from a register returns the last received val-ue; a value can be returned multiple times. Becausethe context information in REG as control informationmay decide the output of a process, i.e. given aninput, the output result of its computation changesas contexts change, so CAPN is indeterminate.

3.2 Context-aware Web Service NetworkSeveral advantages of CAPN make it adequate tomodel service interactions:

1) parallelism and communication mechanism inCAPNs, which enable distributed service inter-action on internet;

2) CAPNs are compositional, which corresponds tothe possibility to build bigger behaviors fromsmall ones;

3) CAPN can be executed, which ensures a exe-cutable service interaction environment for ac-tual application;

4) context-awareness semantics in CAPNs accordsto context-awareness semantics of web services.

So, we use CAPN to model interaction of context-aware web services.

Figure 1 shows the interaction model of context-aware web services, i.e. context-aware web servicenetwork. A web service is modeled as a computingprocess of CAPN. Web services communicate witheach other using FIFO channels. The main modelingelements of Context-aware Web Service Network are

Page 4: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 4

Fig. 1. Context-aware Web Service Network.

service, sensor, input port (denoted as small whitecircle), output port (denoted as small grey circle),FIFO buffered channels, register link and trace. Inthis model, in order to simplify the process of contextcapturing, we add a sensor element which is a kindof additional CAPN processes and only used to getcontexts from environment and send them to webservices. The normal CAPN process, i.e. computingprocess is used to deal with application data amongweb services.

3.2.1 Modeling Web Service and Sensor ServiceIn this model, we model a web service as a computingprocess of CAPN. A web service is described as aservice interface which has a set of service opera-tions. A service operation consists of a number ofinput and output ports through which the input andoutput parameters of service operations are passed.We model a sensor service as an additional process.For convenience, a sensor service is defined as a kindof specific web services, similar to a web service inits interface, operation, input and output ports, butdifferent from a web service in its behavior. A sensorservice can only link to register links and can’t linkto FIFO channels, while a web service hasn’t thislimitation.

3.2.2 Modeling Behaviors of FIFO Buffered ChannelsA web service communicates with others using FIFObuffered channels which are unbounded queues ofdata tokens between two services. For each channelthere is a single service that produces messages anda single service that consumes messages. Multipleproducers or multiple consumers connected to thesame channel are not allowed. Data is consumed fromthese queues in a first-in first-out order. Each serviceport is linked to at most one other port through aunidirectional unbounded FIFO queue. Services areallowed to read from an input port and are allowed to

Fig. 2. Register link between a web service and asensor service.

write to an output port. The read operation is blockingand the write operation is non-blocking. When tokensare available on every input, the service will execute.

3.2.3 Modeling Behaviors of Register LinksIn this model, register link is also an unidirectionalnon-blocking channel. But the behavior semantic ofa register link and a FIFO buffered channel is verydifferent. In [21], the behavior of a register link isdefined as follows.

• Writing to a full register link overwrites a previ-ously written value;

• Reading from a register link returns the last re-ceived value;

• A value can be returned multiple times.In this paper, we only care about the context’s

influence on web service’s behaviors. Register link isused to carry context information between two webservices or between a web service and a sensor ser-vice. We don’t consider the circumstance that registerlink is between two sensor services.

The circumstance of register link between a webservice and a sensor service is depicted in Figure 2.

In this circumstance, context information, which iscaptured by sensor, including network bandwidth,user preference and so on, will be sent to a web servicefor use. When the web service is to execute, the eventof reading from its input register link Rl1 will betriggered, to make sure that the latest contexts areread and used by the web service. After execution,the web service may write other context informationto its output register link Rl2.

As to the circumstance of register link between twoweb services, we consider the following case, depictedin Figure 3.

In this case, S1 and S2 are two interacting webservices. S1 interacts with S2 through FIFO bufferedchannel C1 and a register link Rl1. The execution ofS1 will trigger a writing event to C1. When a readingevent from C1 finishes, S2 will execute. Also, theexecution of S2 will trigger a writing event to Rl1, tonotify S1 whether the interaction is successful or not.So, the context information in Rl1 denotes feedbackinformation from S2. From this feedback information,

Page 5: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 5

Fig. 3. Register link between two web services.

S1 will decide whether to adjust its control strategyand reply or not.

3.2.4 Service Interaction EventsIn this model, there are five service interaction events,which are reading from a FIFO buffered channel, writ-ing to a FIFO buffered channel, reading from a registerlink, writing to a register link and executing a webservice. We named these five events as readchannel(),writechannel(), readreg(), writereg() and execute().For an interacting web service, its behavior trace iscomposed of four reading/writing events (execute()is a internal event), the event order lies in the com-putation logic. A single trace denotes the executionof a single web service and a composite trace of allservices represents the unrolled execution of context-aware web service network.

4 BEHAVIOR SEMANTICS OF CONTEXT-AWARE WEB SERVICE NETWORK

In this Section, based on the works in [40], we describebehavior semantics of context-aware web service net-work using CCS process algebra [41], [42]. We addcontext-awareness, behavior compatibility and someother properties to basic semantics of KPN.

Let C be the set of FIFO channels and for eachchannel c ∈ C, with a channel alphabet Σc. Let Rbe the set of register links, and for every register linkr ∈ R , with a alphabet Λr.

Definition 1: [Context-aware Web Service]A context-aware web service is a labelled transitionsystemLTS = (S; s0; IC ;OC ; IR;OR;Op;Pt;Ctxp;Act;→),where

• S is the set of service states;• s0 ∈ S is the initial service state;• IC ⊆ C is the set of input channels;• OC ⊆ C is the set of output channels;• IR ⊆ R is the set of input register links;• OR ⊆ R is the set of output register links;• Op is the set of service operations;• Pt is the set of service ports provided by service

operations;• Ctxp is the context processor which is a software

module used to process contexts inside the webservice;

• Act represents the set of actions, Act ={c?a, c!a|c ∈ IC ∪ OC , a ∈ Σc} ∪ {r?b, r!b|r ∈IR∪OR, b ∈ Λr}∪{τ}, where c?a represents a readaction from channel c and c!a represents a writeaction to channel c with token a, r?b represents aread action from register link r and r!b representsa write action to register link r with token b, {τ}is the internal or silent action (all other actions);→⊆ S × Act × S is a labelled transition system,we write s1

α−→ s2 if (S1;α; s2) ∈→.Definition 2: [Context-aware Web Service Network]

A context-aware web service network is a tu-ple (P ;NC ;NR; IC ;OC ; IR;OR;Act; {LTSp|p ∈ P}),where

• P is the set of web services;• NC ∈ C is the set of internal channels (between

two services);• NR ∈ R is the set of internal register links

(between two services);• IC ∈ C is the set of input channels;• OC ∈ C is the set of output channels;• IR ∈ R is the set of input register links;• OR ∈ R is the set of output register links;• Act represents the set of actions,Act = {c?a, c!a|c ∈ IC ∪ OC ∪ NC , a ∈ Σc} ∪{r?b, r!b|r ∈ IR ∪ OR ∪ NR, b ∈ Λr} ∪ {τ}, wherec?a, c!a, r?b, r!b, {τ} have the same meaning asthat in Definition 1.

• LTSp = (Sp; sp0 ; ICp ;OCp ; IRp ;ORp ;Opp;Ptp;Ctxpp;Actp;→) denotes the labelled transition sysstemof p ∈ P .

Definition 3: [Configuration] A configuration of acontext-aware web service network is a 3-tuple(ψ, η, ζ), where:

• ψ : P → S = ∪p∈PSp is a service state functionthat maps every service p ∈ P to a local states ∈ Sp , here Sp is the state set of service p;

• η : C → Σ∗ is a channel state function that mapsevery channel c ∈ C to a finite string η(c) on Σc,here Σc is the corresponding channel alphabet ofc, Σ denotes the union of all channel alphabet, Σ∗

denotes the set of all finite (and infinite) stringsover Σ;

• ζ : R → Λ∗ is a register link state function thatmaps every register link r ∈ R to a finite stringψ(r) on Λr, here Λr is the corresponding registerlink alphabet of r, Λ denotes the union of allregister link alphabet, Λ∗ denotes the set of allfinite (and infinite) strings over Λ.

In a context-aware web service network, there existsan initial configuration (ψ0, η0, ζ0), here ψ0 maps everyservice p ∈ P to its initial state sp0 , η0 maps everychannel c ∈ C to an empty string and ζ0 maps everyregister link r ∈ R to an empty string.

Definition 4: [Behavior Semantics of Channel andRegister Link] The reading and writing semantics ofFIFO channel and register link are defined as follows:

Page 6: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 6

1) A service reads from a channel:

ψ(p)c?a−→ s, η(c) = aσ, c ∈ C

(ψ, η)c?a−→ (ψ[s/p], η[σ/c])

; (1)

2) A service writes to a channel:

ψ(p)c!a−→ s, η(c) = σ, c ∈ C

(ψ, η)c!a−→ (ψ[s/p], η[aσ/c])

, (2)

Here σ ∈ Σ∗ and ψ[s/p] is the function with thesame domain as ψ except that ψ(p) = s. η[σ/c])is the function with the same domain as η exceptthat η(c) = σ;

3) A service reads from a register link:

ψ(p)r?b−→ s, ζ(r) = bρ, r ∈ R

(ψ, ζ)r?R−→ (ψ[s/p], ζ[bρ/r])

, (3)

Here, we assume b is the last received value inregister link r. If b hasn’t been rewritten by awriting event, it is still in register link for furtherreading. And, ρ ∈ Λ∗, ψ[s/p] is the function withthe same domain as ψ except that ψ(p) = s,ζ[ρ/r] is the function with the same domain asζ except that ζ(r) = ρ;

4) A service writes to a register link:

ψ(p)r!b−→ s, ζ(r) = ρ, r ∈ R

(ψ, ζ)r!R−→ (ψ[s/p], ζ[bρ/r])

, (4)

Here, we assume register link r isn’t full. Whenr is full, let b0 is the last token in register link r,the above expression will be:

ψ(p)r!b−→ s, ζ(r) = ρb0, r ∈ R

(ψ, ζ)r!R−→ (ψ[s/p], ζ[bρ/r])

, (5)

That is, after b is written to the full register linkr, the last token b0 in register link r has beenrewritten.

Definition 5: [Execution of Context-aware Web Ser-vice Network] A labelled transition system LTS is de-fined as a tuple (Z; z0;NC ;NR; IC ;OC ; IR;OR;Act;→), where:

• Z is the set of all configurations;• z0 ∈ Z is the initial configuration;• NC ⊆ C is the set of internal channels (between

two services);• NR ⊆ R is the set of internal register links

(between two services);• IC ⊆ C is the set of input channels;• OC ⊆ C is the set of output channels;• IR ⊆ R is the set of input register links;• OR ⊆ R is the set of output register links;• Act represents the set of actions, the meaning is

the same as that in Definition 2;• →⊆ Z × Act× Z is a labelled transition relation,

we write z1α−→ z2 if (z1;α; z2) ∈−→.

An execution of a context-aware web service net-work is a sequence k = z0

α0−→ z1α1−→ z2

α2−→· · · zi

αi−→ · · · of configurations, zi ∈ Z and actionαiAct, such that zi

αi−→ zi+1 for all i ≥ 0. Everyexecution step zi

αi−→ zi+1 denotes a synchronizationpoint of interacting web services in a context-awareweb service network.

Definition 6: [Behavior Trace and Composite Behav-ior Trace] In an execution of a context-aware webservice network, as described in Definition 5, wedefine a behavior trace of an interacting context-awareweb service p as a finite action sequence λp =αp1αp2 · · ·αpi · · ·αpn, where αpi ∈ Act, Act representsthe set of reading or writing actions, the meaningis the same as that in Definition 2, 1 ≤ i ≤ n,n ∈ N , N is the set of positive integers. We definethe finite sequence λ = α0α1 · · ·αi · · · in executionk = z0

α0−→ z1α1−→ z2

α2−→ · · · ziαi−→ · · · as a composite

behavior trace of this network. Composite behavior tracerepresents the unrolled execution of this network. Weuse trace(p) to denote behavior trace of an interactingcontext-aware web service p.

Behavior traces can be used to analyse and verifythe behaviors of interacting web services. Behaviortraces as behavior description of a web servcie canserve as inputs to related verification tools (e.g., CWB-NC [42]), where the service behavior represented inthe description can be analysed and verified.

In a context-aware web service network, we con-sider contexts in register links as a kind of con-trolling information to adjust internal control flowof a web service, not as the parameters of a webservice. Only when a web service is to execute, itreads contexts from register links. So if we don’tconsider the influence of contexts, this network be-comes corresponding KPN. Next we define behaviorcompatibility of two interacting web services, we onlyconsider writing/reading actions on internal FIFOchannels between this two interacting web services.

Let Q is the set of web services, q0 ∈ Q, qi ∈ Q,where 1 ≤ i ≤ n, n ∈ N , N is set of positive integers.

Definition 7: [Weak Transitions] Let q ∈ Q, q′ ∈ Q,τ is transition label for action which is not externallyvisible, if

• q ⇒ε q′ iff q = q0 =→τ q1 →τ · · · →τ qi →τ

· · · →τ qn = q′, n ≥ 0;• q ⇒τ q′ iff q ⇒ε q′;• q ⇒α q′ iff q ⇒ε q1 →α q2 ⇒ε q′ (α = τ)

then, q ⇒α q′ is a weak transition.Definition 8: [Observational Equivalence] Let S ⊆

Q×Q, the relation S is a weak bisimulation relationif whenever q1Sq2 then:

• if q1 →α q′1, for some q′2, implies q2 ⇒α q′2, andq′1Sq

′2;

• if q2 ⇒α q′2, for some q′1 implies q1 ⇒α q′1,and q′1Sq

′2; then, q1 and q2 is observationally

equivalent, or weakly bisimulation equivalent,

Page 7: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 7

that is, for an external observer, it is not possibleto distinguish the behavior of q1 and q2.

Definition 9: [Behavior Compatibility] Two interact-ing web services p and q are behavior compatible,denoted as compatible(p, q), if they have opposite be-havior trace (only including reading/writing actionson FIFO channels between this two web services), i.e.,p is Observationally Equivalent to q.

For example, let ‘!’ denotes writing action,writingP (p) denotes the writing token sequence ofservice p, readingQ(q) denotes the reading tokensequence of service q. Let trace(p) =!Req.Receive.nil,trace(q) = Req.!Receive.nil, it’s clear that,writingP (p) = readingQ(q) andwritingQ(q) =readingP (p) when p and q execute a reading/writingaction respectively, that is p

!Req−−−→ p′, qReq−−→ q′,

then, p′ = Receive.nil, q′ =!Receive.nil.It’s clear writingP (p′) = readingQ(q′) andwritingQ(q′) = readingP (p′) when p′ and q′

execute a reading/writing action respectively, that isp′

Receive−−−−−→ nil, q′ !Receive−−−−−→ nil, p′ and q′ will be nil.It’s clear that, behaviors of p and q is opposite. Sothey are behavior compatible.

When a context-aware web service network is ex-ecuting, deadlock may be occurred. In [43], Parksdistinguishes between two types of deadlocks. ‘True’deadlocks are those described in Kahn’s model, thatis all processes are blocked on reads and all chan-nels are empty, then the computation has terminated.‘Artificial’ deadlocks are caused by bounded channelcapacities. Since channel capacities are not restrictedin Kahn’s model, artificial deadlock is impossible.

In a context-aware web service network, a deadlockcan only be ‘True’ deadlock. Since both FIFO BufferedChannels and Register Link have unbounded size.

Theorem 1: [Undecidable] The problem of whethera context-aware web service network will terminateis undecidable.

Proof: Kahn Process Network can be thought ofas a set of Turing machines connected by one-waytapes. It is impossible to decide whether or not anarbitrary Turing machine program will halt [43], [44].So it is undecidable if a Kahn Process Network willterminate. This implies the fact that it is undecidablewhether or not a context-aware web service networkwill terminate.

Let I = IC ∪ IR, O = OC ∪ OR, in an execu-tion k of this network, we define an input functionin : I → Σ∗ ∪ Λ∗ that maps every input channel toa finite (and infinite) strings on Σ∗ and every inputregister link to a finite (and infinite) strings on Λ∗. Wedefine a function out : O → Σ∗ ∪ Λ∗ that maps everyoutput channel to a finite (and infinite) strings on Σ∗

and every output register link to a finite (and infinite)strings on Λ∗. For some c ∈ I , we use k?c to denotethe input consumed on c and k?I to denote the inputconsumed by the network in execution k. For some

o ∈ O, we use k!o to denote the output on o and k!Odenotes the output of the network in execution k.

Definition 10: [Completeness] An execution k of acontext-aware web service network with an input in :I → Σ∗ ∪ Λ∗ is complete, denoted as complete(k), iff,the execution of corresponding KPN is complete [43],i.e.

• ∀p ∈ P , P is the set of web services, ∃n ∈ N ,N is the set of positive integers, such that 0 ≤|trace(p)| ≤ n.

• ∀o ∈ O, (k!o)/R = out(o)/R, (k!o)/R denotes theoutput of the context-aware web service networkin execution (taking out those outputs producedby actions involving register links set).

That is in the execution k of corresponding KPN,every behavior trace of web service has a finite num-ber of actions, and none of the output can be extendedagain.

Definition 11: [Effectiveness] Here, we add the sup-port of register links to the definition of Maximalityand Effectiveness of an execution of KPN in [40] anddefine Effectiveness of an execution of a context-awareweb service network. An execution k of a context-aware web service network with an input in : I →Σ∗ ∪ Λ∗ is effective, denoted as effective(k), iff,

• at the last configuration, only read actions arepossible, and all inputs of input in : I → Σ∗ ∪Λ∗

have been consumed entirely (Maximality in [40],here, we consider not only FIFO channels but alsoregister links), i.e. if n ∈ N is the length of theexecution zn

α−→, then α = c?a and k?c = in(c)for some c ∈ IC ∪ IR and a ∈ Σc ∪ Λr.

• every token produced in internal channels andinternal register links is ultimately consumed (Ef-fectiveness in [40], here, we consider not onlyFIFO channels but also register links), i.e. k?NC =k!NC and k?NR = k!NR, where NC is the set ofinternal channels and NR is the set of internalregister links.

Theorem 2: [Comp2] In an execution k of a context-aware web service network, if effective(k), thencomplete(k) and compatible(p, q), for some p, q ∈ P ,P is the set of web services in this network.

Proof:1) We first prove complete(k) can satisfy.

An execution k of a context-aware web servicenetwork is effective states that two conditionsin Definition 11 are satisfied. The first conditionof Definition 11 implies that at the last config-uration, execution k finishes and only a newexecution with a new input can execute, thatis, ∀p ∈ P , we assume k = z0

α0−→ z1α1−→

· · · zi · · ·αi−→ zj , then trace(p) = α1α2 · · ·αj , there

must ∃n ∈ N , j ≤ n, |trace(p)| = j. This satisfiesthe first condition of completeness definition inDefinition 10. Also, at the last configuration, thefact that execution k finishes implies that none

Page 8: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 8

of the output can be extended again, that is∀o ∈ O, (k!o)/R = out(o)/R. This satisfies thesecond condition of completeness definition inDefinition 10.

2) We prove compatible(p, q) can satisfy. ∀p, q ∈ P ,p and q is two interacting web services, lettrace(p) = α1α2 · · ·αj , trace(q) = β1β2 · · ·βj .According to behavior compatibility in Defini-tion 9, we only need to consider writing/readingactions on internal channels between this twoservices. For an internal channel, writing actionprecedes its opposite reading action. The sec-ond condition of Definition 11 implies that, ifα1 = c!a is a writing action in trace(p), theremust exist βi in trace(q) is the opposite readingaction of α1. Because a channel is a FIFO queue,the token a in channel c must be read firstin trace(q). So βi must be the first action intrace(q), that is βi = β1. For the same reason,β2 is the opposite action of α2, βi is the oppositeaction of αi, and so on, finally p and q producethe opposite behavior trace. This satisfies thebehavior compatibility in Definition 9, that iscompatible(p, q) is satisfied.

5 BEHAVIOR ADAPTATION OF WEB SER-VICES

Context-awareness allows a web service to adapt tochanges of their contexts. In order to realize this goal,we define a context processor for every context-awareweb service. A context processor is a software moduleused to collect and process every context input toa context-aware web service. According to the basicsemantic of a context-aware web service network,when tokens are available on every input, the webservice will execute. Now, we consider the influenceof contexts on this web service. When a web serviceis to be executed, the execute() event will trigger itscontext processor to work in advance, as depicted inFigure 4.

The context processor reads from each register linkin terms of its reading semantic, and puts them into acontext file. Then, the context processor is responsiblefor managing and updating this file. A web servicemay contain lots of context types and their values.Also different web service contains different contexts.So we model context information as a XML formattedfile which provides a unified description format fordifferent contexts. The platform independent featureof XML can easily tackle the heterogeneity of differentcontexts. A web service uses such context informationto adjust its internal control flow as well as contentand format of its replies.

The context file of a web service is composed ofelements of context type. A context type contains acontext value and a context weight. The basic format

Fig. 4. Context processor of a web service.

TABLE 1A context file of a web service.

<ContextFile xmlns=”http://ticket.com/context”><ServiceIdentifier>TicketBooking</ServiceIdentifier><ContextType ID=http://ticket.com/context:UserPreference><Context name=”AircraftType”>Boeing737</Context><Weight>0.6</Weight>

</ContextType><ContextType ID=http://ticket.com/context:ServiceAvailability><Context name=”ServiceAvailability”>0.93</Context><Weight>0.2</Weight>

</ContextType><ContextType ID=http://ticket.com/context:NetworkBandwidth><Context name=”NetworkBandwidth”>4M</Context><Weight>0.2</Weight>

</ContextType></ContextFile>

of a context file is listed in Table 1. Table 1 containsthree context types which are User Preference, ServiceAvailability and Network Bandwidth.

During the execution of a web service, it respondsto each context in context file. The basic contextprocessing process is as follows.

1) Parse context file using XML parser,2) For each context in context file,3) Calculate weight or influence on this web ser-

vice,4) Adjust internal control flow and reply of this

web service according to all contexts.We use three kinds of contexts to characterize the

situation of service interactions, including interactionenvironment context (network bandwidth, operatingsystem, client’s devices, etc), user context (user prefer-ence, user location, etc) and service context (businessrestriction, service availability, execution time, successrate, etc). In actual application, we can obtain thesecontext values with various approaches. For exam-ple, network bandwidth cab be got through related

Page 9: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 9

network bandwidth monitoring software, service ex-ecution time can be obtained through web log, userpreference can be expressed by user when interact-ing with web service and service availability can beachieved by calculating the average available time ofa web service in the past period of time, etc.

Then how to calculate the influence of contexts ona web service? we know that a context-aware webservice has to accommodate for a variety of contexttypes. So we need to calculate influences on a webservice in different manner according to the charac-teristics of each context type. For example, networkbandwidth may influence the execution of a webservice, in case of a narrow bandwidth the web servicemay terminate, in case of a normal bandwidth the webservice can output the expected result. User preferencecontext may influence the output of web service, andwe can use this context to filter the output of the webservice, thus getting a new output meeting the userpreference. In addition, the value type of each contextis also different, some is integer, some is string, etc,so we need to convert them to a uniform format forconvenience of calculations.

We define an influence function f(C) for everycontext type, denoting the influence of context C on aweb service, whose value type is numeric and rangesfrom 0 and 100 or others according to the actualapplication. We also assign a weight w whose valueis ranging from 0 and 1 for each context C, denotingthe influence degree of this context type.

As discussed above, for a context-aware web ser-vice, behavior adaptation is its capability to providedifferent versions of behaviors to meet the needs ofcontext changes. We define different behavior versionsfor a context-aware web service according to theinfluences of different context types and their values.In this paper, we assume the influence function andweight is the same in different behavior versions for acertain context type. So we only need to differentiatecontext types and their values in different behaviorversions. We use a XML formatted file to describedifferent behavior versions of a context-aware webservice. The following is an example.<behaviorVersion1><UserPreference AircraftType=”Boeing737”/><ServiceAvailability>0.9</ServiceAvailability><NetworkBandwidth>4M</NetworkBandwidth>

</behaviorVersion1><behaviorVersion2><UserPreference AircraftType=”Boeing747”/><ServiceAvailability>0.8</ServiceAvailability><NetworkBandwidth>2M</NetworkBandwidth>

</behaviorVersion2>......

Assuming a web service has n behavior versionsdenoted as s1, s2, ......, sn, then we use the followingformula to calculate the predefined rank for eachversion (one version with a unique predefined rank).

Rank =n∑

i=1

fi(Ci) ∗ wi

where fi(Ci) is the influence function of context Ci,wi is the weight of context Ci, 1 ≤ i ≤ n , n is a

positive integer. When the current context values ofa web service are obtained, we can calculate the rankof current context situation using the formula above.From the predefined behavior versions, we can selectan appropriate one whose predefined rank is equal orclosest to the calculated one.

In an actual application, we can adjust internalcontrol of a web service by adjusting its behavior ver-sions. If there exists a large discrepancy between therank of current context situation and all predefinedranks, we need to adjust the behavior versions of thisweb service statically or dynamically to make surean appropriate behavior version can be selected. Forexample, we may add a new behavior version whenone or more new context types are added. We mayremove a behavior version when related context typesare not useful. We may also modify a behavior versionby modifying related context types and their valuesor modifying related context influence functions andtheir weights. We may define a context influencefunction and specify its weight for a context withexperiential values at the very beginning, and thenadjust them dynamically and iteratively according tothe reply of web service.

6 A XML FORMATTED SERVICE BEHAVIORDESCRIPTION LANGUAGE

Based on the basic semantics of context-aware webservice network, we design a XML formatted ser-vice behavior description language named BML4WS(Behavior Modeling Language for Web Service) todescribe behaviors and behavior adaptation of inter-acting context-aware web services. Because contexts inregister links aren’t the parameters of a web serviceonly as a kind of controlling information to adjustinternal control flow of a web service, if we don’t con-sider the influence of contexts, this network becomescorresponding KPN. According to KPN semantics, wecan execute the KPN network in parallel, as well assequentially. So we consider web services in context-aware web service network as sequential processes inBML4WS.

6.1 Structure of BML4WSThe basic structure of this description language is asfollows:<bml:process><bml:service name=”service name” ><!–describing service operations –><bml:operation name=”operation name”><!–describing input ports of service operation –><bml:input>

<bml:port name=”port name” type=”typename”/>

· · · · · ·</bml:input><!–describing output ports of service operation –><bml:output>

<bml:port name=”port name” type=”type

Page 10: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 10

name”/>· · · · · ·

</bml:output>· · · · · ·

</bml:operation></bml:service>

<bml:service name=”service name” >· · · · · ·</bml:service>· · · · · ·<!– defining channels –><bml:channel>channel name</bml:channel>· · · · · ·

<!– defining register links –><bml:reg>register link name</bml:reg>· · · · · ·

<!–describing behavior interaction –><bml:composition><!–describing sequence interactions –><bml:sequence><!–reading from a channel –>

<bml:readchannel channel=”channel name”service=”service name” operation=”operation name”port=”port name”/>

· · · · · ·<!–executing a service operation –><!–At this moment, context processor of this web service

will read from each register link and form context file, thencontext file will be processed by this web service –>

<bml:readreg reg=”register name” service=”servicename” operation=”operation name” port=”port name”/>

· · · · · ·<bml:execute operation=”operation name”

service=”service name”/><!–writing to a channel –>

<bml:writechannel channel=”channel name”service=”service name” operation=”operation name”port=”port name”/>

· · · · · ·<!–writing to a register link –><bml:writereg reg=”register name” service=”service

name” operation=”operation name” port=”port name”/>· · · · · ·</bml:sequence>· · · · · ·<bml:loop>· · · · · ·</bml:loop>· · · · · ·</bml:composition>

<bml:process>

6.2 BML4WS InterpreterIn order to evaluate and validate the service behav-ior modelling approach presented in this paper. Wedesign a BML4WS interpreter to implement behaviorinteractions among web services. The architecture ofBML4WS interpreter is described in Fig. 5. BML4WSinterpreter is composed of three main components,which are BML4WS Document Parser, Scheduler forService Interaction Events and Service InteractionAPIs.

• BML4WS Document Parser is used to load andparser a BML4WS service behavior descriptionfile, the DOM (Document Object Model) tree ofBML4WS file is depicted in Fig. 6. The outputis composite behavior trace of the whole systemrepresented by this description file. Algorithm

1 shows the generation algorithm of compositebehavior trace.

• Scheduler for Service Interaction Events is usedto schedule and execute every service interactionevent in composite behavior trace. Algorithm 2shows the Scheduling algorithm of the compositebehavior trace.

• Service Interaction APIs is the Java implemen-tation of five service interaction events whichare readchannel(), writechannel(), readreg(),writereg() and execute().

Algorithm 1 BuildCompositeTrace(BML4WSFile)Inputs: BML4WSFile: a BML4WS service behaviordescription fileOutputs: actionList: a composite behavior trace ofthe system represented by BML4WSFile01 ArrayList<ActionType> actionList =01 new ArrayList();02 ActionType action=null;03 for all element in BML4WSFile do04 if(element.getName.equals(”composition”)) then05 for all subelement of element do06 action= buildAction(subelement);06 //add into actionList07 actionList.add(action);08 end for09 endif10 end for11 return actionList

BuildAction(element)Inputs: an element of BML4WS DocumentOutputs: action type: one of readchannel,

writechannel, readreg, writereg and execute12 elname=element.getName;13 if (elname.equals(”readchannel”)) then14 ReadChannel readChannel =14 new ReadChannel();15 return readChannel;16 elseif(elname.equals(”writechannel”)) then17 WriteChannel writeChannel =17 new WriteChannel();18 return writeChannel;19 elseif(elname.equals(”readreg”)) then20 ReadReg readReg = new ReadReg();21 return readReg;22 elseif(elname.equals(”writereg”)) then23 WriteReg writeReg = new WriteReg();24 return writeReg;25 elseif(elname.equals(”execute”)) then26 Execute execute = new Execute();27 return execute;28 endif

We implement five service interaction events us-ing Java RMI (Remote Method Invocation) and Javastream programming technologies.

Page 11: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 11

Algorithm 2 ScheduleInteractionEvents(actionList)Inputs: actionList: a composite behavior trace of thesystem represented by BML4WSFileOutputs: output of FIFO channels and register links01 for all event e in actionList do02 if(e.getName().equals(”readchannel”)) then03 invoking readchannel();04 elseif(e.getName().equals(”writechannel”)) then05 invoking writechannel();06 elseif(e.getName().equals(”readreg”)) then07 invoking readreg();08 elseif(e.getName().equals(”writereg”)) then09 invoking writereg();10 elseif(e.getName().equals(”execute”)) then11 invoking execute();12 endif13 end for

Fig. 5. Architecture of BML4WS interpreter.

Fig. 6. DOM Tree of BML4WS file.

7 CASE STUDY

7.1 A Context-aware Ticket Booking System

We design a Context-aware Ticket Booking system,which is composed of four interacting web services,i.e. Client service, Customer service, Order serviceand Inventory service. We use visual BML4WS Editorimplemented by ourselves to design the Context-aware Ticket Booking system, as shown in Fig. 7.

The basic business process of this Ticket Bookingsystem is as follows:

1) A Client service collects booking requests fromusers through channel ‘coll’ and form a FIFOqueue of request messages.

2) The Client service reads from channel ‘coll’ andsends a request message through channel ‘re-qu’ to Customer service for booking tickets. Arequest message represents a ticket booking re-quest which is a XML formatted file, describingthree booking parameters which are departurestation, destination station and date.

3) The Customer service receives a request messageand sends message through channel ‘ask’ toOrder service to ask creating order.

4) The Order service sends request to Inventoryservice through channel ‘quer’ for querying theticket stock.

5) The Inventory service retrieves and sends theticket stock result to Order service through chan-nel ‘resu’.

6) If the tickets have been sold out, the orderwill not be created, Order service will send arejection message to Customer service throughchannel ‘con’, and Customer service sends therejection message to Client service through chan-nel ‘repl’.

7) If the tickets is Available, the order and bookingresult will be created, Order service sends book-ing result (order information) to Client servicethrough channel ‘info’.

8) Return to 2) to deal with another ticket bookingrequest.

9) Return to 1) to deal with another queue ofbooking request messages.

In this application, if we don’t consider the influ-ence of context information on every service, the Or-der service will send user a XML file which includesall ticket booking results according to the bookingparameters.

Now, we consider the influence of contexts on thissystem. Many context information can be usable inthis Ticket Booking system, including User Preference,User Feedback, Service Availability, User Locationand Network Bandwidth, etc. Assuming that we onlyconcern about three types of context information,which are User Preference (user context, UP for short),Service Availability (service context ,SA for short) and

Page 12: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 12

Fig. 7. A Context-aware Ticket Booking System.

Network Bandwidth (interaction environment contex-t, NB for short). These three types of contexts willbe used by Inventory service when ticket stock areretrieved, as depicted in Figure 7.

In this case, User Preference context comes fromthe current user’s input, Service Availability contextis obtained by calculating the average available timeof this web service in the past period of time (second)and Network Bandwidth context comes from relatednetwork bandwidth monitoring software. User Pref-erence context will influence output result of the webservice, Network Bandwidth and Service Availabilitycontext will influence the execution efficiency of theweb service.

In order to unify and standardize different valuetype of contexts, for every context, we define aninfluence function f : C → N that maps a contextvalue x ∈ C on a score n , where, C is a set of contextvalues, n ∈ N , N is the set of values ranging from0 to 100. We define the following context influencefunction experientially for every context.

For User Preference context, fup = 100, for everyc ∈ C, C is the set {”Boeing737”, ”Boeing747”, ......}.

For Service Availability context, fsa = 100 ∗ c, 0 ≤c ≤ 1.

For Network Bandwidth context,

fnb =

100, c >= 480, 1 ≤ c < 460, 0 < c < 10, c = 0

.

We also need to specify a weight for every context.According to the importance degree of every context,we specify the experiential weights as 0.6, 0.2, 0.2for User Preference, Service Availability and NetworkBandwidth. In actual situation, we may dynamicallyadjust these influence functions and related weightsaccording to the reply of web service. Using the rankcalculation formula in section 5, we can calculate thepredefined ranks for some frequently used behaviorversions, for example, a rank of a main behaviorversion may be Rank = 100*0.6 + 0.2*90 + 0.2*80 =

94. In current situation, for User Preference context,the current user can decide the actual context valuethrough user interface provided by Client service.For example, the user may select an expected aircrafttype, such as Boeing737, by clicking a CheckBox itemthrough user interface provided by Client service. Thereal-time context value is passed to Inventory servicethrough register link UP. For Network Bandwidth andService Availability context, they are collected dynam-ically by context processor of Inventory service fromtheir own register link. Then, context value and itsweight are stored into a context file. Using all contextvalues and their weights, the rank of behavior versionunder current situation can be calculated. Accordingto the calculated rank, the context processor willselect a matched behavior version from the predefinedbehavior versions whose rank is equal or closest to thecalculated one to execute.

7.2 Describing Service Interaction Using BM-L4WSIn this section, we use BML4WS to describe behaviorsof interacting context-aware web services. The corre-sponding BML4WS file can be exported from visualBML4WS Editor. Here, we only describe interactionbetween Order service and Inventory service.<bml:process><!– Describing Order service and Inventory service–><bml:service name=”Order” ><bml:operation name=”ordResuOp”><bml:input><bml:port name=”is” type=”xml”/>

</bml:input><bml:output><bml:port name=”oc” type=”xml”/><bml:port name=”oi” type=”xml”/>

</bml:output></bml:operation>

</bml:service><bml:service name=”Inventory” ><bml:operation name=”invOp”><bml:input><bml:port name=”iq” type=”xml”/>

</bml:input><bml:output><bml:port name=”os” type=”xml”/>

</bml:output></bml:operation>

</bml:service><!– defining channels and register links –><bml:channel>quer</bml:channel><bml:channel>resu</bml:channel><bml:channel>info</bml:channel><bml:reg>SA</bml:reg><bml:reg>UP</bml:reg><bml:reg>NB</bml:reg><!– Describing interaction between Order service andInventory service –><bml:composition><bml:loop><bml:sequence><!–here, we omitted the description of writing to

channel quer –><!–reading from channel quer–>

Page 13: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 13

<bml:readchannel channel=”quer” ser-vice=”Inventory” operation=”invOp” port=”iq”/>

<!–next, service operation invOp will execute. At thismoment, context processor of this web service will read fromeach register link and form context file, then context file will beprocessed by this web service –>

<bml:readreg reg=”SA” service=”Inventory”operation=”invOp” port=”csa”/>

<bml:readreg channel=”UP” service=”Inventory”operation=”invOp” port=”cup”/>

<bml:readreg channel=”NB” service=”Inventory”operation=”invOp” port=”cnb”/>

<bml:execute operation=”invOp” ser-vice=”Inventory”/>

<bml:writechannel channel=”resu” ser-vice=”Inventory” operation=”invOp” port=”os”/>

<bml:readchannel channel=”resu” service=”Order”operation=”ordResuOp” port=”ic”/>

<!–executing a service operation ordResuOp –><bml:execute operation=”ordResuOp”

service=”Order”/><!–writing to channel info–><bml:writechannel channel=”info” service=”Order”

operation=”ordResuOp” port=”oi”/></bml:sequence>

</bml:loop></bml:composition>

</bml:process>

7.3 Execution and Analysis of Ticket BookingSystemWhen BML4WS document of the Ticket Booking sys-tem is exported, we can use BML4WS Interpreterto Interpret and execute it. We can also use relateddefinitions and theorems presented in section 4 toanalyze and verify the properties of this system. Forexample, we assume an effective execution of TicketBooking system with an input in = [x1, x2, x3], x1, x2and x3 denote three XML formatted ticket bookingrequests.

From the BML4WS description, we can extract com-posite behavior trace of the system using Algorithm 1.From composite behavior trace of the system, we canextract single behavior trace for every web service. Ifwe only process a booking request, the behavior tracesof Order service and Inventory service are as follows:trace(Order) = ask.!quer.resu.(!con+!info)trace(Inventory) = quer.SA.UP.NB.!resuFrom Theorem 2 we know that an effective ex-

ecution implies a complete execution and any twointeracting web services in this system are behaviorcompatible. In this complete execution of the TicketBooking system, three requests must be consumedentirely and every behavior trace has a finite numberof actions, as follows:trace(Order) = ask.!quer.resu.(!con+!info).ask

.!quer.resu.(!con+!info).ask.!quer.resu.(!con+!info)trace(Inventory) = quer.SA.UP.NB.!resu.quer.

SA.UP.NB.!resu.quer.SA.UP.NB.!resuNext, we verify whether or not two interacting

web services are behavior compatible. We only need

to consider writing/reading actions on internal FIFOchannels between this two interacting web services.So the trace of Order service and Inventory servicebecomes:trace(Order) =!quer.resu.!quer.resu.!quer.resutrace(Inventory) = quer.!resuquer.!resuquer.!resuIt is evident that trace(Order) and trace(Inventory)

have opposite behavior trace. So in the completeexecution of Ticket Booking system, Order service andInventory service are behavior compatible.

In fact, in an actual execution of this system, usingrelated definition it is easy for us to verify whether ornot this execution is effective or complete, whetheror not two interacting web services are behaviorcompatible.

8 CONCLUSIONS AND FUTURE WORKS

In this paper, a novel process network approach wasproposed to model dynamic behaviors of interactingcontext-aware web services, aiming to effectively pro-cess and take advantage of contexts and realize behav-ior adaptation of web services. We presented the in-teraction model of context-aware web services basedon a formal model, context-aware process network.The context-aware process network was extended tocontext-aware web service network by adding a kindof sensor processes which is used to catch contextualdata from external environment. Through modelingthe register link’s behaviors, we present how a webservice can respond to its context changes dynamical-ly. Its explicit formal behavior semantic was providedto implement context-awareness and behavior adap-tation of context-aware web service. We designed aXML formatted service behavior description languagenamed BML4WS to describe behaviors and behavioradaptation of interacting context-aware web services.Our model was demonstrated in a practical case, i.e.Ticket Booking system. The results illustrated that theproposed approach is available and flexible.

Our future work is to make an attempt to imple-ment context-aware web service network for moreweb service applications. As discussed above, context-aware web service network is based on CAPN andis adequate to model service interactions in severalaspects, including its parallelism and communicationmechanism, compositional property, executable prop-erty and context-awareness semantics. Other formalmodel, such as Petri Net and process algebra, lackthese advantages.

ACKNOWLEDGMENTS

This work is supported by the National NaturalScience Foundation of China (Grant No.60873054,60973013, 61073056, 61073134, 51179020), the Funda-mental Research Funds for the Central Universities(Grant No.2011JC006), and Dalian Science and Tech-nology Fund (Grant No.2010J21DW006).

Page 14: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 14

REFERENCES

[1] M. Keidl and A. Kemper, “Towards context-aware adaptableweb services,” in Proceedings of the 13th international World WideWeb. New York: ACM, May 2004, pp. 55–65.

[2] A. Abraham, J. Chung, and S. Han, “Web services: recentadvances and applications,” Journal of Digital Information Man-agement, vol. 4, no. 1, pp. 1–3, 2006.

[3] F. Gandon and N. Sadeh, “Semantic web technologies to rec-oncile privacy and context awareness,” Web Semantics: Science,Services and Agents on the World Wide Web, vol. 1, no. 3, pp.241–260, 2004.

[4] H. Truong and S. Dustdar, “A survey on context-aware webservice systems,” International Journal of Web Information Sys-tems, vol. 5, no. 1, pp. 5–31, 2009.

[5] L. Li, D. Liu, and A. Bouguettaya, “Semantic based aspect-oriented programming for context-aware web service com-position,” Information Systems, vol. 36, no. 3, pp. 551–564,2011, special Issue on WISE 2009 - Web Information SystemsEngineering.

[6] R. Hervas and J. Bravo, “Towards the ubiquitous visualization:Adaptive user-interfaces based on the semantic web,” Interact-ing with Computers, vol. 23, no. 1, pp. 40–56, 2011.

[7] R. Bhatti, E. Bertino, and A. Ghafoor, “A trust-based context-aware access control model for web-services,” Distributed andParallel Databases, vol. 18, no. 1, pp. 83–105, 2005.

[8] M. Mrissa, C. Ghedira, D. Benslimane, Z. Maamar, F. Rosen-berg, and S. Dustdar, “A context-based mediation approach tocompose semantic web services,” ACM Transactions on InternetTechnology, vol. 8, no. 1, pp. 4–es, 2007.

[9] J. Simoes and S. Wahle, “The future of services in next gen-eration networks,” IEEE Potentials, vol. 30, no. 1, pp. 24 –29,jan.-feb. 2011.

[10] Z. Chen, K. Ma, A. Abraham, B. Yang, and R. Sun, “Anexecutable business model for generic web applications,” inProceedings of International Conference on Computer InformationSystems and Industrial Management Applications. India: IEEE,2010, pp. 573–577.

[11] T. Tiropanis, H. Davis, D. Millard, and M. Weal, “SemanticTechnologies for Learning and Teaching in the Web 2.0 Era,”IEEE Intelligent Systems, vol. 24, no. 6, pp. 49–53, 2009.

[12] L. Zhang, “Services design and optimization,” IEEE Transac-tions on Services Computing, vol. 2, no. 2, p. 93, april-june 2009.

[13] M. Brambilla, S. Ceri, F. Facca, I. Celino, D. Cerizza, andE. Valle, “Model-driven design and development of semanticWeb service applications,” ACM Transactions on Internet Tech-nology, vol. 8, no. 1, pp. 3–32, 2007.

[14] I. Elgedawy, Z. Tari, and J. Thom, “Correctness-aware high-level functional matching approaches for semantic Web ser-vices,” ACM Transactions on the Web, vol. 2, no. 2, p. 12, 2008.

[15] K. Scott and R. Benlamri, “Context-aware services for smartlearning spaces,” IEEE Transactions on Learning Technologies,vol. 3, no. 3, pp. 214 –227, july-sept. 2010.

[16] S.-Y. Hwang, E.-P. Lim, C.-H. Lee, and C.-H. Chen, “Dynamicweb service selection for reliable web service composition,”IEEE Transactions on Services Computing, vol. 1, no. 2, pp. 104–116, april-june 2008.

[17] A. Segev and E. Toch, “Context-based matching and rankingof web services for composition,” IEEE Transactions on ServicesComputing, vol. 2, no. 3, pp. 210 – 222, july-sept. 2009.

[18] A. Staikopoulos, O. Cliffe, R. Popescu, J. Padget, and S. Clarke,“Template-based adaptation of semantic web services withmodel-driven engineering,” IEEE Transactions on Services Com-puting, vol. 3, no. 2, pp. 116 – 130, april-june 2010.

[19] D. Vieira, C. Melo, A. Bezerra, Y. Ghamri-Doudane, andN. da Fonseca, “Latincon01 - a content-oriented web cachepolicy under p2p video distribution systems,” Latin AmericaTransactions, IEEE (Revista IEEE America Latina), vol. 8, no. 4,pp. 349–357, aug. 2010.

[20] G. Kahn, “The semantics of a simple language for parallelprogramming,” in Information processing, J. L. Rosenfeld, Ed.Stockholm, Sweden: North Holland, Amsterdam, Aug 1974,pp. 471–475.

[21] H. van Dijk, H. Sips, and E. Deprettere, “Context-aware pro-cess networks,” in Proceedings of IEEE International Conferenceon Application-Specific Systems, Architectures, and Processors. H-ague: IEEE, 2003, pp. 6–16.

[22] D. Zhovtobryukh, “Context-aware Web Service Composition,”Ph.D. dissertation, University of Jyvaskyla, 2006.

[23] D. Kulkarni and A. Tripathi, “A framework for programmingrobust context-aware applications,” IEEE Transactions on Soft-ware Engineering, pp. 184–197, 2010.

[24] M. Sama, S. Elbaum, F. Raimondi, D. Rosenblum, and Z. Wang,“Context-aware adaptive applications: fault patterns and theirautomated identification,” IEEE Transactions on Software Engi-neering, pp. 644–661, 2010.

[25] C. Jacob and S. Steglich, “Modeling dynamic service behaviorusing context functions,” in Proceedings of the First InternationalConference on Networked Digital Technologies. Ostrava: IEEE,2009, pp. 88–93.

[26] J. Zhou, E. Gilman, J. Palola, J. Riekki, M. Ylianttila, andJ. Sun, “Context-aware pervasive service composition and itsimplementation,” Personal and Ubiquitous Computing, vol. 15,no. 3, pp. 291–303, 2011.

[27] R. Hervas and J. Bravo, “COIVA: context-aware and ontology-powered information visualization architecture,” Software:Practice and Experience, vol. 41, no. 4, pp. 403–426, 2011.

[28] A. T. Manes. (2001) Enabling open, interoperable, and smartweb services - the need for shared context. [Online]. Available:http://www.w3.org/2001/03/WSWS-popa/paper29

[29] A. K. Dey, “Understanding and Using Context,” Personal andUbiquitous Computing, vol. 5(1), pp. 4–7, 2001.

[30] X. Li, Y. Fan, Q. Z. Sheng, Z. Maamar, and H. Zhu, “Apetri net approach to analyzing behavioral compatibility andsimilarity of web services,” IEEE Transactions on Systems, Manand Cybernetics, Part A: Systems and Humans, vol. 41, no. 3, pp.510 –521, may 2011.

[31] C. Yan, C. Jiang, and Q. Li, “The Composition and Analysisof Web Service Based on Petri Net,” Computer Science, vol. 34,no. 2, pp. 100–103, 2007.

[32] J. Liao, H. Tan, and J. Liu, “Describing and verifying Webservice using Pi-calculus,” Chinese Journal of Computers, vol. 28,no. 4, pp. 635–642, 2005.

[33] X. Gu and Z. Lu, “A formal model for BPEL4WS description ofweb service composition,” Wuhan University Journal of NaturalSciences, vol. 11, no. 5, pp. 1311–1319, 2006.

[34] H. Foster, S. Uchitel, J. Magee, and J. Kramer, “LTSA-WS: a toolfor model-based verification of web service compositions andchoreography,” in Proceedings of the 28th International Conferenceon Software Engineering. Shanghai: ACM, May 2006, pp. 771–774.

[35] T. Chaari and A. Celentano, “Design of context-aware applica-tions based on web services,” INSA Lyon, France, Tech. Rep.RR-2004-033, Sep. 2004.

[36] F. L. T. Chaari and A. Celentano, “Adaptation in Context-Aware Pervasive Information Systems: The SECAS Project,”Pervasive Computing and Communications, pp. 400–425, 2007.

[37] Y. Dou, G. Wu, J. Xu, and X. Zhou, “A coarse-grained recon-figurable computing architecture with loop self-pipelining,”Science in China Series F: Information Sciences, vol. 52, no. 4, pp.575–587, 2009.

[38] D. Webb and A. Wendelborn, “The pagis grid applicationenvironment.” Melbourne: Springer, 2003, pp. 692–693.

[39] E. De Kock, W. Smits, P. van der Wolf, J. Brunel, W. Kruijtzer,P. Lieverse, K. Vissers, and G. Essink, “YAPI: Applicationmodeling for signal processing systems,” in Proceedings of the37th Annual Design Automation Conference. Los Angeles: ACM,2000, pp. 402–405.

[40] M. Geilen and T. Basten, “Requirements on the execution ofKahn process networks,” in Proceedings of the 12th Europeanconference on Programming. Warsaw: Springer, 2003, pp. 319–334.

[41] R. Milner, Communication and concurrency. Prentice Hall, USA,1989.

[42] R. Cleaveland, T. Li, and S. Sims, “The concurrency workbenchof the new century,” User’s manual, SUNY at Stony Brook, StonyBrooke, NY, USA, 2000.

[43] T. Parks, “Bounded scheduling of process networks,” Ph.D.dissertation, University of California, EECS Dept., Berkeley,CA, 1995.

[44] J. Buck and E. Lee, “Scheduling dynamic dataflow graphs withbounded memory using the token flow model,” in Proceedingsof International Conference on Acoustics, Speech, and Signal Pro-cessing. Minneapolis: IEEE, 1993, pp. 429–432.

Page 15: IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO ...IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 1 A Novel Process Network Model for Interacting Context-aware

IEEE TRANSACTIONS ON SERVICE COMPUTING, VOL. **, NO. **, NOVEMBER 2011 15

Xiuguo Zhang is an associate professor inthe School of Information Science and Tech-nology at Dalian Maritime University, Dalian,China. She received PhD degrees in Com-puter Science from Dalian Maritime Universi-ty. Her research interests are Web Service,Software Engineer, etc. She has authoredover 40+ refereed journal/conference papers.

Hongbo Liu is a professor in the Schoolof Information Science and Technology atDalian Maritime University, Dalian, China,with an affiliate appointment in the Com-puter Science and Biomedical EngineeringDivision at Dalian University of Technology.He received PhD degrees in Computer Sci-ence from Dalian University of Technology.His research interests are in system model-ing and optimization involving soft comput-ing, nature-inspired computing, swarm intel-

ligence, multi-agent systems, fuzzy inference systems, rough set,and probabilistic model. Application areas include neuroinformatics,cognitive computing, computational grids, web service, machinelearning, data mining, etc. He has authored over 60+ refereedjournal/conference papers and book chapters and some of the workshave also won best paper awards at international conferences andalso received several citations. Some of the articles are available inthe ScienceDirect Top 25 hottest articles. He was co-organised theChina-Japan Joint Conference on Computational Geometry, Graphsand Applications (CGGA2010) at Dalian in November 2010. He isalso the General Chair of the Third IEEE International Conferenceon Soft Computing and Pattern Recognition (SoCPaR’11) at Dalian,China in October 2011.

Ajith Abraham received the M.S. degreefrom Nanyang Technological University, Sin-gapore, and the Ph.D. degree in Comput-er Science from Monash University, Mel-bourne, Australia. He is currently the Direc-tor of Machine Intelligence Research Labs(MIR Labs), Scientific Network for Innovationand Research Excellence, USA, which hasmembers from more than 85 countries. Hehas a worldwide academic experience withformal appointments in Monash University;

Australia, Oklahoma State University, USA; Chung-Ang University,Seoul, Korea; Jinan University, Jinan, China; Rovira i Virgili Uni-versity, Tarragona, Spain; Dalian Maritime University, Dalian, China;Yonsei University, Seoul, Korea; the Open University of Catalonia,Barcelona, Spain; the National Institute of Applied Sciences (INSA-Lyon), Lyon, France; and the Norwegian University of Science andTechnology (NTNU), Trondheim, Norway. He serves/has served theeditorial board of over 50 International journals and has also guestedited 40 special issues on various topics. He has published morethan 800 publications, and some of the works have also won bestpaper awards at international conferences. His research and devel-opment experience includes more than 20 years in the industry andacademia. He works in a multi-discciplinary environment involvingmachine intelligence, network security, various aspects of networks,e-commerce, Web intelligence, Web services, computational grids,data mining, and their applications to various real-world problems.He has given more than 50 plenary lectures and conference tutorialsin these areas.

Dr. Abraham is the Chair of IEEE Systems Man and Cybernet-ics Society Technical Committee on Soft Computing and a Distin-guished Lecturer of IEEE Computer Society representing Europe.Dr. Abraham is a Senior Member of the IEEE, the IEEE ComputerSociety, the Institution of Engineering and Technology (UK) and theInstitution of Engineers Australia (Australia), etc. He is the founder ofseveral IEEE sponsored annual conferences, which are now annualevents - Hybrid Intelligent Systems (HIS - 11 years); IntelligentSystems Design and Applications (ISDA - 11 years); InformationAssurance and Security (IAS - 7 years); Next Generation WebServices Practices (NWeSP - 7 years), Computational Aspects ofSocial Networks (CASoN - 3 years), Soft Computing and PatternRecognition (SoCPaR - 3 years), Nature and Biologically InspiredComputing (NaBIC - 3 years) are some examples. More informationat: http://www.softcomputing.net