Composition of Semantic Web Services using Linear Logic Theorem Proving

Jinghai Rao a Peep K¨ungas a Mihhail Matskin b

aDepartment of Computer and Information Science, Norwegian University of Science and Technology, NO-7491, Trondheim, Norway, Email: {jinghai,peep}@idi.ntnu.no bDepartment of Microelectronics and Information Technology, Royal Institute of Technology, SE-164 40 Kista, Sweden, Email: [email protected]

Abstract

This paper introduces a method for automatic composition of Semantic Web services using Linear Logic (LL) theorem proving. The method uses a Semantic Web service language (DAML- S) for external presentation of Web services, while, internally, the services are presented by extralogical axioms and proofs in LL. LL, as a resource conscious logic, enables us to define attributes of Web services formally (including parameters, states and non-functional attributes). We use a process calculus to present the process model of the composite service formally. The process calculus is attached to the LL inference rules in the style of type theory. Thus the process model for a composite service can be generated directly from the complete proof. The subtyping rules that are used for semantic reasoning are presented with LL inference figures. We propose a system architecture where the DAML-S Translator, LL Theorem Prover and Semantic Reasoner can operate together. This architecture has been implemented in Java.

Key words: Service composition, Web service, Semantic Web

1 Introduction ment to the Web service provision. In particular, if no single Web service can satisfy the functionality required by the Recent progress in the field of Web ser- user, there should be a possibility to com- vices makes it practically possible to bine existing services together in order publish, locate, and invoke applications to fulfill the request. This trend has trig- across the Web. This is a reason why more gered a considerable number of research and more companies and organizations efforts on Web services composition both now implement their core business and in academia and in industry. outsource other application services over Internet. The ability to efficient selection Several Web service initiatives provide and integration of inter-organizational platforms and languages that should al- and heterogeneous services on the Web at low easy integration of heterogeneous runtime becomes an important require- systems. In particular, Universal De-

Preprint submitted to Elsevier Science 13 June 2004 scription, Discovery, and Integration sition of atomic services that satisfies the (UDDI) [7], Web Services Description user requirements. The reason why we use Language (WSDL) [11], Simple Object LL theorem proving as Web service com- Access Protocol (SOAP) [8] and parts of position method is that LL is resource- DAML-S [25] (including Servi- conscious logic. This means that, first, we ceProfile and ServiceGrounding) define can distinguish the information transfor- standard ways for service discovery, de- mation and the state change produced by scription and invocation (message pass- the Web service and, second, we can per- ing). Some other initiatives including form planning using both qualitative and Business Process Execution Language quantitative non-functional attributes. for Web Services (BPEL4WS) [4] and Because of soundness of the logic frag- DAML-S ServiceModel, are focused on ment used the correctness of composite representing service compositions where services is guaranteed with respect to the a process flow and bindings between ser- initial specifications. Completeness of the vices are known a priori. logic fragment ensures that all compos- able solutions would be found. The problem of Web service composition is a highly complex task. Here we under- Secondly, we present a composition ap- line only the following two sources of its proach that allows reasoning with types complexity. Firstly, Web services can be from a service specification. We introduce created and updated on the fly, and it may a set of subtyping rules that defines a valid be beyond human capabilities to analyze dataflow for composite services. The sub- a huge amount of available services and typing relationships between the DAML to compose them manually. Secondly, the concepts are detected by the Semantic Web services are usually developed by dif- Reasoner separately from the LL Theo- ferent organizations that use different se- rem Prover. Since the rules are defined as mantic model presenting services’ charac- logical implications, the interoperability teristics (for example, non-functional at- is ensured between the Linear Logic The- tributes) and this requires utilization of orem Prover and the Semantic Reasoner. relevant semantic information for match- ing and composition of Web service. Web service composition using theorem proving is a relatively new topic, and it In this paper, we propose a solution that has been mentioned in quite recent pub- allows decreasing the complexity of the lications. However, the idea of software Web service composition task emerging construction from proofs is not new. In from the above-mentioned sources. particular, deductive program synthesis is based on an observation that constructive Firstly, we present a method for auto- proofs are equivalent to programs where mated Web service composition which is each step of a proof can be interpreted as based on the proof search in a fragment a step of a computation. The key ideas of propositional Linear Logic (LL) [14]. of the software composition approach, as The main idea of the method is as fol- well as correspondence between theorems lows. Given a set of existing Web services and specifications and between construc- and the requirements in term of DAML-S tive proofs and programs, are presented ServiceProfile, the method finds a compo- in [23].

2 There is still a long way towards com- tation and extralogical axioms in LL. plete automation of service composition In our system, DAML-S ServicePro- in a general case. In this paper we re- file is used externally for presentation strict the problem to composition of value- of atomic Web service specifications, added services only assuming that a core while LL axioms are used internally service (atomic or composed) already ex- for composition. The process model is ists. internally presented by a process cal- culus. The calculus can be translated The rest of this paper is organized as either into DAML-S ServiceModel or follows: Section 2 describes a system ar- BPEL4WS. chitecture for composition of Semantic GUI: visualizes services (both com- Web services, Section 3 gives a motivat- posed and atomic). The graphical ing example. Section 4 presents back- presentation includes visualization of ground knowledge for service description functionalities and non-functional at- language and LL. Section 5 presents a tributes. method for transformation of DAML-S LL Theorem Prover: proves whether profile to extralogical axioms in LL lan- the user’s request for service can be guage. Section 6 discusses the usage of achieved by a composition of the avail- to enable semantic compo- able atomic services. If the answer is sition. Section 7 presents the implemen- yes, the process model for the compos- tation of a prototype system. Finally, ite service is automatically extracted related works and conclusions are pre- from the proof. sented. Semantic Reasoner: detects the sub- typing and some other relationships between concepts in service descrip- 2 The service composition archi- tions. The formal logics used in Seman- tecture tic Reasoner could be logics developed for expressing knowledge and reasoning about concepts and concept hierarchies, A general architecture of the proposed for example, Description Logics [15]. Web service composition system is de- A transformation between Description picted on Figure 1. The system takes Logics and LL is done by the Adapter. available atomic services and user’s re- Adapter: performs translation between quirements (both of them are described LL and the internal presentation used in DAML-S ServiceProfile and grounded by the Semantic Reasoner. by WSDL documents) as inputs and pro- duces a set of possible composite services The composition process in our case is presented by the ServiceModel in DAML- as follows. Firstly, a semantic descrip- S service model or BPEL4WS. tion of existing Web services (in the form of DAML-S ServiceProfile) is translated The basic components of the system are into extralogical axioms of LL and the the follows: user’s request for a composite service is specified in the form of a LL sequent to Translator: performs automated trans- be proven. Then, the LL Theorem Prover formation between an external presen- checks whether the request can be satis-

3 Service Profile Extralogical Axioms Linear Logic Translator Theorem Prover Proof Service Process l C a mI S las n se le p e s tio b il m an i a c a d P s i a n ro o r it t pe p a o ci rtie ro V n s P

GUI Adapter R S y l e u g e al b lo d t yt to o oi p n M n ni O s g

Semantic Ontology Reasoner Base

Fig. 1. The architecture of the service composition system.

fied by a composition of existing atomic lar, they may stand alone in terms of op- services (this is done by applying theo- eration and profitability as well as pro- rem proving in LL). During the theorem vide adds-on to core services. It is impor- proving the Theorem Prover may inter- tant to mention that value-added services act with the Semantic Reasoner. As a may allow different their combination and result of this interaction the Semantic they may provide incremental extension of Reasoner may provide extensions of the core services. For example, in online shop- set of extralogical axioms via performing ping, the core services range from prod- subtyping inference using Ontology Base. uct search, ordering, payment and ship- New axioms are asserted into the Theo- ment. However, some other services, such rem Prover as logical implications. If the as currency exchange, measurement con- sequent corresponding to the requested verter and language translation can also composite service has been proven and be required in a case when the core ser- the proof is generated then a process cal- vices cannot meet the users’ requests ex- culus presentation is extracted from the actly. Usually these value-added services proof directly. The last step is the con- are not designed for a particular core ser- struction of flow models - the process vice but they rather extend abilities of calculus is translated either to DAML-S core services or, in other words, add value ServiceModel or BPEL4WS upon the re- to the core services. quest. During the composition and execu- tion processes, the user is able to monitor As a working example we consider a ski and control the system via GUI. selling Web service. In this case the core service receives characteristics of a pair of skis (such as, length, brand, model etc) as 3 Motivating example input and provides prices, availability and other requested characteristics as output. We assume that a user would like to use We consider how our service composition this service but there are gaps between method can be applied to the composition the user’s requirements and the function- of value-added services. Value-added ser- alities the service provides. vices differ from core services—they are not a part of core services but act as com- The differences could exist, for example, plements to the core services. In particu- in the following details:

4 • the user would like to receive prices in a • USD2NOK —given price in USD pro- local currency (for example, in Norwe- vides price in NOK; gian Crowns), however, the service pro- • inch2cm—given length in inches pro- vides price in US Dollars only; videslengthincm; • the user would like to use centimeters as • NOK2USD—given price in NOK pro- length measurement units but the ser- vides price in USD; vice uses inches; • kg2lb—given weight in kg provides • the user does not know what ski length weight in pounds; or model are needed and s/he would like • lb2kg—given weight in pounds provides that this can be calculated from his/her weight in kg. height and weight; • the user does not know which brand is The core service and some available value- most suitable and s/he would like to get added services are depicted respectively a recommendation from a Web service. in Fig. 2 and Fig. 3. A required service is presented in Fig. 4. The structure of a so- Here we illustrate a case where only func- lution for the required service is presented tionality attributes are considered (ba- in Fig. 5. sically, input and output of a service). LENGTH_INCH However, our method works with non- BRAND selectSkis PRICE_USD MODEL functional attributes as well and this will be considered in the later Sections. Fig. 2. The core service for buying skis. PRICE_LIMIT selectBrand BRAND SKILL_LEVEL We assume that the user provides the HEIGHT_CM MODEL selectModel body height measured in centimeters WEIGHT_KG LENGTH_CM (cm), the body weight measured in kilo- LENGTH_CM cm2inch LENGTH_INCH grams (kg), his/her skill level and the price limit. The user would like to get PRICE_USDUSD2NOK PRICE_NOK a price of recommended pair of skis in Norwegian Crowns (NOK). Fig. 3. Some available value-added services. HEIGHT_CM WEIGHT_KG PRICE_NOK ThecoreserviceselectSkis accepts the ski SKILL_LEVEL length measured in inches, ski brand, ski PRICE_LIMIT model and gives the ski price in US Dollars Fig. 4. The required service for buying skis. (USD). We would like to mention that our work- Some available value-added services are as ing example is intentionally made simpler follows : than it is required for practical cases. This has been done in order to keep simplicity • selectBrand—given a price limit and a of presentation. In practice there can be skill level, provides a brand; more value-added services available and • selectModel—given body height in cm more parameters for the core service (in and body weight in kg, provides ski particular, there may exist many other length in cm and a model; converters for currency, measurements • cm2inch—given length in cm provides and other units), and the user may not al- length in inches; ways be able to find a solution intuitively.

5 PRICE_LIMIT selectBrand BRAND SKILL_LEVEL HEIGHT_CM MODEL selectSkis PRICE_USD USD2NOK PRICE_NOK selectModel WEIGHT_KG LENGTH_CM cm2inch LENGTH_INCH

Fig. 5. The final service structure for buying skis.

In addition, it may also be beyond the service. The information provided by user’s ability searching a huge amount ServiceProfile consists of three parts: of available value-added services to find information about the providers, in- all possible solutions. In particular, if the formation about functionalities and set of possible solutions consists of all information about non-functional at- existing converters to all inputs and out- tributes. In [5], the authors give def- puts of all Web services (both core and initions of functionality and non- value added), this may cause big over- functional attributes that are used to head in service provision. Taking this into specify the service profile in DAML- account, we think that automatic compo- S. The service functionalities are the sition would be an efficient and practical declarative specification of computa- solution in this case. tional ability of a Web service. They include the service’s input param- eters, output parameters, precondi- tions, effects and exceptions. The non- 4 Background functional attributes are other prop- erties than functionalities that can be used to describe a service (for example, 4.1 Semantic Web services’ languages price, location, quality of the service). ServiceGrounding: The ServiceGround- ing provides information on service DAML-S (also called OWL-S in the execution. It can be regarded as the most recent versions) is a Web service DAML presentation of WSDL. description language built on top of ServiceModel: The ServiceModel con- DAML+OIL [1] and OWL [12] which ceives each service as either an atomic are W3C recommendation for Seman- or composite process. The process of a tic Web markup languages. Enabled by composite service specifies control con- the Semantic Web technology, DAML-S structs of included atomic or compos- allows to present semantically enriched ite services together with control and datatypes than WSDL which employs data flow between the included services. XSD as the canonical type system. There- In particular, the ServiceModel includes fore, DAML-S can be considered as a step a dataflow model which indicates how towards automatic matching and compo- messages are transferred from one ser- sition of services by semantic description, vice to other services. if compared with WSDL.

A description of Web services in DAML-S A significant drawback of DAML-S is that includes the following three parts. there is no platform to support execution of the process model specified by Service- ServiceProfile: The ServiceProfile is Model. An alternative way of specifica- used for advertising and discovering the tion of the process model is BPEL4WS.

6 BPEL4WS is essentially a process model- LL is not the first attempt to develop ing language proposed by industry. It is resource-oriented logics (well-known ex- designed to enable aggregation of one or amples are [13] and Lam- more Web services into an execution of a bek calculus [19]), it is by now one of the single composite Web service. most investigated ones. Since its introduc- tion LL has enjoyed increasing attention Composite services in BPEL4WS are from researchers in both and modeled as directed graphs where the computer science. Therefore, because of nodes are services and the edges represent its maturity and well-developed seman- a dependency link from one service to an- tics, LL is useful as a declarative language other. Canonic programming constructs and inference system. (such as, SWITCH, WHILE and PICK) allow properties of inter-service messages The syntax of the LL fragment that we use to direct an execution path through the in this paper is presented by the following graph. BPEL4WS also contains references grammar: to port types of WSDL documents. An expressiveness of service behavior and its inputs/outputs are constrained by XML and XML schema. A ::= P |A  A|A ⊗ A|A ⊕ A|!A|1.

Because of the DAML-S service is grounded by WSDL, we can also regard BPEL4WS Here, P stands for a propositional vari- as the grounding of DAML-S Service- able and A ranges over formulae. The logic Model. Although DAML-S ServiceModel fragment consists of multiplicative con- and BPEL4WS are very similar, they junction ⊗, additive disjunction ⊕, lin- are not completely intertranslatable [27]. ear implication  and “of course” (!) op- In the section 5, we propose an upper- erator. In terms of resource acquisition ontology for the process model. The the logical expression A ⊗ B  C ⊗ D upper-ontology is designed formally as a means that resources C and D are ob- process calculus and is compatible with tainable only if both A and B are avail- both BPEL4WS and DAML-S Service- able. Thus the connective ⊗ defines deter- Model. Thus the result of a proof can ministic relations between resources. Af- be translated either into BPEL4WS or ter literals A and B are consumed, liter- DAML-S ServiceModel upon the user’s als C and D are generated. In that way request. we can encode different behaviors of com- putations. The disjunction A ⊕ B defines that either A or B are consumed or gener- 4.2 Linear logic ated. It has the same function as the dis- junction in . The formula !A means that we can use or generate a lit- LL is a refinement of classical logic intro- eral A as much as we want—the amount of duced by J.-Y. Girard to provide a means the resource is unbounded. While in clas- for keeping track of “resources”—in LL sical logic literals may be copied by de- two copies of a formula A are distin- fault, in LL this has to be stated explicitly. guished from a single copy of A. Although The unit 1 presents a trivial goal which

7 Table 1 Inference rules for our LL fragment. Logical axiom and Cut rule: Γ  A Γ ,A ∆ (Cut) A  A (Id) Γ, Γ  ∆

Rules for propositional constants: Γ  A  1 Γ, 1  A Γ,A,B  C Γ  A Γ  B ⊗ (L⊗) (R ) Γ,A⊗ B  C Γ, Γ  A ⊗ B   Γ,A B Γ A B (Shift) (R ) Γ,A B Γ  A  B Γ,A ∆Γ,B  ∆   (L⊕) Γ A (R⊕)(a) Γ B (R⊕)(b) Γ,A⊕ B  ∆ Γ  A ⊕ B Γ  A ⊕ B

Rules for exponential !:  Γ,A ∆ Γ, !A, !A  ∆ Γ ∆ (W !) (L!) (C!) Γ, !A  ∆ Γ, !A  ∆ Γ, !A  ∆ requires no resources. The inference rules price, time and the size of cache. of this fragment are presented in Table 1. (2) The “of course” modality enables us to distinguish two aspects of the ser- An intuitionistic LL sequent is divided vice functionalities: the information into two parts by  symbol. We call the transformation and the state change formula at the left side as “resource”, triggered by the execution of the ser- and the formula at the right side is called vice. The information transforma- “goal”. Ignoring unrestricted hypothe- tion is presented by the input/output sis for the moment, a LL sequent can parameters. We assume that infor- be explained as follows: the goal can be mation is reusable, thus the input achieved by consuming the resource. values are not consumed after the execution of a service. Reusability is Comparing to classical logic, LL provides determined by using the “of course” more expressive power and therefore, al- modality. Contrarily, the states of lows us to represent more features. In gen- the world are changed by service ex- eral, LL provides us with the following fea- ecution. We interpret the change as tures for presenting useful properties of follows: the old states are consumed Web services that are hardly presented in and the new states are performed. other formalisms: Therefore, the state variables are presented by propositions without (1) Propositional LL enables us to “of course” modality. It means the present quantities of consumable state values can be consumed only resources in Web services, such as once. In addition, the inference rules

8 for the “of course” modality enable 5 Transformation from DAML-S us to duplicate information in a ex- profiles to LL axioms plicit way. The rules are similar to the weakening and contraction in classical logic. 5.1 The upper model of Web services and (3) LL has close connections with con- LL current processes that are founda- tions for modeling composite Web services. In particular, a translation Fig. 6 shows the upper ontology for the from proofs in LL into Milner’s π- declarative specification of a Web ser- calculus [30] has been extensively vice. The upper ontology can be used studied in [3, 29, 6]. For example, as a specification framework to present the multiplicative conjunction(⊗) either the request to the service or the can present the “composition” advertisement of an existing service. For in π-calculus; the disjunction(⊕) the existing service, we do not distinguish presents “choice”, and the “of the atomic service or composite service, course” modality(!) presents “repli- because we model an existing service as cation”. a black-box, therefore, the service pro- cess that denotes the internal control- and data-flow inside the composite ser- vice is not considered when selecting the service. The specification describes a ser- vice by functionalities and non-functional attributes. The functionalities include in- puts, outputs, preconditions, effects and exceptions. The non-functional attributes are classified into three categories: con- sumable quantitative attributes, qualita- tive constraints and qualitative results.

After the available services are specified Generally, a requirement to a compos- in the form of LL formulae and a re- ite Web service (including functionalities quested service is specified as a theorem and non-functional attributes) can be to be proven, we apply LL theorem prov- expressed by the following LL formula: ing to determine whether the requested servicecanbecomposed.Ifaproofofthe theorem exists then a composed service is (Γ , Γ ); ∆  ((I ⊗ P )  (O ⊗ F )⊕ E)⊗ ∆ extracted from the proof. The structure c v c r of the composed service reflects the struc- ture of the proof. Since the composed service is guaranteed to meet the specifi- where both Γc and Γv are sets of ex- cation, no further verification is needed. tralogical axioms representing available To make representation of formulae more value-added Web services and core ser- compact, we use the following abbrevia- vices respectively. ∆c is a conjunction of an a ⊗ ...⊗ a n> non-functional constraints. ∆ is a con- tion: =   ,for 0. r n junction of non-functional results. We

9 Class Class Class Consumable Qualitative Qualitative Quantitative Constraint Result Attribute

range range range

ObjectProperty ObjectProperty ObjectProperty hasConsumable hasQualitative hasQualitative Quantitative Constraint Result Attribute

domain

domain Class domain domain WebService domain

domain domain domain ObjectProperty ObjectProperty ObjectProperty ObjectProperty ObjectProperty hasEx- hasPre- Input Output hasEffect ception Condition subPropertyOf subPropertyOf range subPropertyOf subPropertyOf

ObjectProperty Class ObjectProperty DataTypePropery hasCond- Parameter Parameter Exception DataTypePropery Name ition Condition range range domain Name ObjectProperty Class Class domain Restricted domain Parameter Condition domain ObjectProperty To Description Description domain Condition ObjectProperty ReferTo

Fig. 6. The upper ontology for Web service declarative specification. will distinguish these two concepts later. 5.2 Transformation of functionalities I ⊗ P  (O ⊗ F ) ⊕ E is a function- ality description of the required service. Both I and O are multiplicative conjunc- The functionalities of a service include two tions of literals with “of course” modality. parts: the information transformation and I represents a set of input parameters the state change produced by the execu- for the service and O represents output tion of the service. The information trans- parameters produced by the service. P formation is represented as a transforma- and F are multiplicative conjunction of tion from the input parameters required preconditions and effects respectively. E by the service to the output parameters presents an exception. Intuitively, the for- produced by the service. It provides in- mula can be explained as follows: given formation of data flow during the execu- a set of available atomic services and tion of a Web service. The state change non-functional attributes, try to find a provides information about what the Web combination of services that computes service actually does and how execution of O from I as well as changes the world the Web service changes the states of the state from P to F . If the execution of environment. It is modeled as the trans- the service fails, an exception is thrown. formation from the preconditions to the Every element in Γc and Γv is in form effects. A typical example is a service for ∆c  ((I ⊗ P )  (O ⊗ F ) ⊕ E) ⊗ ∆r, logging into a Web site. The input infor- where meanings of ∆c,∆r, I, P , O, F mation is the username and password, and and E are the same as described above. the output is a confirmation message. Af- ter the execution, the world state changes

10 from “not logged in” to “logged in”. The The states are described by a “Condi- “logged in” state will be kept until the tionDescription” class that has two parts: “log out” service is invoked. “conditionName” and “condition”. “con- dition” refers to a DAML class defining We use the “log in” service as an example the meaning of a state value. For the to elaborate the process about the trans- state variables, we translate the URI in formation of service functionalities. The “condition” to a LL proposition directly. example DAML-S code is shown in Fig. 7. From the computation point of view, this The code is consistent with the upper on- service requires two input parameters tology shown in Fig. 6. The inputs and that are of types “onto#Username”and outputs are subproperties of “Parameter” “onto#Password” respectively and pro- property that ranges over the instance of duces an output that has type class “ParameterDescription”. This class “onto#LoginOk”. Before the service is ex- has three fields. “parameterName” is the ecuted, the user can not have been logged name of the actual parameter, which into the Web site. After the successful ex- is presented by a string. “restrictedTo” ecution of the service, the state changes points to a DAML class as the type of from “NotLoggedIn” to “LoggedIn”. The the parameter. “refersTo” refers to the result LL axiom is shown as follows: parameter’s port defined in DAML-S Ser- viceModel. When translating a specifica-  !onto#Username(model#User) ⊗ tion parameter, either input or output, !onto#P assword(model#P asswd) ⊗ we take the “restrictedTo” and “referTo” onto NotLoggedIn  field. For example, the input “UserName” # service#Login ⊗ is presented as follows (here we use entity !onto#LoginOk(model#LoginOk) types as a shorthand for URIs). onto#LoggedIn

!onto#Username(mode#User) 5.3 Non-functional attributes The value of “restrictedTo” property is translated into a LL proposition and the Non-Functional attributes are useful in value of “referTo” is translated into a evaluating and selecting services when proof term which identifies the proposi- there are several services having the same tion. The proof term in the parentheses is functionalities. In service presentation, used to guarantee the proposition (which the non-functional attributes are speci- is introduced during the reasoning pro- fied as results and constraints. We clas- cess) is not used outside the proposition’s sify the non-functional attributes into the scope. In terms of program, it means that following three categories: the proof term is a program of type that is restricted by the proposition. The “of • Consumable Quantitative At- course” operator ! in front of the proposi- tributes: These attributes limit the tion indicates an information parameter amount of resources that can be con- that can be duplicated. sumed by the composite service. The

11 Log_into_A_Web_site

This service enables the user to log into a Web site by username and password

UserName PassWord Login_Confirmation

Not_Logged_In_State Logged_In_State Fig. 7. An example DAML-S ServiceProfile for “Login” service.

12 total amount of resources is the sum 5.4 Example with functionality and non- of all resources of atomic services that functional attributes form the composite service. For exam- ple, the price of composite service is the sum of prices for all included atomic Here, we illustrate the LL presenta- services. This kind of attribute includes tion of our example taking both func- total cost, total execution time, etc. tionalities and non-functional attributes • Qualitative Constraints: Attributes into consideration. The services have which can not be expressed by quan- been introduced in Section 3. For the tities are called qualitative attributes. sake of readability, we use abbrevia- Qualitative Constraints are qualitative tions to represent the propositions. Here, attributes which specify requirements PL,SL,BR,MO,HC,WK,LC,LI, to execution of a Web service. For exam- PU and PN stand for PRICE LIMIT, ple, some services may response only to SKILL LEVEL, BRAND, MODEL, some authorized calls. The constraints HEIGHT CM, WEIGHT KG, are regarded as prerequisite resource in LENGTH CM, LENGTH IN, PRICE USD LL. and PRICE NOK respectively. • Qualitative Results: Another kind of qualitative attributes (such as service The available services, both value-added type, service provider or geographical and core services, are specified as follows: location) specify the results regarding the services’ context. These attributes 10 can be regarded as goals in LL. NOK PL ⊗ SL selectBrand BR

HC ⊗ WK selectModel LC ⊗ MO Γ = 20 The different categories of non-functional NOK LC cm2inch LI attributes have different presentation in CA MICORSOFT PU USD2NOK PN extralogical axioms. As it was mentioned LI ⊗ BR ⊗ MO selectSki PU ⊗ LOC NORWAY before, the non-functional attributes can be described either as constraints or re- sults and they can be presented as follows: NOK10 means that 10 NOK are con- sumed by executing the service. The ser- • The constraints for the service: vice cm2inch costs20NOK.Itisalso specified that the currency exchange ser- vice USD2NOK only responses to the x execution requests that have been certifi- ∆1 = Consumable ⊗!Constraint cated by Microsoft. The selectSki service is located in Norway. For other attributes • The results produced by the ser- which are not specified in service descrip- vice: tion, the values are not considered. It is ∆2 =!Fact possible that more advanced treatment of numeric values may require some other According to the definition of LL, the vari- solutions, for example, extra-logical ora- able x ranges over positive integer. How- cles. However, at the moment we try to ever, the type is supposed to be extended use LL expressive power as much as pos- by revising the LL interpreter. sible in order to keep conceptual purity of

13 the method. the requirement. However, if there is no such literal in the service description, the The required composite service is specified constraint is not applied to this service at by the following formula: all.

We have discussed how DAML-S Servi- (Γ); ∆ (PL ⊗ SL ⊗ HC ⊗ WK  PN ) ⊗ ∆ 1 2 ceProfile can be translated into extralog- ical axioms. The next steps are theorem proving in LL and derivation of the pro- The constraints for the composite service cess model from proof of the requested are as follows: composite service. If it has been proven that the requested composite service can be generated using available services and inference rules then the process model can 35 ∆1 = NOK ⊗!CA MICROSOFT be extracted from the proof. A resulting

∆2 =!LOC NORWAY dataflow of the selected atomic services can also be presented to the user for in- spection via GUI component. They mean that we would like to spend at most 35 NOK for the composite service. The composite service con- 5.5 Extraction of a process model from sumer has certification from Microsoft proof (!CA MICROSOFT) and it requires that all location-aware services are located within Norway (!LOC NORWAY ).!sym- We use process calculus for presentation bol describes that we allow unbounded of process model. The process model is ex- number of atomic services in the com- tracted from the proof generated by the posite service. We consider quantitative LL Theorem Prover and it presents a com- constraints (for example, price) as regu- posed service corresponding to the user lar resources in LL. If the total number request. of resources required by services (which The process calculus is built from the is determined by functionality attributes) is less than or equal to the number of operators of inaction, input prefix, out- available resources, the services can be in- put prefix, parallel composition, global cluded into composite service. Otherwise, choice and restriction. The process cal- if, for example, the selectBrand service culus grammar is as follows (where the would require 20 NOK for execution then names starting with small letters range the total required amount would be 40 from messages to variables, and the names NOK and the composition is not valid. starting with capital letter range refer to a set of processes): For the qualitative constraints (for exam- ple, location), the service uses a literal (for           example, LOC NORWAY )topresentits P ::= 0  a(x).P  ax.P  P |P  P + P  (νa)P value, and we can determine in the set of requirements ∆1 whether a service meets

14 We explain meaning of the operators π-calculus has been taken up formally by in terms of BPEL4WS. 0 is the inac- Abramsky [3]. Abramsky’s view is essen- tive process which is “empty” activity tially a modification of the formulae-as- in BPEL4WS. An input prefixed process types (Curry-Howard) isomorphism. In- a(x).P receives a variable or message x stead of proofs being functions presented through channel a then executes process by λ-calculus, Abramsky views proofs as P . This operation equals to the “receive” processes (e.g. π-calculus or CCS terms). action in BPEL4WS. An output ax.P Abramsky’s view is to transfer the propo- emits message x at channel a. This is the sitions as types paradigm to concurrency, “reply” action in BPEL4WS. The restric- so that concurrent processes, rather than tion (νa)P defines a name a local to P. functional programs, become the com- This is similar to the local variable inside putational counterparts of proofs. The the BPEL4WS process. For the rest op- key observation of this view is that the erations, . is a sequence, | is a “flow”, + cut-elimination in deductive inference is is a “switch”. modeled by the construction of a channel for the communication along two ports in The process calculus is built based on the process-calculi world. idea of π-calculus [30]. The π-calculusisa powerful model of concurrency, which can The Abramsky translation between rules be used to design communication-based of a fragment of LL and π-calculus trans- programming languages. It is widely used lation is further discussed by Bellin and for modeling the composite Web services. Scott [6]. In their paper, the authors give One recent example is the XLANG lan- a detailed treatment of information flow guage proposed by Microsoft [36]. This in proof-nets and show how to mirror language is explicitly build on a model various evaluation strategies for proof from the π-calculus. The most popular normalization. The authors also give process languages, such as BPEL4WS soundness and completeness results for and DAML-S ServiceModel, can be also the process-calculus translations of the easily adapted to π-calculus, although LL fragment. Bellin and Scott’s trans- they do not announce π-calculus as their lation is based on one-sided sequents in formal foundation. Classical Linear Logic(CLL), while the service presentation in this paper is based At conceptual level the process calcu- on Intuitionistic Linear Logic. Consider- lus is specified by the upper-ontology ing this, we make some modification for shown in Fig. 8. The multiple processes Abramsky’s translation to fit our presen- are collected by programming constructs, tation. We summarize the inference rules such as “sequence”, “choice”, “split” and with the attached proof terms in Table 2. “loop”. Each process has a set of activ- ities. Some activities, for instance “As- The Web services composition problem sign”, “Reply” and “Receive” can copy in the context of process calculus is pre- the data among the input, output and sented by three parts including an output internal variables. The “Invoke” activity channel process, an input channel process invokes a process. and the local variables. We consider an example where a service P outputs the The connection between LL proof and result through channel a, and then the

15 Class ObjectProperty Control Activity range hasControl subClassOf

subClassOf domain Class Class subClassOf subClassOf Class range sequence split Process domain ObjectProperty

Class Class invoking choice loop domain toClass ObjectProperty toClass toClass toClass Class collection hasActivity Invoke

range ObjectProperty hasPort domain Class subClassOf Basic range subClassOf Activity Class subClassOf

subClassOf Port subClassOf subClassOf Class Class Class subClassOf Assign Reply Receive

Class Class Class domaindomain domain domain domain domain Input Output Variable

range from to from to from to range range range range range

Fig. 8. The upper ontology for the flow model. result is passed to channel b that is an cess:sameValues” in DAML-S data flow. input channel of service Q. The process is Both of them use a set to connect one out- presented as follows: put parameter a of a service P with one input parameter b of another service Q.

(νx)(P.a¯x.b(x).Q) 5.6 An example proof This process is equal to a sequence of “re- ceive”, “copy” and “reply” operations in BPEL4WS. Thus the process calculus can In this section we show an example about be translated into BPEL4WS directly. how the process is generated from the ser- vice presentation. For the proof is clear When thinking about the abstract process and more readable, we consider only the model, the local variables can be assigned dataflow (input/output parameters) and to arbitrary name. Thus the above process we remove the “of course” operators, but can be also simplified as: the proving process is still after introduc- ing other attributes.

P.ab.Q¯ Applied to our motivating example, the predefined axioms and the theorem to Such presentation is close to a business be proven can be presented as follows. process contract in XLANG, or a “pro- The meaning of each service has been in-

16 Table 2 Inference rules for process extraction.

Logical axiom and Cut rule: Γ  P : A(a1)Γ,A(a2)  Q : C (Cut) A(x)  0:A(x)(Id) Γ, Γ  (P.a1a2.Q):C

Rules for propositional constants: Γ  A  1 Γ, 1  A  Γ  P : A(a)Γ Q : B(b) Γ,A(a),B(b) P : C ⊗ (L⊗) (R ) Γ, (A ⊗ B)(a, b)  P : C Γ, Γ  (P |Q):(A ⊗ B)(a, b) Γ  A(a)  B(b) Γ,A(a)  P : B(b) P   (Shift)   (R ) Γ,A(a) P : B(b) Γ A a.P.b B Γ,A(a)  P : C(c1)Γ,B(b)  Q : C(c2) (L⊕) Γ, (A ⊕ B)(a + b)  (P + Q):C(c1 + c2) Γ  P : A(a) Γ  Q : B(b) (R⊕)(a) (R⊕)(b) Γ  P :(A ⊕ B)(a) Γ  Q :(A ⊕ B)(b)

Rules for exponential !:  Γ,A(a)  ∆ Γ, !A(a), !A(a)  ∆ Γ ∆ (W !) (L!) (C!) Γ, !A(0)  ∆ Γ, !A(a)  ∆ Γ, !A(a)  ∆

Structural congruence for a process calculus: P |Q ≡ Q|PP+ Q ≡ Q + P (P |Q)|R ≡ P |(Q|R)(P + Q)+R ≡ P +(Q + R) P ≡ P |0 ≡ P + 0 ≡ P.0 ≡ 0.P A(a) ⊗ B(b) ≡ A ⊗ B(a, b)

(a1,a2,...,an)(b1,b2,...,bn) ≡ (a1b1, a2b2,...,anbn) troduced in Section 3 and illustrated in Fig. 2, 3 and 4 Using the inference rules from the Table 2 Axioms: the proof is shown as Fig. 9.

( ) ⊗ ( )  ( ) PL sbp SL sbs SelectBrand BR sbb The extracted process model is presented ( ) ⊗ ( ) ⊗ ( )  ( ) BR ssb MO ssm LI ssl SelectSki PU ssp as follows: HC(smh) ⊗ WK(smw) SelectModel MO(smm)⊗ LI(sml))

(sbp, sbs, smh, smw).(SelectModel|SelectBrand) ( ) Theorem . smmssm, smlssl, sbbssb .SelectSki.ssp

PL⊗ SL ⊗ HC ⊗ WK  PU

17 PL(sbp) ⊗ SL(sbs) SelectBrand BR(sbb) SelectModel :(HC(smh) ⊗ WK(smw)  MO(smm) ⊗ Lenght(sml)) Shift Shift PL(sbp) ⊗ SL(sbs) SelectBrand : BR(sbb) HC ⊗ WK(smh, smw) SelectModel : MO ⊗ Lenght(smm, sml) R⊗ PL⊗ SL ⊗ HC ⊗ WK(sbp, sbs, smh, smw) (SelectModel|SelectBrand):BR ⊗ MO ⊗ LI(sbb, smm, sml) (1) ...

BR(ssb) ⊗ MO(ssm) ⊗ LI(ssl) SelectSki PU(ssp) Shift BR(ssb) ⊗ MO(ssm) ⊗ LI(ssl) SelectSki : PU(ssp) Congruence BR ⊗ MO ⊗ LI(ssb, ssm, ssl) SelectSki : PU(ssp) cut with 1 PL⊗ SL ⊗ HC ⊗ WK(sbp, sbs, smh, smw) ((SelectModel|SelectBrand).(smm, sml, sbb)(ssm, ssl, ssb).SelectSki):PU(ssp) Congruence PL⊗ SL ⊗ HC ⊗ WK(sbp, sbs, smh, smw) ((SelectModel|SelectBrand).(smmssm, smlssl, sbbssb).SelectSki):PU(ssp)  ⊗ ⊗ ⊗  R PL SL HC WK (sbp,sbs,smh,smw).(SelectModel|SelectBrand).(smmssm,smlssl,sbbssb).SelectSki.ssp PU

Fig. 9. An example proof.

This process model can be directly trans- other service. Generally, if a type assigned lated into most models for describing to the output parameter of service A is a composite Web services. For example, a subtype of the type assigned to an input sketchy BPEL4WS sequence of the model parameter of service B, it is safe to trans- is as follows: fer data from the output to the input. In addition, if we consider non-functional at- tributes as well, the subtyping is used in the following two cases in the context of resources and goals in LL: 1) given a goal x of type T , it is safe to replace x by an- other goal y of type S,aslongasitholds that T is a subtype of S; 2) given a re- source x of type S, it is safe to replace x by another resource y of type T ,aslong as it holds that T is a subtype of S. Now we define rules for describing the subtyping behavior of the propositional variables. Basically, the rules are close to a fragment of the subtype behavior pre- sented by Markus Lumpe [22]. We extend the subtyping rules both for resources and goals. It should be also mentioned 6 Composition using semantic de- that the rules are not an extension to LL. scription Indeed, the subtyping rules are defined as certain inference figures in LL (see Ap- pendix A for exact definitions). In order So far, we considered only exact match of to emphasize that new inference rules are parameters of atomic services in composi- used for typing purposes (but not for se- tion process. However, in practice services quencing components) we shall write < could be connected together even if the to denote the subtype relations. output parameters of one service do not match exactly the input parameters of an- The subtype relation is transitive:

18 1a. Extralogical Axioms Linear Logic Subtyping transitivity: Service Translator Profile Theorem Prover

1 4 b. mI . Cla S ss p e es il m a ac nd t a Pr oi n op n it  T  S  S  U ert c < < ies Adapter  T < U 3 y R . g l e S lo e al u to d it b n o o yt O M n p . s e In addition, subtyping rules allow type 2 Semantic Ontology substitution. Reasoner Base

Resource subsumption: Fig. 10. A Candidate Interaction Mechanism U  S  T  U < service located within Norway meets such T  S requirement.

Here we assume that the ontology used Goal subsumption: by the service requesters and by the ser- vice providers are interoperable. Other- T  U  U < S T  S wise, the ontology integration should be done and this is beyond the scope of this paper. The subtyping rules can be applied ei- ther to functionality (parameters) or non- Subtype relationships between propo- functional attributes. sitional variables are discovered by the Semantic Reasoner. Since the proposi- We use the following two examples to illus- tional variables in the extralogical axioms trate the basic idea of subtype relations. are presented in the form of the URI to DAML classes and properties that are First, we show a simple case of how two built based on the resource definition of services with different types of parameters RDFS [9], the reasoner is required to are composed. Let us assume that the out- implement the transitive and symmet- put of the selectSki service is the price of ric properties of rdfs:subPropertyOf and skis presented in US Dollars, while the in- rdfs:subClassOf. Many available semantic put of USD2NOK is any amount of money reasoners, such as FaCT [17] or Jena [2] in US Dollars. Because the latter is more fulfill such requirements. general than the former, it is safe to trans- fer the more specific output to the more A general mechanism of interaction be- general input. tween the Semantic Reasoner and the Lin- ear Logic Theorem Prover has been pre- Another example considers the qualita- sented in Fig. 1. Several specific interac- tive facts. If an atomic service is located tion mechanisms can be designed accord- in Norway and since Norway is a Euro- ing to the general schema. Fig. 10 reveals pean country then it is safe to replace Nor- the a possible specific interaction process: way with Europe when matching inputs and outputs of services in a composition 1. When the translator reads the DAML- process. Intuitively, if the user requires a S documents for all available atomic ser- service that is located within Europe, the vices, it creates a set of all classes and

19 properties that are stored the DAML-S The LL Theorem Prover supports rea- documents. The classes and properties soning over Web service composition include both those defined inside the problems both in propositional and first- DAML-S document and those defined order LL. Although in this paper we de- by third-party but imported by the the scribed only how propositional LL could DAML-S document. be applied for Web service synthesis, 2. The Adapter translates the classes and we are prepared to take advantage of properties to an ontology model in the first-order representation of services as format that is recognized by the Seman- well. The prover can be downloaded from tic Reasoner. http://www.idi.ntnu.no/~peep/RAPS. 3. The Semantic Reasoner analyses the According to our experiment with the sys- ontology model and derives all subtype tem scale including thousands of literals, relations of the classes and properties in the performance is comparable to other the ontology model. AI planning languages. Some other LL 4. The Adapter translates the subtype re- theorem provers based on , such as lations to Linear Logic axioms. The ax- lolli [16] and lygon [38]. can be also used ioms are sent to the Linear Logic The- with small modifications. orem Prover. Basic GUI features of the prototype are The Adapter is designed to enable flexible depicted in Fig. 11. The interface of the interoperation between different Theorem required service is presented in the Ser- Provers and Semantic Reasoners. We are viceProfile panel (upper right) and the working on developing other specific in- dataflow of the component atomic ser- teraction mechanisms for the Adapter. In vices is presented in the ServiceModel particular, when the amount of the avail- panel (lower right). The screenshot in able classes and properties is huge, the Fig. 11 shows that the composed service Adapter may send axioms to the LL The- is combined from five atomic services. For orem Prover in small portions or by re- each Web service, the detailed informa- quest. tion of functionalities and non-functional attributes is displayed in the left hand side panel. The bottom panel demon- strates semantic relationships between 7Prototype parameters.

For the service composition system pre- sented in Fig. 1, we have implemented a 8 Related work prototype in Java. In the prototype, Jena (a Java framework for building Seman- tic Web applications) [2] is used to fa- Several methods for dynamic composition cilitate both the Translator and Seman- of Web services have been proposed in tic Reasoner. In particular, the Transi- recent years. Most of them fall into one tiveReasoner in Jena provides support for of the following two categories: methods storing and traversing class and property based on pre-defined workflow model and lattices as graph structures. methods based on AI planning.

20 Fig. 11. A screen shot.

For the methods in the first category, the process (plan) is generated automatically user should specify the workflow of the re- by AI planners without the knowledge of quired composite service, including both predefined workflow. nodes and the control flow and the data flow between the nodes. The nodes are re- Much work has been done on planning garded as abstract services that contain based on semantic description of Web ser- search recipes. The concrete services are vices. In [28], the authors adapt and ex- selected and bound at runtime according tend the Golog language for automatic to the search recipes. This approach is construction of Web services. Golog is a widely adopted by members of the Infor- language built on top mation Systems community (in particu- of the situation calculus. The authors ad- lar, see [10] and [32]). dress the Web service composition prob- lem through the provision of high-level The second category includes methods generic procedures and customizing con- related to AI planning. They are based straints. Golog is adopted as a natural on the assumption that each Web ser- formalism for representing and reasoning vice is an action which alters the state about this problem. of the world as a result of its execution. Since the services (actions) are software Waldinger [37] elaborates an idea for ser- components, the input and the output vice synthesis by theorem proving. The parameters of a service act as precondi- approach is based on automated deduc- tions and effects in the planning context. tion and program synthesis and has its If the user can specify inputs and out- roots to his earlier work [24]. Initially puts required by the composite service, a available services and user requirements

21 are described in a first-order language, re- Thus, if a new literal is inserted into the lated to classical logic, and then construc- world model, new piece of information tive proofs are generated with Snark will be available. Therefore, LL provides theorem prover. Finally, service compo- an elegant framework for modeling in- sition descriptions are extracted from complete knowledge—although before particular proofs. plan execution only partial knowledge is available, during execution more details L¨ammermann [20] takes advantage of dis- would be revealed. junctions in classical logic to describe ex- ceptions, which could be thrown during A strong interest to Web service synthe- service invocation. We take advantage of sis from AI planning community could be disjunctions for more general purpose— explained roughly by similarity between to represent mutually exclusive outputs of DAML-S and PDDL [26] representations. services, which could be both exceptions PDDL is widely recognized as a stan- as well as other results provided by the dardized input for state-of-the-art plan- services. ners. Moreover, since DAML-S has been strongly influenced by PDDL language, Usually in AI planning closed world as- mapping from one representation to an- sumption is made, meaning that if a lit- other is straightforward (as long as only eral does not exist in the current world, declarative information is considered). its truth value is considered to be false.In When planning for service composition is logic programming this approach is called needed, DAML-S descriptions could be as failure. The main trouble with translated to PDDL format. Then differ- the closed world assumption, from Web ent planners could be exploited for further service construction perspectives, is that service synthesis. merely with truth literals we cannot ex- press that new information has been ac- In [39] the SHOP2 planner is applied for quired. For instance, one might want to automatic composition of Web services, describe that after sending a message to which are provided with DAML-S descrip- another agent, an identity number to the tions. Another planner for automatic Web message will be generated. Thus during service construction is presented in [33]. later communication the ID could be used. Thakkar et al. [35] consider dynamic com- McDermott [26] considers this problem in position of Web services using a mediator AI planning in composing Web services. architecture. The mediator takes care of He introduces a new type of knowledge, user queries, generates wrappers around called value of an action, which persists information services and constructs a ser- and which is not treated as a truth literal. vice integration plan. However, while using resource-conscious logics, like LL or transition logic, this SWORD [31] is a developer toolkit problem is treated implicitly and there for building composite Web services. is no need to distinguish informative and SWORD does not deploy the emerg- truth values. Since LL is not based on ing service-description standards such truth values, we can view generated lit- as WSDL and DAML-S, instead, it uses erals as references to informative objects. Entity-Relation (ER) model to specify

22 the inputs and the outputs of Web ser- possibility to compose the required ser- vices. As a result, the reasoning is based vice from available atomic services. A on the entity and attribute information process model of the composed service is provided by an ER model. constructed automatically from a proof (if the proof exists). Further, the Seman- Sirin et al [34] present a semi-automatic tic Reasoner is exploited as an auxiliary method for Web service composition. component to relax the service matching Each time when a user has to select a Web process while selecting and connecting service, all possible services, that match atomic services. Finally, the result is pre- with the selected service, are presented sented to the user through a graphical to the user. The choice of the possible user interface. services is based both on functionalities and non-functional attributes. The func- We argue that LL theorem proving, com- tionalities (parameters) are presented by bined with semantic reasoning offers a OWL classes and OWL reasoner is ap- flexible approach to the successful com- plied to match the services. Afterward, position of value-added Web services. We the system filters the services based on also propose an architecture for auto- the non-functional attributes that are matic Semantic Web service composition. specified by the user as constraints. The non-functional settings of the sys- tems are discussed and techniques for The main difference between our method DAML-S presentation, LL presentation, and the above-mentioned methods is that and semantic reasoning are presented. we consider non-functional attributes A prototype implementation of the ap- during the planning. Usage of LL as a proach is done. reasoning language allows us formally define the non-functional characteristics One of the advantages of LL over classi- of Web services (in particular, quanti- cal logic is the richer set of connectives. tative attributes). We also distinguish In particular, the additive conjunction the constraints and facts in qualitative and disjunction of LL distinguish the attributes. They are treated differently internal choice and the external choice. while reasoning. The internal choice is enabled by additive conjunction &. An applicable example is adialogboxthatasksuserstochoose 9Conclusion “yes” or “no”. From the computational viewpoint, the dialog box service produce two outputs and user chooses one of them In this paper we describe an approach to would lead the process to follow different automatic Semantic Web service compo- branches. A typical external choice situa- sition. Our approach has been directed tion is that a service may produce one of to meet the two main challenges in ser- several alternative outputs every time it vice composition, namely, automated is executed. In particular, this is the case composition and semantic composition. with exception handling. In that case, the First, DAML-S service descriptions are output produced by the service depends automatically translated into LL axioms. on the execution environment only. None Next the LL Theorem Prover proves the of the existing Web service specification

23 languages supports internal choice, and, core service composition if the business therefore this issue is not usable in cur- model is given. rent stage. Therefore, we regard this an important branch of future development of Web service languages. References We use a propositional fragment of LL as the specification of Web Services. Al- [1] The DARPA Agent Markup though first-order LL should allow bet- Language homepage. Online: ter presentation of Web service properties, http://www.daml.org. it suffers from poor efficiency (also com- [2] Jena - semantic web frame- pleteness is not ensured). Before moving work for java. Online: to the first-order LL we would like to gain http://jena.sourceforge.net. experience in practical usage of proposi- [3] S. Abramsky. Proofs as pro- tional LL and better understand its niche cesses. Theoretical Computer Sci- in the whole Web service composition pro- ence, 135(1):5–9, 1994. cess. [4] Tony Andrews et al. Business Pro- cess Execution Language for Web Our other strand of future work is directed Services (BPEL4WS) 1.1, May 2003. towards improving the efficiency of both [5] Anupriya Ankolekar and DAML- the LL Theorem Prover and the Seman- S Coalition. DAML-S: Semantic tic Reasoner. Usually, the amount of the markup for web serivces. In Pro- available services and the size of ontology ceedings of the International Seman- models are huge. Therefore it is necessary tic Web Workshop, 2001. to reduce the search space during problem [6] G. Bellin and P. J. Scott. On the pi- solving. calculus and linear logic. Theoreti- cal Computer Science, 135(1):11–65, There are also some extensions of the cur- 1994. rent composition method that have been [7] Tom Bellwood et al. Univer- under consideration. First, our experi- sal Description, Discovery and In- ence with the Web service composition tegration specification (UDDI) 3.0. shows that users are not always able to Online: http://uddi.org/pubs/uddi- completely specify the requirement of the v3.00-published-20020719.htm. composite service. We consider to apply [8] Don Box et al. Simple Object Ac- the principle of partial deduction [21] to cess Protocol (SOAP) 1.1. Online: provide more flexibility to the user. Some http://www.w3.org/TR/SOAP/, initiate results about using partial deduc- 2001. tion and symbolic negotiation for Web [9] Dan Brickley and R. V. Guha. service composition based on a multi- RDF Vocabulary Description Lan- agent architecture have been reported guage 1.0: RDF Schema. On- in [18]. Second, the composition of core line: http://www.w3.org/TR/rdf- services usually needs some business mod- schema/. els to specify the relationship between [10] Fabio Casati, Ski Ilnicki, and Li- multiple core services. The method pre- Jie Jin. Adaptive and dynamic ser- sented in the paper is to be extended for vice composition in EFlow. In Pro-

24 ceedings of 12th Int. Conference on ics of semtence struture. American Advanced Information Systems En- Mathematical Monthly, 65(3):154– gineering(CAiSE),Stockholm,Swe- 170, 1958. den, June 2000. Springer Verlag. [20] Sven L¨ammermann. Runtime Service [11] Roberto Chinnici et al. Web Composition via Logic-Based Pro- Services Description Lan- gram Synthesis. PhD thesis, Depart- guage (WSDL) 1.2. Online: ment of Microelectronics and Infor- http://www.w3.org/TR/wsdl/. mation Technology, Royal Institute [12] M. Dean et al. OWL Web Ontol- of Technology, Stockholm, 2002. ogy Language 1.0 reference. Online: [21] J. W. Lloyd and J. C. Shepherdson. http://www.w3.org/TR/owl-ref/, Partial evaluation in logic program- July 2002. ming. Jornal of Logic Programming, [13] J. M. Dunn. Handbook of Philosoph- 11:217–242, 1991. ical Logic, volume III, chapter Rel- [22] Markus Lumpe. A Pi-Calculus Based evance logic and entailment, pages Approach for Software Composition. 117–224. D. reidel Publishing Com- PhD thesis, Institute of Computer pany, 1986. and Applied Mathematics, Univer- [14] J.-Y. Girard. Linear logic. Theo- sity of Bern, 1999. retical Computer Science, 50:1–102, [23] Z. Manna and R. Waldinger. Fun- 1987. damentals of deductive program syn- [15] Benjamin N. Grosof, Ian Horrocks, thesis. IEEE Transactions on Soft- Raphael Volz, and Stefan Decker. De- ware Engineering, 18(8):674–704, scription logic programs: Combining 1992. logic programs with . [24] Zohar Manna and Richard J. In The 12th International Conference Waldinger. A deductive approach on the World Wide Web (WWW- to program synthesis. ACM Trans- 2003, Budapest, Hungary, 2003. actions on Programming Languages [16] J.S. Hodas and D. Miller. Logic pro- and Systems, 2(1):90–121, 1980. gramming in a fragment of intuition- [25] David Martin et al. DAML-S(and istic Linear Logic. Information and OWL-S) 0.9 draft release. Online: Computation, 110(2):327–365, 1994. http://www.daml.org/services/daml- [17] I. Horrocks, U. Sattler, S. Tessaris, s/0.9/, May 2003. and S. Tobies. How to decide query [26] Drew McDermott. Estimated- containment under constraints us- regression planning for interaction ing a description logic. In Proc. of with web services. In Proceed- LPAR’2000, 2000. ings of the 6th International Confer- [18] Peep K¨ungas, Jinghai Rao, and Mi- ence on AI Planning and Scheduling, hhail Matskin. Symbolic agent ne- Toulouse, France, April 23–27, 2002. gotiation for semantic web service AAAI Press, 2002. exploitation. In Proceedings of the [27] Sheila McIlraith and Dan Man- Fifth International Conference on dell. Comparison of DAML-S and Web-Age Information Management, BPEL4WS. Knowledge Systems WAIM’2004, Dalian, China, July Lab, Stanford University, September 2004. Springer-Verlag. 2002. [19] Joachim Lambek. The mathemat- [28] Sheila McIlraith and Tran Cao Son.

25 Adapting golog for composition of ICEIS2003, 2002. semantic web services. In Proceed- [35] Snehal Thakkar, Craig A. Knoblock, ings of the Eighth International Con- Jose Luis Ambite, and Cyrus Sha- ference on Knowledge Representation habi. Dynamically composing web and Reasoning(KR2002),Toulouse, services from on-line sources. In Pro- France, April 2002. ceeding of 2002 AAAI Workshop on [29] Dale Miller. The π-calculus as a the- Intelligent Service Integration, Ed- ory in linear logic: Preliminary re- monton, Alberta, Canada, 2002. sults. In E. Lamma and P. Mello, ed- [36] Satish Thatte. XLANG: Web ser- itors, Proceedings of the 1992 Work- vices for business process design. shop on Extensions to Logic Program- [37] Richard Waldinger. Web agents ming, number 660 in LNCS, pages cooperating deductively. In Pro- 242–265. Springer-Verlag, 1993. ceedings of FAABS 2000, Greenbelt, [30] Robin Milner. The ployadic pi- MD, USA, April 5–7, 2000,volume calculus: a tutorial. Technical re- 1871 of Lecture Notes in Computer port, Laboratory for Foundations of Science, pages 250–262. Springer- Computer Science, University of Ed- Verlag, 2001. inburgh, October 1991. [38] M. Winikoff and J. Harland. Imple- [31] Shankar R. Ponnekanti and Ar- menting the Linear Logic program- mando Fox. SWORD: A devel- ming language Lygon. In Proceedings oper toolkit for web service compo- of the International Logic Program- sition. In The Eleventh World Wide ming Symposium, pages 66–80, De- Web Conference, Honolulu, HI, USA, cember 1995. 2002. [39] D. Wu, B. Parsia, E. Sirin, [32] H. Schuster, D. Georgakopoulos, J. Hendler, and D. Nau. Automating A. Cichocki, and D. Baker. Mod- DAML-S web services composition eling and composing service-based using SHOP2. In Proceedings of the and reference processbased multi- 2nd International Semantic Web enterprise processes. In Proceed- Conference, ISWC 2003, Sanibel Is- ing of 12th Int. Conference on Ad- land, Florida, USA, October 20–23, vanced Information Systems Engi- 2003, 2003. neering (CAiSE),Stockholm,Swe- den, June 2000. Springer Verlag. [33] M. Sheshagiri, M. desJardins, and T. Finin. A planner for compos- ing services described in DAML-S. In Proceedings of the AAMAS Work- shop on Web Services and Agent- A Proofs for subtyping rules based Engineering, 2003. [34] Evren Sirin, James Hendler, and Bi- jan Parsia. Semi-automatic compo- Subtyping transitivity: sition of web services using semantic descriptions. In Web Services: Mod- Id Id S S U U L  eling, Architecture and Infrastruc- Γ S  U S, S  U U Cut ture” workshop in conjunction with Γ,S U (A.1)

26 ... Id Id T T S S L  Σ T  S T,T  S S Cut Σ,T S Cut with A.1 Σ, Γ,T U R  Σ, Γ T  U

Goal subsumption:

Id Id T T S S L  Γ T  S T,T  S S Cut Σ T Γ,T S Cut Σ, Γ S

Resource subsumption:

Id Id T T S S L  Γ T  S T,T  S S Cut Γ,T S Σ,S G Cut Σ, Γ,T G

B Additional inference figures

Inference figure Shift is defined in the fol- lowing way:

Id Id A A B B Axiom L  C A  B A, A  B B Cut C ⊗ A B

27