please note - -orcaorca.cf.ac.uk/130562/1/barati-paper.pdf · composing cloud services itc 1/49...

24
This is an Open Access document downloaded from ORCA, Cardiff University's institutional repository: http://orca.cf.ac.uk/130562/ This is the author’s version of a work that was submitted to / accepted for publication. Citation for final published version: Barati, Masoud 2020. A formal technique for composing cloud services. Information Technology And Control 49 (1) , pp. 5-27. 10.5755/j01.itc.49.1.23403 file Publishers page: http://dx.doi.org/10.5755/j01.itc.49.1.23403 <http://dx.doi.org/10.5755/j01.itc.49.1.23403> Please note: Changes made as a result of publishing processes such as copy-editing, formatting and page numbers may not be reflected in this version. For the definitive version of this publication, please refer to the published source. You are advised to consult the publisher’s version if you wish to cite this paper. This version is being made available in accordance with publisher policies. See http://orca.cf.ac.uk/policies.html for usage policies. Copyright and moral rights for publications made available in ORCA are retained by the copyright holders.

Upload: others

Post on 04-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

This is an Open Access document downloaded from ORCA, Cardiff University's institutional

repository: http://orca.cf.ac.uk/130562/

This is the author’s version of a work that was submitted to / accepted for publication.

Citation for final published version:

Barati, Masoud 2020. A formal technique for composing cloud services. Information Technology

And Control 49 (1) , pp. 5-27. 10.5755/j01.itc.49.1.23403 file

Publishers page: http://dx.doi.org/10.5755/j01.itc.49.1.23403

<http://dx.doi.org/10.5755/j01.itc.49.1.23403>

Please note:

Changes made as a result of publishing processes such as copy-editing, formatting and page

numbers may not be reflected in this version. For the definitive version of this publication, please

refer to the published source. You are advised to consult the publisher’s version if you wish to cite

this paper.

This version is being made available in accordance with publisher policies. See

http://orca.cf.ac.uk/policies.html for usage policies. Copyright and moral rights for publications

made available in ORCA are retained by the copyright holders.

Page 2: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

5Information Technology and Control 2020/1/49

A Formal Technique for Composing Cloud Services

ITC 1/49

Information Technology and Control

Vol. 49 / No. 1 / 2020

pp. 5-27

DOI 10.5755/j01.itc.49.1.23403

A Formal Technique for Composing Cloud Services

Received 2019/05/19 Accepted after revision 2019/12/17

http://dx.doi.org/10.5755/j01.itc.49.1.23403

HOW TO CITE: Barati, M. (2020). A Formal Technique for Composing Cloud Services. Information Technology and Control, 49(1), 5-27.

https://doi.org/ 10.5755/j01.itc.49.1.23403

Corresponding author: [email protected]

Masoud BaratiCardif University, Department of Computer Science and Informatics, Cardif, CF24 3AA, UK; e-mail: [email protected]

Recent cloud search engines lack a formal method in their service composition mechanisms to automatically build composite services realizing user requirements. This paper prescribes behavior composition framework as a formal tools for the search engines. The framework automatically synthesizes a controller that delegates the service operations requested by a cloud user to the proper available cloud services whose operations satisfy the request. Since most cloud search engines support semantic and ontology to discover similar service oper-ations, the paper extends the framework to be more adaptable with such search engines through the use of re-source reasoning. Several experiments are provided to demonstrate how the extended framework outperforms the original one in terms of realizing users’ requirements.

KEYWORDS: Behavior composition, cloud computing, resource reasoning, controller synthesis, formal method.

1. Introduction

The tremendous increase in the number of cloud customers demanding their numerous requirements stimulates cloud providers to publish services with a great diversity of functional and non-functional properties. In many cases, a single service may not necessarily realize the requirements. Hence, the com-bination of several services as a composite service is created to fulil them.

The architecture of cloud search engines recently beneit from the notions of semantic and ontology in order to ofer a set of composite services being sim-ilar to customers’ requirements. For instance, a dis-

tributed architecture was designed for cloud service discovery in [26]. The architecture beneits from a semantic Web technology using the Infrastructure and Network Description Language (INDL) and Stan-dard Protocol and RDF Query Language (SPARQL) to exchange information among providers. In [13], a semantic based search engine architecture–called Cloudle–was proposed. It utilized a cloud ontology to measure the degree of similarity between customers’ requirements and cloud services. The search engine leveraged an agent-based paradigm to build a test bed for service management. Furthermore, in light of de-

Page 3: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/496

veloping cloud search engine architectures, a model using semantic Web and quality of service (QoS) was presented in [20]. It matches and composes cloud ser-vices for realizing customers’ requirements. Although these approaches discover matchable or similar com-posites services for cloud customers, they integrate cloud services in an ad-hoc way and sufer from the lack of a formal method to automatically construct composite services.

Automatic service composition has lately become an interesting research area in both industrial and aca-demic centres. Its purpose is the automatically deter-mination of a strategy in order to compose available services realizing a desired service seen as user re-quirements [1, 24]. Current automated service com-position approaches not only consider the functional speciication of services, but also take into account the conversation speciication of them through which the behavior of a service is described [8, 15]. Behavioral de-scription of services consists of describing the order of invocation of service operations. To support such de-scriptions, services are represented by inite state ma-chines, which in turn, facilitate their veriication and lay a basis for their composition in an automatic way.

A promising automatic composition approach that acts as a formal tool for web or cloud service inte-gration is behavior composition [9]. This approach, irst, constructs a framework in which both customer requirements, called target service, and available ser-vices are abstracted as inite state machines. Then, it provides a sound and complete technique for synthe-sizing a controller that delegates the operations of the target service to the proper available services being able to realize the target. The behavior composition framework generates composite services automati-cally. Its synthesis technique guarantees that all pos-sible composite services realizing the target service are obtained. One of the shortcomings of this frame-work, however, is that its synthesized controller does not delegate the target service operations to the avail-able services that their operations are similar to those in target. Hence, the framework only builds compos-ite services whose operations have a fully match with the target service operations. Note that, two opera-tions can be similar if they have diferent names but the same functionalities.

This paper introduces a semantic-based framework for behavior composition in which similar operations

to user requests can appear in composite services. The framework beneits from ontology and resource reasoning to semantically deine service operations. Three kinds of reasoning methods, namely similarity, compatibility, and numerical reasoning are taken into account for calculating the degrees of match among operations. For the aim of providing a match making mechanism in the semantic-based framework, such degrees are used as references in the controller synthe-sis method proposed by the framework. The paper also gives come clues about the implementation of frame-work via model checking tools at hand: Symbolic Mod-el Veriier (SMV) and Temporal Logic Veriier (TLV).

The rest of this paper is structured as follows. Section 2 reviews the related work. Section 3 briely presents a background about the original behavior composi-tion framework and the notion of resource reasoning. Section 4 proposes a semantic-based framework for behavior composition. The section also implements the framework by the model checking tools. Section 5 provides some experimental results to show the ef-fects of resource reasoning on the realization of user requirements in the semantic-based behavior com-position framework. Finally, Section 6 concludes the paper and gives some indications about future work.

2. Literature Review

In recent years, many contributions have been pro-posed for the problems of service composition and service discovery in the cloud and web. The strategies applied for such kind of problems can be classiied into informal, semi-formal, and formal.

A brief review of some research using an informal strategy can be found in [42], which introduces the description of a Cloud-based Middleware for Ser-vice Composition, called CM4SC. In this approach, the middleware appears as a new layer between the application layer and the platform layer in the con-ventional cloud architecture to permit automatic composition planning and accelerate dynamic ser-vice composition. A lexible open source middleware has been proposed to support adaptive enactment of complex service composition in the cloud [16]. It facilitates the deployment of a large number of com-posite services and provides the capability of runtime

Page 4: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

7Information Technology and Control 2020/1/49

support for monitoring how they have been built. A semantic-based search engine, called Cloudle, that takes advantage of a cloud ontology to determine the measure of similarity between the user requirements and the available services, was devised for service composition and discovery [13]. Consequently, an agent-based architecture showing how the Cloudle search engine is organized was put forward in [31]. Generally speaking, regardless of the advantages that such contributions may bring about, the correctness of service composition cannot be veriied.

Usually the solutions exploiting a semi-formal strat-egy are subcategorized into syntactic-based and se-mantic-based methods. The methods in the irst cat-egory are also decoupled with respect to the methods that integrate services with the aid of an orchestrator or a choreographer. For service orchestration, Busi-ness Process Execution Language (BPEL) is used to deine an interoperable integration model [37, 38]. For instance, a management-based adaptive and con-igurable service composition method was proposed in [37] with the aid of a development in BPEL, called as VxBPEL, to support variability in service compo-sitions. For service choreography, Web Service Chore-ography Description Language (WS-CDL),1 being an XML-based speciication language is used for compos-ing peer-to-peer, interoperable collaborations among participants. The methods in the second category in-clude Ontology Language for Web Services (OWL-S) to deine an ontology for the semantic markup of web services to enable service invocation and composition through supplying the proper semantic descriptions [12, 19]. Furthermore, Web Service Modelling Ontology (WSMO)2 explicitly deines a conceptual model and also provides an ontology graph for the description of diferent aspects that are related to the semantic web services to solve the problem of service integration. A framework for automatic discovery, selection and composition of RESTful Web services which utilized linked open data was presented in [21]. The frame-work applied RDF (Resource Description Framework) to represent the state of linked data services through which SPARQL (Standard Protocol and RDF Query Language) queries has been used to compose RESTful services. In general, there is no standard or a universal

1 http://www.w3.org/TR/ws-cdl-10

2 http://www.wsmo.org

interfacing language that facilitates the composition of services written in diferent languages.

There are several solutions based on a formal strategy with theoretical models. Four of them, respectively based on transition systems with formal veriication, proof system, process calculus, and AI planning are briely presented. Such approaches ensure sound-ness, completeness or correctness of service compo-sition. The irst one aims to be applied in the domain of grid computing. A resource discovery approach to address multi-attribute queries is introduced [36]. The technique to get replies to queries are very fast and decreases the number of nodes examined during the resource discovery process. The proposed mod-el for resource discovery has been decoupled into data gathering, discovery, and control to simplify the formal veriication of properties expressed by CTL (computational tree logic) and LTL (linear temporal logic) formulas. The second one suggests to exploit the X-UNITY language for representing services in the cloud and a proof theory for proving temporal properties over service speciications needed for cloud applications [10]. Moreover, a compositional proof-system was extended in [39] with a number of inference rules and proven system properties. The approach proposed a semantic formalization using SWSpec language in which the complexity of compos-ing worklows was reduced. The third one includes a formal deinition of composition in terms of a pro-cess calculus and also provides an implementation through the extension of the Jolie language [7]. This approach was applied in the context of service-ori-ented architectures (SOAs). In the same spirit, a new model and veriication mechanism that relies on a process calculus for orchestration of web services, which combined with UML, provides a solution for the problem of formal veriication of cloud manufac-turing services composition [43]. Following that, a new extended process calculus for cloud manufactur-ing service composition was proposed [44]. Through this contribution, six elements of quality of service have been evaluated. Furthermore, a formal schema of service composition and a BPEL code generation method have been provided. The fourth one propos-es to exploit planning to optimize both composition and the underlying collection of information in or-der to obtain high-quality composite services in-line [34]. In this solution, irrelevant actions, based on the

Page 5: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/498

user preferences, are eliminated to reduce the search space. An automatic service composition by using a HTN (Hierarchical Task Network) planner JSHOP2 (Java Simple Hierarchical Ordered Planner) was pro-posed in [35] which considered both functional and non-functional properties of services.

Although the correctness of service composition is guaranteed in the contributions based on a formal strategy, they still sufer from the lack of exploiting controller synthesis techniques for service composi-tion. To this end, behavior composition can provide a sound and complete technique. More precisely, the problem of behavior composition has been widely studied in the areas of web services [5], veriication [18], and even multi-agent systems [29]. Among recent studies which are able to be applied in service-orient-ed computing, an automatic behavior composition synthesis framework is quite signiicant [9], as the au-thors have extensively investigated a particular type of behavior composition. In this framework, a speciic controller is generated to coordinate the parallel exe-cution of available services, so as to simulate a given target service with respect to constraints imposed on operations by an environment. A model without en-vironment constraints, called Roman, was also intro-duced latter by the same research team [8]. Further-more, an efective procedure, computing realizable target fragment, has been developed in the case that a behavior composition problem is unsolvable [28, 40].

3. Preliminaries

This section devotes a brief review to the original behavior composition framework and resource rea-soning.

3.1. Behavior Composition

The main elements of behavior composition frame-work are available services

1, , n , a target service

t , an environment , and controller generator CG [9]. 3 The asynchronous product of available services makes a system S. Formally, the target service is de-ined as a tuple

0, , , ,t t t t tB b A F η⟨ ⟩, where tB is a inite

set of states, 0tb is the initial state,

tA is the set of op-

3 Since the use of environment is not very widespread in practice, the deinition of this element is not discussed in our paper.

erations, tF is a set of inal states, and t t t tB A Bη ⊆ × ×

is a transition relation. Each available service in the system is a tuple

0, , , ,i i i i iB b A F η⟨ ⟩ , where iA is the

set of operations deined by i . The operations set

=1=

n

s iiA A is deined to indicate all available opera-

tions in the system such that t sA A⊆ . Given the target

and system, an algorithm called as largest Nondeter-ministic-simulation (ND-simulation for short) is in-troduced to trigger the process of controller synthesis. Through the algorithm, at each step, a state from the system does not simulate the one in the target service is eliminated. This algorithm leads to an ND-simula-tion relation R in which the relation of

η⟨ ⟩

service is elimin

of t sb s den algorithm is a p

operation, thi

ξ ω⟨Σ ⟩� = {⟨��, ��⟩ ∈ �� �� �� ≼ �� ∈

ξ ⊆ Σ× × ×Σ ω Σ× →

CG τ σ σ→ → σ ∈Σ × →

ωσ ⟨ ⟩ ��0 ≼ ��0

denotes the state

tb of t is simulated by the state

ss in S. The output of the algorithm is a particular controller, called as controller generator. Given the execution of a current operation, this controller delegates the operation to the appropriate available services being able to handle it. Technically, the controller generator CG of S for t is a tuple , , , ,t nA I ξ ω⟨Σ ⟩, where Σ={⟨bt, ss⟩ ∈ Bt×Ss |bt≼ss} is the set of CG states, {1 }nI n∈ is the indices of available services,

t nA Iξ ⊆ Σ× × ×Σ

is the transition relation, and : 2In

tAω Σ× → is the output function.

When a controller generator has been emerged, the notions of trace and history can be deined. A CG

trace CGτ is a sequence

1 1 2 2, ,0 1a k a kt tσ σ→ →,

where σ ∈Σ, and a CG history is a inite preix of a CG trace.

Let CG be the set of all histories on CG. A selection

function : CG t nC A I× → is deined from the output function ω in order to select one service among those that are able to execute the current operation with re-spect to the last state of a given history. If CG contains the initial state

0 0 0= ,t sb sσ ⟨ ⟩, and bt0 ≼ ss0, then a set of controllers–called generated controllers, which are compositions of t

–can be extracted from CG.

For the purpose of controller synthesis with the aid of an available model checking tool, the approach based on the largest ND-simulation is replaced by the cal-culation of a winning strategy of a corresponding two players in a safety game [9]. As depicted in Fig. 1, in such a game structure, one plays the role of the system and the other plays the role of the controller. The for-mer keeps the information about the current state of the target service, available services, and environment, and at each step, releases an operation that must be ex-

Page 6: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

9Information Technology and Control 2020/1/49

Figure 1

Two players of a safety game

initbt, b1, ..., bi, ..., bn, e, a

i

b′t, b1, ..., b

i, ..., bn, e

′, a′

j

b′t, b1, ..., b

i, ..., bn, e

′, a′′

k

ρs

ρs

ρs

ρc

ρc

ρc

ecuted. The latter returns an index indicating which available service in the system is able to perform the requested operation. These data appear in two lines inside each state of the transition system in Fig. 1. The state init indicates an initial state. In this state, all available services and the target service are in their ini-tial states, the current operation is empty and there is no controller reply, namely the index is zero.

The transition relations sρ and cρ represent system moves and controller replies, respec-tively. More precisely,

s X Y Xρ ⊆ × × , where

1= ( )t nX B B B E A× × × × × ∪∅ and = {0}nY I ∪ ,

and c X Y X Yρ ⊆ × × × , where

1 1, , , , , , , , , , , , ,t n t n cb b b e a i b b b e a j ρ′ ′ ′ ′ ′⟨⟨ ⟩ ⟨ ⟩ ⟩∈

if and only if 0j ≠ . Notice that, =k kb b′ for all \{ }nk I i∈ . The reader is referred to [9] for the detailed proce-

dure that shows how to derive a safety-game struc-ture from a behavior composition problem.

3.2. Reasoning Based on Semantics

To provide a more lexible framework for behavior composition, a compatibility relation ≪ ⊆ A × A over the set of operations can be introduced. The relation substitutes for the present equality between opera-tions in the deinition of the largest ND-simulation relation proposed in [9] and the underlying algorithm that computes it. An operation a' can now be carried out by an available service, if it is compatible with the delegated operation a, that is, a≪a'. No more details were given about this issue by the authors.

The use of resource reasoning metrics constitutes a irst appealing solution [2, 31]. It evaluates the degree

Page 7: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4910

of match between any two service operations. Gen-erally, such metrics it with a domain ontology graph, which has a well-formed structure to determine the multipaths connecting two concepts. Hence, the main efort must be concentrated on building ontologies.

3.2.1. Ontology and Resource Reasoning

Ontology is a representational artifact whose purpose is the exhibition of entities, deined classes, and re-lations between them [3]. An ontology can ofer me-ta-information to describe semantics of data and al-lows for building knowledge bases. Furthermore, it is a formal structure that supports the communication between a user and a computer agent [2].

The kinds of ontology are classiied into domain ontol-ogy, reference ontology, top-level ontology, and appli-cation ontology [3]. The intended class of ontology for better representation and classiication of resources included in a speciic system is the domain one. It provides a taxonomy with a hierarchical structure for such resources, considered as concepts, together with a set of axioms identifying several rules to show how the concepts and relations can be comprehended [3]. A typical example is a cloud ontology which supplies a taxonomy for its computing resources [31].

Diferent kinds of relations can be deined between the concepts in a domain ontology. For instance, “is-a”, “part-of”, “is-subtype-of”, “is-member-of”, “par-ticipates-in”, “has-output”, and “precedes” are some examples of such relations. A domain ontology is for-mally deined as follows.

Deinition 1 [11]. An ontology in a speciic domain O is a tuple of , , , ,C c R r A⟨ ≤ ≤ ⟩, where C is a set of con-cepts, R is a set of relations, ≤ c is a partial order on C that is called the concept hierarchy, ≤ r is a partial or-der on R that is called the relation hierarchy, and A is a set of axioms including rules in the logical forms to describe the relationships among the concepts.4

Based on a domain ontology, a graph, called an ontol-ogy graph, is drawn to demonstrate a taxonomy [2]. In this graph, each concept is represented as a node and each edge indicates a relationship between two con-cepts. More precisely, each edge illustrates a relation such as “is-a” or “part-of”. For example, Fig. 2 depicts

4 The notations ≤ c and ≤ r could be replaced by ≤ c and ≤ r, respectively. Although the latter are better, the former were adopted to avoid confusion with [11].

a simple ontology graph for an online agency provid-ing travel services. In this graph, the Travel agency services is considered as the root node having sub-nodes including Accommodation reservation, Trans-portation reservation, and Meal reservation.

In cloud computing, where service operations are de-ined semantically, the notion of resource reasoning is put forward, which includes similarity, compatibility, and numerical reasoning [31]. In similarity reasoning, to measure the degree of similarity between two dif-ferent concepts, several semantic similarity functions have been introduced. Among those proposed in [2, 25, 30], there is one that deines a function being compat-ible with a hierarchical structure of well-formed con-cepts that can be found in a domain ontology graph [2]. In comparison to Jaccard [23], cosine [41], and Slima-ni [33] similarity measures’ functions, Knappe in [2] deined a function that better considers path length, depth, and local density of an ontology graph [32]. This function takes into account specialization or general-ization of one concept with respect to another.

Deinition 2 [2]. The semantic similarity function

: [0,1]sim C C× → is deined as:

| ( ) ( ) | | ( ) ( )|( , )= (1 ) ,

| ( ) | | ( ) |

x y x ysim x y

x y

α α α αρ ρα α∩ ∩+ − (1)

where the constant [0,1]ρ∈ determines the degree of inluence of generalization5 that depends on a hi-erarchical ontology; the parameter ρ permits to tai-lor the similarity function, and hence can conform to the generalization property. The term ( )xα is con-sidered as the set of upward nodes reachable from x (including the node labeled by x), and the expression

( ) ( )x yα α∩ is the reachable common nodes between

x and y .

For instance, in Fig. 2, the concept of Meal reservation has two reachable upward nodes from itself, whereas this is four for Clif hotel reservation. Hence,

| ( ) |= 2 Mealreservation andα| ( ) |= 4.Cliffhotelreservationα

In addition, the number of common nodes for Clif hotel reservation and Transit hotel reservation is more than Clif hotel reservation and Bus reservation, which are calculated as follows:

5 Generalization is the opposite of specialization.

Page 8: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

11Information Technology and Control 2020/1/49

Figure 2

A part of simple ontology graph of a travel agency service

Travel agency services

Accommodation

reservation

Hotel

reservation

Cliff

hotel

reservation

Capsule

hotel

reservation

Transit

hotel

reservation

Motel

reservation

Transportation

reservation

Bus

reservation

Shuttle

bus

reservation

Shuttle

minibus

reservation

Car

reservation

Airplane

reservation

First

class

reservation

Business

class

reservation

Economic

class

reservation

Meal

reservation

Meat

reservation

Vegetable

reservation

: “is-a”

| ( . .) ( . .) |= 3Cliffhot reserv Transithot reservα α∩ | ( . .) ( .) |= 1.and Cliffhot reserv Busreservα α∩

As indicated in Eq. 1, the semantic similarity function maps two concepts into the unit interval, and its out-put shows the degree of similarity between x and y. So, the value 0 means no similarity and 1 means full similarity.

Given the ontology graph and semantic similarity function, a square matrix (similarity matrix) of order n of similarities among concepts is constructed:

1 1 1

1

( , ) ( , )

= ,

( , ) ( , )

n

n n n

sim a a sim a a

SIM

sim a a sim a a

where n is the number of concepts. It is important to note that each element in this matrix indicates a real number in [0,1] giving the degree of similarity be-tween related concepts. Moreover, a threshold in the interval (0,1] is deined to accept the minimum mea-sure of similarity between two concepts.

The similarity reasoning was introduced to measure the degree of similarity for functional requirements with the aid of a semantic similarity function (see Def. 2). To calculate the degree of match for technical requirements in computing systems, both the com-patibility and numerical reasoning were proposed.

The compatibility reasoning is appropriate for com-paring two sibling nodes in a domain ontology graph, for example, the compatibility between two diferent

Page 9: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4912

versions of a software program in the cloud ontology.

Deinition 3 [13]. The compatibility reasoning func-tion : (0, 2)compat C C× → is deined as:

| |

0.8( , ) = ( , ) ,

10

c cx y

compat x y sim x y

−+ (2)

where The terms cx and cy indicate the chronological orderings of diferent versions of a software program. The expression

| |

0.8c cx y−

/10 is a ine-grain measure-ment, because x and y have a small degree of difer-ence.

In [31], the compatibility reasoning function was gen-eralized as follows.

| |

( , ) = ( , ) ,

c cx y

compat x y sim x yµθ−

+ (3)

where 0 < < 1µ and 1 < <θ ∞ can be assigned by an arbitrary value. The terms

xc and yc indicate the

chronological orderings of diferent versions of a soft-ware program. The most important component in

| |c cx yµθ−

is the term | |x yc c− .

More precisely, the term ( , )sim x y in Eq. 3 is comput-ed based on Eq. 1 and the main signiicant value comes from the expression | |x yc c− . When this value is large, it means that x and y are less compatible; otherwise, they are more compatible. Appendix B provides an example to show how compatibility reasoning is cal-culated.

The numerical reasoning is about the similarity be-tween two numeric values of a concept such as CPU speed or RAM size.

Deinition 4 [31]. Let a and b be numeric values and c a concept. The numerical reasoning function

µ θ ∞µθ−

finition 4 [31] Let a and b be num

unction : [0,1]Sim C× × → is

( , , ) = 1a b c−− −

Max Min

= 8Max

( , ,a b RAM−− ≈−

A

(1 )i n≤ ≤ ⊆

is deined as:

( , , ) = 1 | |,c c

a bSim a b c

Max Min

−− − (4)

where cMax and

cMin are the minimum and maximum values being available for c.

As an example, consider the concept RAM with three diferent instances whose sizes are 1GB, 4GB, and 8GB. Given Eq. 4, = 8RAMMax and = 1RAMMin . In case of calculating numerical reasoning between RAM 1GB and RAM 4GB (i.e., = 1a and = 4b ), it is:

1 4( , , ) = 1 | | 0.58.

8 1Sim a b RAM

−− ≈−Placing concepts inside an ontology graph is manu-ally performed and the degree of similarity between two concepts can be retrieved from a similarity ma-trix. For locating concepts in an automatic way, a hierarchy matching method proposed in [22] can be suggested. The details of such a method is, however, out of the scope of this paper.

4. Semantic-Based Behavior

Composition

Given the notion of ontology and reasoning, each op-eration handled by an available service is considered as a concept [4]. To have a matchmaking between the operation requested by a target and those available in the system, two sets of operations are deined in the framework. One set, denoted by

tA , contains the re-quested operations, and the other set, denoted by

sA , includes all operations handled by available services in the system. Given such sets, the target service

t , available services (1 )i i n≤ ≤ , and the system are as deined in Sect. 3.1, while

t sA A⊆ .

Example 1. Consider requirements expressed as a tar-get service and depicted in Fig. 3. The requested opera-tions belong to the set:

= { 210 ,tA StorageSpace GB

Windows7,SQL-Server2008}.

Many of them are not available in the cloud. More-over, there are three available services able to meet the target. For instance, the service

1 is able to ofer the operation set:

A1={Windows8,SQL-Server2005}.

Though such resources do not have the same name as those of the requested resources, they can be similar or have the same functionality. In this end, a part of cloud ontology graph is illustrated in Fig. 4 to indicate the relations among service operations.

Taking into account the three types of resource rea-soning, the deinition of largest ND-simulation rela-tion must be revisited to support them. Let

sv and tv

be the numeric values for sa and

ta , respectively, and c is a concept carried by both

ta and sa . Moreover, as-

suming that 1τ ,

2τ , and 3τ be thresholds. An ND-simu-

Page 10: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

13Information Technology and Control 2020/1/49

lation relation of t by is a relation tR B S⊆ × such that ,t s R⟨ ⟩∈ implies:

For each type of reasoning, a condition is provided to ensure that at each step of operation execution, the degree of match between a requested operation and an available operation is equal to or greater than a predeined threshold.

Figure 3

A target service and available services handling cloud service operations

a1 a2 a3

B1

Hotel(3-star , 320$)Meals(meat , 60$)

Meals(vegetable, 55$)

Airplaneticket(economy , 380$)Airplaneticket(business, 450$)

Hotel(3-star , 240$)

b1 b2

B2

Meals(vegetable, 50$)

Bus(tour , 30$)

Airplaneticket(economy , 420$)

c1 c2

B3

Airplaneticket(economy , 350$)Airplaneticket(business, 420$)Airplaneticket(first , 480$)

Hotel(2-star , 200$)Hotel(3-star , 250$)Hotel(4-star , 300$)

Bus(shuttle, 20$)

(a) Available behaviors B1, B2, and B3

t1 t2 t3 t4

Bt

Airplaneticket(not{first},Lowest) Hotel({4-star}/{3-star},Lowest) Meals({vegetable},Lowest)

Bus({shuttle},Lowest)

(b) Target behavior B

Based on the extension of the largest ND-simula-tion relation, the notion of controller generator also requires a revision to consider the reasoning condi-tions. Formally, the controller generator CG of

t on

is , , , , ,t s nA A I ξ ω⟨Σ ⟩ , where:

1 Σ = {⟨t,s⟩ ∈ Bt × S| t ≼ s} is the set of CG states made by all pairs of

t and states that belong to the largest ND-simulation relation;

2 ξ is the transition relation, where , ,a a kt sσ σ ′→ in

ξ , if and only if: _ there is a transition

att t′→ in

t ; _ there is a transition

,a kss s′→ in ;

_ in the case of similarity reasoning, the condition

( , )t ssim a a 1τ≥ holds;

_ in the case of compatibility reasoning, the condition

( , )t scompat a a 2τ≥ holds;

_ in the case of numerical reasoning, the condition

3( , , )s tSim v v c τ≥ holds; _ for all , tt s B S′′ ′′⟨ ⟩ ∈ × , such that

,a kss s′′→ in

and att t′′→ in

t , it is the case that ,t s′′ ′′⟨ ⟩ ∈Σ;

Page 11: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4914

Thing

IaaS

DaaS

File system

Storage Space

SS-220GB

SS-210GB

SS-205GB

OS

Unix

Windows

Windows8

Windows7

WindowsVistaPaaS Middleware

SaaS

DBMS

SQL-Server2008

SQL-Server2005

Graphics

Figure 4

A part of an ontology for the cloud service operations [14]

Page 12: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

15Information Technology and Control 2020/1/49

3 : 2In

t sA Aω Σ× × → is the output function with

( , , ) = { | , , , ,t s t sa a k such that a a kω σ σ σ σ ξ′ ′∃ ∈Σ ⟨ ⟨ ⟩ ⟩∈, , , }kω σ σ σ σ ξ′ ′∃ ∈Σ ⟨ ⟨ ⟩ ⟩∈ .

Example 2. The largest ND-simulation relation for Example 1 is computed based on compatibility and nu-merical reasoning, which are done from the ontology graph in Fig. 4. Notably, the graph is a part of a cloud ontology graph represented in [14].

The compatibility reasoning is used for both Windows and , whereas a numerical reasoning is used for

StorageSpace . Given the simulation relation:

1 1 1 1 2 1 2 1 2 1 1 1= { , , , , , , , , , , , ,R t a b c t a b c t a b c⟨ ⟨ ⟩⟩ ⟨ ⟨ ⟩⟩ ⟨ ⟨ ⟩⟩3 1 1 1 3 2 1 1 , , , , , , , },t a b c t a b c⟨ ⟨ ⟩⟩ ⟨ ⟨ ⟩⟩

the controller generator, illustrated in Fig. 5, is synthe-sized. All transitions of the controller generator are la-beled by a pair of operations, namely a requested opera-tion of the target and a similar operation to the request handled by an available service. For instance, due to the compatibility between WindowsVista and 7Windows , the former can be ofered to the target service.

Figure 5

The controller generator

Given the possible generated controllers that can be

extracted from the controller generator, the transi-

tion relations of two of them are:

1 1 2:{ , 210 , 220 ,2, ,P s StSpace GB StSpace GB s⟨ ⟩2 4 , 7, , 2, ,s Windows WindowsVista s⟨ ⟩4 1 , 2008, 2005,2, }.s SQL Server SQL Server s⟨ − − − − ⟩

2 1 3:{ , 210 , 205 ,3, ,P s StSpace GB StSpace GB s⟨ ⟩3 5 , 7, 8,1, ,s Windows Windows s⟨ ⟩5 1 , 2008, 2005,1, }.s SQL Server SQL Server s⟨ − − − − ⟩

It is supposed that the predeined threshold for com-

patibility and numerical reasoning are 2 = 0.7τ and

3 = 0.3τ , respectively. Moreover, let ρ in Eq. 1 be set

to 0.5, and µ and θ in Eq. 3 be set to 0.8 and 10, respec-

tively. Given the following amounts, separately com-

puted for each transition in the generated controllers,

the average degree of match for the generated con-

trollers 1P and

2P are 0.68 and 0.79, respectively. For in-

stance, the average degree of match for 1P is calculated

as (0.33+0.88+0.83)/3.

s1

s2

s3

s4

s5

StorageSpace210GB ,StorageSpace205GB , 3

StorageSpace210GB ,StorageSpace220GB , 2

Windows7 ,Windows8 , 1

Windows7 ,WindowsVista, 2

SQL–Server2008, SQL–Server2005, 2

SQL–Server2008, SQL–Server2005, 1

Page 13: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4916

(205 ,210 , ) = 0.66,Sim GB GB StorageSpace

(220 ,210 , ) = 0.33,Sim GB GB StorageSpace

( 7, 8) =compat Windows Windows

( , 8) = 0.88,compat WindowsVista Windows

( 2008, 2005) = 0.83,sim SQL Server SQL Server− − − −

e | |= 1,c c− | |= 1,c c− | (Windowα2005) |= 3α α− − ∩ −−

where 7 8| |= 1,Windows Windowsc c−

7| |= 1,Windows WinVistac c− | ( 8) |= 5,Windowsα and

| ( 2008) ( 2005) |= 3SQL Server SQL Serverα α− − ∩ −− .

4.1. Implementation of Semantic-Based Behavior Composition in SMV/TLV

Once behavior composition has been translated into the safety-game structure, it can be implemented with a model checking tool like TLV [27]. TLV (Tem-poral Logic Veriier) is a tool for the purpose of verii-

cation of LTL speciications. It uses Boolean Decision

Diagrams (BDDs) for indicating state valuations and

transitions. The inputs of TLV are an LTL speciica-

tion written in SMV and a synthesis procedure. The

latter is based on the safety-game structure and its

output represents a controller generator. The pro-

cedure of controller synthesis based on a winning

strategy has been implemented in TLV [9]. SMV

(Symbolic Model Veriier) is a symbolic model check-

ing tool supporting the veriication of temporal logic

(LTL and CTL) properties of inite-state machines. In

SMV, each element of the safety-game players, name-

ly available services, target service, and controller, is

implemented as a module [9]. Figure 6 includes the

main modules of services in Example 1. The module

main contains two submodules: the controller Ctr and

MODULE main

VAR

sys: system Sys(ctr.index);

ctr: system Ctr;

DEFINE

good := (ctr.initial & sys.initial) | !(sys.failure);

MODULE Ctr

VAR

index : 0..3;

INIT

index = 0

TRANS

case

index=0 : next(index)!=0;

index!=0 : next(index)!=0;

esac

DEFINE

initial := (index=0);

MODULE Sys(index)

VAR

operation : {start_op, StorageSpace205GB, StorageSpace210GB, StorageSpace220GB,

Windows7, Windows8, WindowsVista, SQL-Server2005, SQL-Server2008};

threshold : 0..10;

target : Target(operation,threshold);

B1 : Service1(index,operation,threshold);

B2 : Service2(index,operation,threshold);

B3 : Service3(index,operation,threshold);

DEFINE

initial := (B1.initial & B2.initial & B3.initial & target.initial &

operation=start_op & threshold = 0);

failure := (B1.failure |B2.failure |B3.failure) |

(target.final & !(B1.final & B2.final & B3.final));

Figure 6

Modules of system and controller in SMV

Page 14: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

17Information Technology and Control 2020/1/49

the system Sys. The former returns the index of an available service executing the requested operation of the target service. The latter chooses the next op-eration that must be executed. Figure 7 gives the SMV modules of target service

t and the available service

1 . The transitions part (TRANS) of target module indicates how desired operations are released. Such operations are inputs in the available service module.

More precisely, the submodules indicating the two players of the game structure are detailed. For ctr, be-ing an instance of controller or orchestrator (Ctr), the transition relation deined via the constraints in the INIT and TRANS parts encodes an unconstrained

orchestrator, assigning at each step, one operation to each available service, by assigning values to the state variables state, operation, and threshold. The goal of synthesis is to restrict such a relation in order to obtain a winning strategy. More speciically, the constraints enforced on the controller player’s state are as follows. Given the INIT part, in its initial state (where variable initial holds true) the controller must instruct every service to initialize itself by perform-ing the dummy operation start (all services initialize simultaneously). As for non-initial states, the TRANS part deines the following constraints: (i) no initial-ization operation can be assigned to any service; (ii)

MODULE Target(operation,threshold)

VAR

state : {start_st,t1,t2,t3};

INIT

state = start_st & operation = start_op & threshold = 0

TRANS

case operation

state = start_st & operation = start_op & threshold = 0:

next(state) = t1 & next(operation) in {StorageSpace210GB}

& next(threshold) = 3;

state = t1 & operation in {StorageSpace210GB} & threshold = 3:

next(state) = t2 & next(operation) in

{Windows7} & next(threshold) = 8;

state = t2 & operation in {Windows7} & threshold = 8 :

next(state) = t3 & next(operation) in

{SQL-Server2008} & next(threshold) = 7;

state = t3 & in {SQL-Server2008} & threshold = 7 :

next(state) = t1 & next(operation) in

{StorageSpace210GB} & next(threshold) = 3;

esac

DEFINE

initial := state = start_st & operation = start_op & threshold=0;

final := state in {t1};

MODULE Service1(index,operation,threshold)

VAR

state : {start_st,a1,a2};

INIT

state = start_st

TRANS

case

state = start_st & operation = start_op & threshold = 0 & index = 0: next(state) in {a1};

(index != 1) : next(state) = state;

(state=a1 & operation in {Windows8,Windows7} & threshold<=8) : next(state) in {a2};

(state=a2 & operation in {SQL-Server2005,SQL-Server2008} & threshold<=8) : next(state) in {a1};

esac

DEFINE

initial := state = start_st & operation = start_op & threshold = 0 & index = 0;

failure := index = 1 & !((state = a1 & operation in {Windows8,Windows7} & threshold<=8) |

(state = a2 & operation in {SQL-Server2005,SQL-Server2008} & threshold<=8));

final := state in {a1};

Figure 7

Modules of target service and an available service

Page 15: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4918

the current operation request must match at least one of the service operation (by regarding the similarity between operations); (iii) a service can be instructed to execute an operation only if that operation is the one currently requested; and (iv) at most one service can be instructed to operate at a time.

Given the module Sys, being an instance of system, it contains all the aspects of the system player. More precisely, Sys is the synchronous product of available services (submodule Service1, Service2, Service3) and the target service (submodule Target). Some ab-breviations are used to deine, in the DEFINE part, namely inal and failure states. In fact, the system fails (failure) when any of the available service is instruct-ed to perform an operation that it cannot run based on its current state. Prohibiting such situations, by prop-erly constraining sys transition relation, is the syn-thesis procedure goal. Furthermore, the entire system does not respect the inal-state condition (inal) when the target is in a state where it terminates its execu-tion but the available services do not.

For providing a matchmaking between operations of a target service and those of available services, a variable, named threshold, is declared for each type of resource reasoning in the system module of SMV. Through this variable, target service is able to assign its acceptable threshold for the degree of match be-tween its requested operation and the one in system

. The type of this variable must be integer, since real numbers are not supported in SMV. For instance, a real number 0.7 is considered as an integer number 7. Given the ranges of resource reasoning functions, the domain of threshold for both similarity and numeri-cal reasonings is integer numbers in an interval [0,10] and for compatibility reasoning is integer number in an interval (0,20). Such domains are appropriate if only one digit of decimal precision is taken into ac-count for thresholds. Note that, the values returned from reasoning functions deined from Def. 2 to 4 can-not be computed through SMV/TLV.

The variable threshold is considered as an argument in both target module and available service modules. In the former, it is regarded as an output argument in which at each step of an operation request, its thresh-old, denoting the acceptable degree of match between the operation and the ones in available services, is re-leased. In contrast, this variable is an input argument in the latter through which the precomputed degree

of match between a requested operation and simi-lar ones in the current state of an available service is compared with the released threshold. In the transi-tion part of the available service module, the condi-tion for the threshold is associated with an operation handled by the service and the one requested by the target. Hence, in each transition of the module, a set is provided to encompass both operations.

Example 3. Given the transitions in the target service module depicted in Fig. 7 , it is supposed that: _ the threshold

1τ for the degree of match between SQL–Server2005 and the similar operation in the system is 7,

_ the threshold 2τ for the degree of match between Windows7 and the similar operation in the system is 8,

_ the threshold 3τ for the degree of match between

StorageSpace210GB and the similar operation in the system is 3.

For simpliication, although three diferent variables should be declared for

1τ , 2τ and

3τ in the implementa-tion of this example, only one variable threshold is de-clared. Given the transition part of the target service module, this variable is assigned with three values of 3, 8, and 7 to consider the acceptable thresholds for numerical, compatibility, and similarity reasonings, respectively. These values are inputs in the module of available services. For instance, the requested re-source SQL–Server2008 can be matched with the operation SQL–Server2005 in the module Service1, since the current input of threshold in this module has the value of 7, and the degree of similarity be-tween the operations is 8 ().

Appendix A provides the details about the rest of SMV modules of Example 1 along with a part of TLV output indicating controller generator.

5. Experimental Results

Through the implementation of resource reasoning in SMV, three diferent experiments have been provided. Given a ixed number of target services, the irst one is related to the efects of similarity reasoning on the number of realized target services. The second one is calculating the average time that it takes for the real-ization of target services. Finally, the third one evalu-ates the relationship between similarity reasoning and

Page 16: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

19Information Technology and Control 2020/1/49

the synthesized generated controllers for a target ser-vice under diferent rates of available services’ failures.

5.1. Efect of Similarity Reasoning on Realized Target Services

The assumption is that there is one available service, carrying 16 diferent operations. Furthermore, it is supposed that number of target services varies from 2 to 12. Each target service requests four diferent operations so that from those, one operation is ran-domly chosen to be possibly matched with a similar one in the available service. The predeined threshold in the target service can be 2, 4, 6, or 8. Moreover, in the available service, the degree of match between an operation and the one requested by target service is randomly selected between 1 and 10.

Given the graphs illustrated in Fig. 8, the horizon-tal axes represent the number of target services, and the vertical axes indicate the average number of real-ized target services, where for each datum (point in a curve), it is calculated after 10 times execution of TLV program. To investigate the average number of real-ized target services in the larger scale of operations, the graphs depicted in Fig. 8(b) and Fig. 8(c) have been provided. In the former, the available service carries 32 diferent operations, and in the latter, the number of operations is extended to 48. Note that, in both graphs, the scenario for the requested operations of target ser-vices is similar to the one assumed for Fig. 8(a).

It can be comprehended from the graphs that when the rate of threshold increases, the average number of realized target services decreases sharply. Further-more, the growth in the number of operations leads to an increase in the average number of realized target services. Besides, a compare between the curves and the threshold rates indicates that curves, having low-er rates of threshold, are closer to each other, and such curves are mapped onto each other when the num-ber of operations increases. For instance in Fig. 8(c), when the amount of thresholds were 2, 4, and 6, the curves were mapped onto each other and all released target services were realized. The reason of such ful-ly realizable target services is that the probability of inding an operation whose degree of match with a requested operation of target service is high when target requests lower rates of thresholds and we have larger scale of operations. Notably, the luctuations in the curves of the graphs are simply due to the random selection of degree of match between operations.

2 4 6 8 10 12

2

4

6

8

10

12

The number of target services

Theaveragenumber

ofrealizedtargets

(a) 16-operations

τ1 = 0.2τ1 = 0.4τ1 = 0.6τ1 = 0.8

2 4 6 8 10 12

2

4

6

8

10

12

The number of target services

Theaveragenumber

ofrealized

targets

(b) 32-operations

τ1 = 0.2τ1 = 0.4τ1 = 0.6τ1 = 0.8

2 4 6 8 10 12

2

4

6

8

10

12

The number of target services

Theaveragenumber

ofrealized

targets

(c) 48-operations

τ1 = 0.2τ1 = 0.4τ1 = 0.6τ1 = 0.8

Figure 8

The relationships between realized target services and similarity reasoning under different scale of operations

Page 17: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4920

To have a compare between our semantic-based framework and the original automatic behavior composition synthesis (ABCS) framework6 pro-posed in [9], the graph depicted in Fig. 9 is repre-sented. In the experiment, the assumption is that we have one available service handling 32 operations and the rate of threshold released by target service is 7 in the semantic-based framework. Moreover, the number of released target services ranges from 2 to 12 and the degree of match between an operation of each target service and the one in available service is randomly selected between 1 and 10. As seen from Fig. 9, the chance of realization of target services in our approach is much more than the original frame-work proposed in [9], since our approach considers the operations which are similar to those requested by target service during building composite services.

5.2. Realization Time of Target Services

This experiment evaluates the average of time taken for the realization of targets services in both seman-tic-based and original behavior composition frame-works. It is assumed that there is one available ser-vice carrying 32 diferent operations and the number of target services varies from 2 to 12, each of which requests four diferent operations. Furthermore, in the available service, the degree of match between an operation and the one demanded by target ser-vice is randomly selected between 1 and 10. Target service requests only one similar operation along with a threshold randomly selected between one and ten.7 Table 1 represents the average time (in seconds)

6 It is called also as original behavior composition framework.

which is taken for the realization of target services. The calculation of the average realization time was obtained after ten times execution of TLV program. As seen from the table, by increasing the number of target services, the realization time rises drastically. Moreover, the realization time in the original behav-ior composition is totally shorter than our seman-tic-based framework. This is due to the fact that the number of realized targets in the semantic-supported framework is much more than those realized by the original framework (see Fig. 9).

Figure 9

A comparison between realization time in semantic-based framework and original behavior composition framework

2 4 6 8 10 12

1

2

3

4

5

6

7

Number of target service

Averagenumber

ofrealizedtarget

services Semantic-based framework

ABCS framework

5.2.1. Efect of Similarity Reasoning on Controller Synthesis Under Diferent Rates of Service Failure7

The assumption is that a target service requests 5 diferent operations. Some requested operations are randomly chosen to be possibly matched with the similar ones in the system. The number of request-ed similar operations varies from 1 to 5, and the pre-deined threshold can be 2, 4, 6, 8, or 10. There are 10 available services in the system handling totally 25 diferent operations, and for each operation, there ex-ists at least two instances. More precisely, in this ex-

7 When the target demands a threshold 10, it means a fully match should be found. Such demands are simply allowed in the original behavior composition framework.

Table 1

A comparison between semantic-based framework and original behavior composition framework (ABCS)

Number of target services

Average realization time in semantic-based framework

Average realization time in original

framework (ABCS)

2 0.05 0.04

4 0.08 0.06

6 0.16 0.13

8 0.52 0.41

10 4.63 3.52

12 67.22 65.74

Page 18: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

21Information Technology and Control 2020/1/49

periment, available services have been classiied into

three groups:

_ the group with ive services each of which has one

state and handles 5 diferent operations;

_ the group with three services each of which has two

states and handles 10 diferent operations;

_ the group with two services each of which has three

states and handles 15 diferent operations.

In each available service, the degree of match between

an operation and the similar one requested by target

service is randomly chosen between 1 and 10.

Given the graphs illustrated in Fig. 10, the horizon-tal axes represent the number of similar operations requested by target service, and the vertical axes in-dicate the average number of synthesized controllers (generated controllers). For each datum (point in a curve), the average is calculated after 10 times execu-tion of TLV program. To evaluate the average num-ber of controllers when some available services ran-domly encounter with failures, the depicted graphs in Fig. 10(b)-(d) are provided. The results after the failures of 2, 4, and 6 available services are illustrat-ed by the graphs, respectively.

Figure 10

The relationships between controller synthesis and similarity reasoning under different rates of failure

Page 19: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4922

As seen from the igures, there is a signiicant de-crease in the number of synthesized controllers when the rate of failures increases. Although the average number of controllers is nearly zero for the threshold one, the chance of synthesis rises when lower thresh-olds are requested. As another result, the increase in the number of requested similar operations leads to the increase in the number of controllers.

6. Conclusion

This paper introduced a semantic-based framework for the problem of behavior composition whereby service operations that have diferent names but the same functionality are taken into account during building composite services. Our semantic-based framework extended the original behavior compo-sition framework [9] by developing synthesis proce-dure, leveraging three types of resource reasoning, namely similarity, compatibility, and numerical rea-soning. Such an extension not only provided a more lexible framework for the behavior composition framework to match similar service operations, but also enabled semantic-supported cloud ecosystems to compose their services in an automatic way. More-over, the paper gave some clues about the implemen-tation of our framework via model checking tools in hand: SMV and TLV.

The kind of control exercised in our framework is a control by delegation. Other formal methods have been proposed for service composition when super-vision (i.e., disabling controllable events) is adopted as kind of control (e.g., [6]), but the theoretical frame-work behind them do not consider resource reason-ing behind their synthesis mechanism. Some formal methods for service composition, very diferent from the aforementioned ones, use a probabilistic (e.g., [17]), preferences-based planning (e.g., [34]) or pro-cess calculus(e.g., [7]) approach. These sorts of meth-ods, however, did not synthesize automatic control-lers to orchestrate a community of services.

The experiments showed that the possibility of real-izing user requirements in our semantic-based ver-sion is much more than the original framework due to the lexible match between similar operations in the former. However, the realization time of specii-

cations in our framework was fairly longer than the original one. Given possible failures of some available services, our framework indicated that has a higher rate of fault tolerance compared to the original one in terms of building composite services.

Although our framework prescribed a promising for-mal tools for composing cloud services in an automat-ic way, it still requires further work or investigations to be readily applied in a real cloud environment. In our present approach, the values returned from the resource reasoning functions, showing the degree of match between service operations, were not auto-matically computed by SMV/TLV. In fact, these val-ues were manually calculated and inserted as integer numbers in the SMV module skeletons extended for the implementation of our framework. Hence, this problem may raise a question about how to establish a link between SMV/TLV and the available ontolog-ical engineering tools for building ontology graphs and knowledge-based solutions. As another potential research for future work, the integration of real-time constraints in our framework can be examined. By supporting such constraints, manufacturing cloud and Internet of Things (IoT) industries, often deter-mining deadlines for the use of their services, can beneit from our proposed formal method to integrate objects or services. Furthermore, investigating the scalability of our semantic-based framework in terms of orchestrators synthesis will be another possible re-search direction.

Appendix

Appendix A. Implementation in SMV/TLV

Figure 11 represents the SMV modules of two avail-able services

2 and 3 in Example 1. The controller

generator that is obtained for the example is illustrat-ed in Fig. 12. The TLV output indicates an automaton with 7 states and 10 transitions that was successfully synthesized.

Appendix B. An example of compability reasoning

Given the graph in Fig. 13, the values 1 to 9 show the chronological orderings of Windows. 95Windows is

Page 20: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

23Information Technology and Control 2020/1/49

assigned 1 to demonstrate that it is the oldest version of Windows and 2008WindowsServer is assigned 9 to represent the latest version. The degree of compati-bility between 98Windows and WindowsVista, and the one between 7Windows and WindowsVista are calcu-lated as follows.

( 98) = ( 7) =Windows Windowsα α ( ) = 2,WindowsVistaα

( 98) ( ) = Windows WindowsVistaα α∩ ( 7) ( ) = 1,Windows WindowsVistaα α∩

and

( 98, ) =sim Windows WindowsVista

( 7, ) = (0.5 0.5) / 2 = 0.5.sim Windows WindowsVista +The label values of 98, ,Windows WindowsVista and

7Windows are 98 = 2, = 7,w wvc c and

7 = 8wc . For the aim of experimentation, µ and θ are set to 0.8 and 10, respectively. Given the compatibility reasoning function, ( 98, ) = 0.533compat Windows WindowsVista and ( 7, ) = 0.58.compat Windows WindowsVista Hence, compared to 98,Windows 7Windows is more compat-ible with WindowsVista .

Figure 11

The SMV modules of available services

MODULE Service2(index,operation,threshold)

VAR

state : {start_st,b1,b2};

INIT

state = start_st

TRANS

case

state = start_st & operation = start_op & threshold = 0 & index = 0 : next(state) in {b1};

(index != 2) : next(state) = state;

(state=b1 & operation in {StorageSpace210GB,StorageSpace220GB} & threshold<=3) : next(state) in {b2};

(state=b2 & operation in {WindowsVista,Windows7} & threshold<=8) : next(state) in {b1};

(state=b1 & operation in {SQL-Server2005,SQL-Server2008} & threshold<=8) : next(state) in {b1};

esac

DEFINE

initial := state = start_st & operation = start_op & threshold = 0 & index = 0;

failure := index = 2 & !((state = b1 & operation in {StorageSpace210GB,StorageSpace220GB} & threshold<=3) |

(state = b1 & operation in {SQL-Server2005,SQL-Server2008} & threshold<=8) |

(state = b2 & operation in {WindowsVista,Windows7} & threshold<=8));

final := state in {b1};

MODULE Service3(index,operation,threshold)

VAR

state : {start_st,c1,c2};

INIT

state = start_st

TRANS

case

state = start_st & operation = start_op & threshold = 0 & index = 0 : next(state) in {c1};

(index != 3) : next(state) = state;

(state=c1 & operation in {SQL-Server2008} & threshold==10) : next(state) in {c2};

(state=c2 & operation in {SQL-Server2008} & threshold==10) : next(state) in {c1};

(state=b1 & operation in {StorageSpace205GB,StorageSpace210GB} & threshold<=3) : next(state) in {b1};

esac

DEFINE

initial := state = start_st & operation = start_op & threshold = 0 & index = 0;

failure := index = 3 & !((state = c1 & operation in {SQL-Server2008} & threshold==10) |

(state = c1 & operation in {StorageSpace205GB,StorageSpace210GB} & threshold<=3) |

(state = c2 & operation in {SQL-Server2008} & threshold==10));

final := state in {c1};

Page 21: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4924

All winning states satisfy invariant

Automaton States

State 1

sys.operation = start_op sys.threshold = 0 sys.target.state = start_st

sys.B1.state = start_st sys.B2.state = start_st sys.B3.state = start_st

ctr.index = 0

State 2

sys.operation = Storage210GB sys.threshold = 3 sys.target.state = t1

sys.B1.state = a1 sys.B2.state = b1 sys.B3.state = c1

ctr.index = 2

State 3

sys.operation = Storage210GB sys.threshold = 3 sys.target.state = t1

sys.B1.state = a1 sys.B2.state = b1 sys.B3.state = c1

ctr.index = 3

State 4

sys.operation = Windows7 sys.threshold = 8 sys.target.state = t2

sys.B1.state = a1 sys.B2.state = b1 sys.B3.state = c1

ctr.index = 1

State 5

sys.operation = SQL_Server2008 sys.threshold = 7 sys.target.state = t3

sys.B1.state = a2 sys.B2.state = b1 sys.B3.state = c1

ctr.index = 1

State 6

sys.operation = Windows7 sys.threshold = 8 sys.target.state = t2

sys.B1.state = a1 sys.B2.state = b2 sys.B3.state = c1

ctr.index = 2

State 7

sys.operation = SQL_Server2008 sys.threshold = 7 sys.target.state = t3

sys.B1.state = a1 sys.B2.state = b1 sys.B3.state = c1

ctr.index = 2

Automaton Transitions

From 1 to 2 3

From 2 to 6

From 3 to 4

From 4 to 5

From 5 to 2 3

From 6 to 7

From 7 to 2 3

Automaton has 7 states, and 10 transitions

BDD nodes allocated: 7955

max amount of BDD nodes allocated: 7955

Bytes allocated: 589888

Figure 12

TLV output (controller generator)

Page 22: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

25Information Technology and Control 2020/1/49

Figure 13

A simple ontology graph [31]

References

1. Amato, F., Moscato, F. Automatic Cloud Services Com-

position for Big Data Management. Proceedings of

IEEE 30th International Conference on Advanced In-

formation Networking and Applications Workshops,

Crans-Montana, Switzerland, 2016, 46-51. https://doi.

org/10.1109/WAINA.2016.169

2. Andreasen, T., Bulskov, H., Knappe, R. From Ontology

Over Similarity to Query Evaluation. In Bernardi R.,

Moortgat, M. (Eds.), 2nd CoLogNET-ElsNET Sym-

posium - Questions and Answers: Theoretical and

Applied Perspectives, Amsterdam, The Netherlands,

2003, 39-50.

3. Arp, R., Smith, B., Spear, A. D. Building Ontologies

with Basic Formal Ontology. MIT Press, Cambridge,

Massachusetts, 2015. https://doi.org/10.7551/mit-

press/9780262527811.001.0001

4. Barati, M. Composition of Dynamic Components Based

on Behavioral Descriptions. Ph.D. Thesis, Département

d’informatique, Université de Sherbrooke, 2018.

5. Berardi, D., Cheikh, F., De Giacomo, G., Patrizi, F.

Automatic Service Composition via Simulation. In-

ternational Journal of Foundations of Computer

Science, 2008, 19, 429-451. https://doi.org/10.1142/

S0129054108005759

6. Bertoli, P., Pistore, M., Traverso, P. Automated Compo-

sition of Web Services via Planning in Asynchronous

Domain. Artiicial Intelligence, 2010, 174, 316-361.

https://doi.org/10.1016/j.artint.2009.12.002

7. Dalla Preda, M., Gabbrielli, M., Guidi, C., Mauro, J.,

Montesi, F. Interface-Based Service Composition with

Aggregation. In De Paoli, F., Pimentel, E., Zavattaro, G.

(Eds.), First European Conference on Service-Orient-

ed and Cloud Computing, Lecture Notes in Computer

Science, Bertinoro, Italy, 7592, 2012, 48-63. https://doi.

org/10.1007/978-3-642-33427-6_4

8. De Giacomo, G., Mecella, M., Patrizi, F. Automated

Service Composition Based on Behaviors: The Roman

Model. In: Bouguettaya, A., Sheng, Q. Z., Daniel, F. (Eds.),

Web Services Foundations, Springer, New York, 2014,

189-214. https://doi.org/10.1007/978-1-4614-7518-7_8

9. De Giacomo, G., Patrizi, F., Sardina, S. Automatic Be-

havior Composition Synthesis. Artiicial Intelligence,

2013, 196, 106-142. https://doi.org/10.1016/j.art-

int.2012.12.001

Page 23: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

Information Technology and Control 2020/1/4926

10. Hale, M. L., Gamble, M. T., Gamble, R. F. A Design and

Veriication Framework for Service Composition in the

Cloud. Proceedings of 2013 IEEE 9th World Congress

on Services, Santa Clara, CA, 2013, 317-324. https://doi.

org/10.1109/SERVICES.2013.46

11. Han, L., Dave, B. Semantic-Supported and Agent-Based

Decentralized Grid Resource Discovery. Future Gener-

ation Computer Systems, 2008, 24, 806-812. https://doi.

org/10.1016/j.future.2008.04.005

12. Huangab, C., Wangab, X., Wang, D. Type Theory Based

Semantic Veriication for Service Composition in Cloud

Computing Environment. Information Sciences, 2018,

496, 101-118. https://doi.org/10.1016/j.ins.2018.08.042

13. Kang, J., Sim, K. M. Cloudle: An Agent-Based Cloud

Search Engine That Consults a Cloud Ontology. Pro-

ceedings of Annual International Conference on Cloud

Computing and virtualization, Singapore, 2010, 312-

318. https://doi.org/10.5176/978-981-08-5837-7_224

14. Kang, J., Sim, K. M. Cloudle: An Ontology-Enhanced

Cloud Service Search Engine. Proceedings of 1st Inter-

national Workshop Cloud Information System Engi-

neering, Collocated with 11th International Conference

Web Information System Engineering, Hong Kong, 2010,

416-427. https://doi.org/10.1007/978-3-642-24396-7_33

15. Kil, H., Nam, W., Lee, D. Behavioural Description

Based Web Service Composition Using Abstraction

and Reinement. International Journal of Web and

Grid Services, 2013, 9, 54-81. https://doi.org/10.1504/

IJWGS.2013.052849

16. Leite, L., Moreira, C. E., Cordeiro, D., Gerosa, M. A., Kon,

F. Deploying Large-Scale Service Compositions on the

Cloud with the CHOReOS En actment Engine. Proceed-

ings of 2014 IEEE 13th International Symposium on

Network Computing and Applications, Cambridge, MA,

2014, 121-128. https://doi.org/10.1109/NCA.2014.25

17. Li, L., Jin, Z., Li, G., Zheng, L., Wei, Q. Modeling and

Analyzing the Reliability and Cost of Service Composi-

tion in the IoT: a Probabilistic Approach. Proceedings

of 19th International Conference on Web Services,

Honolulu HI, 2012, 584-591. https://doi.org/10.1109/

ICWS.2012.25

18. Lustig, Y., Vardi, M. Y. Synthesis from Component Li-

braries. International Journal on Software Tools for

Technology Transfer, 2012, 15, 603-618. https://doi.

org/10.1007/s10009-012-0236-z

19. Martin, D., Burstein, M., McDermott, D., McIlraith, S.,

Paolucci, M., Sycara, K., McGuinness, D. L., Sirin, E.,

Srinivasan, N. Bringing Semantics to Web Services

with OWL-S. World Wide Web Journal, 2007, 10, 243-

277. https://doi.org/10.1007/s11280-007-0033-x

20. Modi, K. J., Garg, S. A QoS-Based Approach for

Cloud-Service Matchmaking, Selection and Composi-

tion Using the Semantic Web. Journal of Systems and

Information Technology, 2019, 21, 63-89. https://doi.

org/10.1108/JSIT-01-2017-0006

21. Modi, K. J., Garg, S., Chaudhary, S. An Integrated

Framework for RESTful Web Services Using Linked

Open Data. International Journal of Grid and High

Performance Computing, 2019, 11, 24-49. https://doi.

org/10.4018/IJGHPC.2019040102

22. Nayak, G., Dutta, S., Ajwani, D., Nicholson, P., Sala, A.

Automated Assessment of Knowledge Hierarchy Evo-

lution: Comparing Directed Acyclic Graphs. Informa-

tion Retrieval Journal, 2019, 22, 256-284. https://doi.

org/10.1007/s10791-018-9345-y

23. Niwattanakul, S., Singthongchai, J., Naenudorn, E.,

Wanapu, S. Using of Jaccard Coeicient for Keywords

Similarity. Proceedings of the International MultiCon-

ference of Engineers and Computer Scientists, Hong

Kong, 2013.

24. Paik, I., Chen, W., Huhns, M. N. A Scalable Architecture

for Automatic Service Composition. IEEE Transac-

tions on Services Computing, 2014, 7, 82-95. https://doi.

org/10.1109/TSC.2012.33

25. Pirró, G. A Semantic Similarity Metric Combining

Features and Intrinsic Information Content. Data &

Knowledge Engineering, 2009, 68, 1289-1308. https://

doi.org/10.1016/j.datak.2009.06.008

26. Pittaras, C., Ghijsen, M., Wibisono, A., Grosso, P., Der

Ham, J. V., Laat, C. Semantic Distributed Resource Dis-

covery for Multiple Resource Providers. Proceedings of

8th International Conference on Semantics Knowledge

and Grids, Beijing, China, 2012, 225-228. https://doi.

org/10.1109/SKG.2012.46

27. Pnueli, A., Shahar, E. A Platform for Combining De-

ductive with Algorithmic Veriication. Proceedings of

International Conference Computer Aided Veriication

(CAV), New Brunswick, NJ, 1996, 184-195. https://doi.

org/10.1007/3-540-61474-5_68

28. Ramirez, M., Yadav, N., Sardina, S. Behavior Composition

as Fully Observable Non-Deterministic Planning. Pro-

ceedings of 23rd International Conference on Automat-

ed Planning and Scheduling, Rome, Italy, 2013, 180-188.

29. Randelli, G., Marchetti, L., Marino, F. A., Iocchi, L.

Multi-Agent Behavior Composition Through Adapt-

able Software Architectures and Tangible Interfac-

Page 24: Please note - -ORCAorca.cf.ac.uk/130562/1/barati-paper.pdf · Composing Cloud Services ITC 1/49 Information Technology and Control Vol. 49 / No. 1 / 2020 ... the target service operations

27Information Technology and Control 2020/1/49

es. In Ruiz-del Solor, J., Chown, E., Plöger, P. G. (Eds.),

RoboCup 2010: Robot Soccer World Cup XIV, Lecture

Notes in Computer Science, Singapore, 6556, 2011, 278-

290. https://doi.org/10.1007/978-3-642-20217-9_24

30. Rodriguez, M. A., Egenhofer, M. J. Determining Se-

mantic Similarity Among Entity Classes from Dif-

ferent Ontologies. IEEE Transactions on Knowledge

and Data Engineering, 2003, 15, 442-456. https://doi.

org/10.1109/TKDE.2003.1185844

31. Sim, K. M. Agent-Based Cloud Computing. IEEE

Transactions on Services Computing, 2012, 5, 564-577.

https://doi.org/10.1109/TSC.2011.52

32. Slimani, T., Description and Evaluation of Semantic

Similarity Measures Approaches. International Jour-

nal of Computer Applications, 2013, 80, 25-33. https://

doi.org/10.5120/13897-1851

33. Slimani, T., Ben Yaghlane, B., Mellouli, K. A New Simi-

larity Measure Based on Edge Counting. World Acade-

my of Science, Engineering and Technology, 2006, 34-

38.

34. Sohrabi, S., McIlraith, S. A. Preference-Based Web

Service Composition: A Middle Ground Between Ex-

ecution and Search. In Patel-Schneider, P. F., Pan, Y.,

Hitzler, P., Mika P., Zhang, L., Pan, J. Z., Horrocks, I.,

Glimm, B. (Eds.), Proceedings of 9th International Se-

mantic Web Conference, Lecture Notes in Computer

Science, Shanghai, China, 6496, 2010, 713-729. https://

doi.org/10.1007/978-3-642-17746-0_45

35. Song, Y., Sun, Q., Zhou, A., Wang, S., Li, J. QoS-Aware

Service Composition Using HTN Planner. Proceedings

of 8th International Symposium on Cloud and Service

Computing, Paris, France, 2018, 107-110. https://doi.

org/10.1109/SC2.2018.00022

36. Souri, A., Navimipour, N. J. Behavioral Modeling and

Formal Veriication of a Resource Discovery Approach

in Grid Computing. Expert Systems with Applica-

tions, 2014, 41, 3831-3849. https://doi.org/10.1016/j.

eswa.2013.11.042

37. Sun, C., Wang, Z., Wang, K., Xue, T., Aiello, M. Adaptive

BPEL Service Compositions via Variability Manage-

ment: a Methodology and Supporting Platform. Inter-

national Journal of Web Services Research, 2019, 16,

37-69. https://doi.org/10.4018/IJWSR.2019010103

38. Ter Beek, M. H., Bucchiarone, A., Gnesi, S. Formal

Methods for Service Composition. Annals of Mathe-

matics, Computing & Teleinformatics, 2007, 1, 1-10.

39. Viriyasitavat, W., Xu, L. D., Bi, Z. The Extension of Se-

mantic Formalization of Service Worklow Specii-

cation Language. IEEE Transactions on Industrial

Informatics, 2019, 15, 741-754. ttps://doi.org/10.1109/

TII.2018.2807400

40. Yadav, N. K. Behavior Composition Optimisation. PhD

thesis, School of Computer Science and Information

Technology, RMIT University, Melbourne, Australia,

2014.

41. Ye, J. Cosine Similarity Measures for Intuitionistic

Fuzzy Sets and Their Applications. Mathematical

and Computer Modelling, 2011, 53, 91-97. https://doi.

org/10.1016/j.mcm.2010.07.022

42. Ylianttila, M., Riekki, J., Zhou, J., Athukorala, K., Gil-

man, E. Cloud Architecture for Dynamic Service

Composition. International Journal of Grid and High

Performance Computing, 2012, 4, 17-31. https://doi.

org/10.4018/jghpc.2012040102

43. Yongxiang, L., Xifan, Y., Jie, Z., Bin, L. Cloud Manufac-

turing Service Composition Modeling and Formal Ver-

iication Based on Calculus for Orchestration of Web

Service. Proceedings of 25th Chinese Control and De-

cision Conference, Guiyang, China, 2013, 2806-2810.

https://doi.org/10.1109/CCDC.2013.6561422

44. Yongxiang, L., Xifan, Y., Xiangmin, X., Hong, J. Formal

Veriication of Cloud Manufacturing Service Com-

position and BPEL Codes Generation Based on Ex-

tended Process Calculus. Information Technology

Journal, 2014, 13, 1779-1785. https://doi.org/10.3923/

itj.2014.1779.1785