<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Measuring similarity of service interfaces</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ali A¨ıt-Bachir?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Supervised by Pr. Marie-Christine Fauvet University of Grenoble</institution>
          ,
          <addr-line>LIG (MRIM) 385 rue de la bibliotheque - B.P. 53 38041 Grenoble Cedex 9</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we present a similarity measure between behavioural interfaces of Web services. This measure computes the difference value of simulation between two service interfaces. In our previous work we implemented an algorithm to detect the exact location of differences between service interfaces in a tool namely BESERIAL [1]. The similarity measure is based on the results of the detection algorithm. In our case study, this measure is used to select the most suitable service to substitute a previous one, which is no longer available at design time.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>This paper is structured as follows. First, Section 2 introduces the running
example. Section 3 gives details on the quantitative simulation measure.
Section 4 shows some experimental results. Then, Section 5 gives a panel of the
related work on the diagnosis of differences in service interfaces. Finally,
Section 6 concludes and sketches the future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Case study</title>
      <p>As a running example, we consider a scenario where a car factory interacts
with one of its provider of goods and services. The service provider describes
its operations in WSDL and the control flow is established using BPEL process
protocol. Figure 1 (a) illustrates the activity diagram of the provided interface
of the provider service. This provider processes service and goods orders from
the car factory. The provider receives a service order which can be updated
by its client (the car factory) only if the invoice is not sent yet (see the flow
which loops back to the ReceiveServiceOrder activity). Once the service invoice
is sent, the provider waits for the transfer from the client to finally send him
the ShipmentTrackingNumber (STN). On the other hand, when a GoodsOrder is
received, a GoodsInvoice is immediately sent to the client. This former can either
send his CreditCardDetails, to pay the invoice, or update his order by sending
a new GoodsOrder (see the flow which loops back to the ReceiveGoodsOrder
activity). The client pays the invoice, and then the provider sends him the STN.</p>
      <p>If the service provider is no more available, the car factory will send an
invitation to tender to substitute the old provider and all candidates will provide
their behavioural interfaces. The selection criterion is that the provided interface
of the new partner must conform as much as possible to the required interface
by the car company. In other words, the new provider is such as there exists a
minimum number of changes in the new provided interface in order to simulate
the old provided interface.</p>
      <p>Receive
GoodsOrder
GoodSseInndvoice</p>
      <p>Fig. 1. Activity diagram and FSM of the provided interface.</p>
    </sec>
    <sec id="sec-3">
      <title>Quantitative simulation</title>
      <p>
        FSM modeling: In our approach we model the behaviour of a Web service
interface using Finite State Machines [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Techniques exist to transform
behavioral service interfaces defined in other languages (e.g. BPEL) into FSMs(see
for example the WS-Engineer tool [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]). In the FSMs considered in this paper,
transitions are labelled with messages to be exchanged. When a message is sent
or received, the corresponding transition is fired.
      </p>
      <p>An FSM is a tuple (S, L, T, s0, F ) where: S is a finite set of states, L a set
of events (actions), T the transition function (T : S × L −→ S). s0 is the initial
state such as s0 ∈ S, and F the set of final states such as F ⊂ S. The transition
function T associates a source state s1 ∈ S and an event l1 ∈ L to a target state
s2 ∈ S. In this model, a transition is defined as a tuple containing a source state,
a label and a target state.</p>
      <p>Figure 1 (b) illustrates the FSM of the running example which describes the
behavioural interface of the service provider. We only consider the observable
behaviour of a service, thus internal activities are hidden. Activities meant to send
and to receive messages are modeled. The message m is denoted by &gt;m
(respectively &lt;m) when it is sent (respectively received). Each conversation initiated
by a client starts an execution of the corresponding FSM.</p>
      <p>We use the following notations (examples refer to the FSM depicted in the
right side of the Figure 1(b)):
– s• is the set of outgoing transitions from s.</p>
      <p>(e.g. GoodsInvoiced• = {(GoodsInvoiced,&lt;CreditCardDetails,Paid),
(GoodsInvoiced, &lt;GoodsOrder,GoodsOrdered) }).
– Label(t) is the label1 of the transition t.</p>
      <p>(e.g. Label((GoodsInvoiced,&lt;CreditCardDetails,Paid))=&lt;CreditCardDetails)
– The Label operator is generalised to a set of transitions. For example, if
T = Sin=1{ti} then Label (T ) = Sn</p>
      <p>i=1{Label (ti)}; where n =k T k.
– k X k is the cardinality of the set X.</p>
      <p>In our previous work, we implemented an algorithm which is meant to detect
the exact location of changes while comparing two FSMs P and P 0 (which
respectively models the old provider and the new provider interfaces). A difference
is detected if and only if the new interface does not simulate the behaviour of
the previous interface. The outcome is a set Res of tuples (si, ti, sj, tj) where si
and sj are states of P and P 0 respectively, while ti and tj are either null values
or outgoing transitions of si and sj respectively.</p>
      <p>Figure 2 shows three differences between P and P 0. The first difference is a
deletion of the operation &lt; ServiceOrder , which means that the new provider
does not allow its client to update its service order. This difference causes an
incompatibility with the required interface of the client as he can not use this
operation any more. The second difference is an addition of the operation &lt; Transfer .
1 In deterministic FSMs, ∀t1 ∈ s•, t2 ∈ s• : Label (t1) 6= Label (t2).</p>
      <p>However, this difference does not cause any incompatibility as the added
operation provides a new option to its client. The third difference is the modification
of the operation &gt; STN by the operation &gt; ASN (Advanced Shipment
Notice). An incompatibility will arise because the client can not recognize this new
operation.</p>
      <p>P FSM (old provider)</p>
      <p>Order
&lt;GoodsOrder</p>
      <p>GoodsOrdered
&gt;GoodsInvoice
&lt;GoodsOrder</p>
      <p>GoodsInvoiced
&lt;CreditCardDetails</p>
      <p>Quantitative simulation: In the detection algorithm, P and P 0 are traversed
in parallel. A set of reached pair of states Rps is built such as Rps ⊆ S × S0,
where S is a set of P ’s states and S0 is a set of P 0’s states. For each pair of states
(si, sj) ∈ Rps, we compute a quantitative simulation function Qs. This function
returns a score of differences between si’s outgoing transitions and sj’s outgoing
transitions. Qs : S × S0 → [0..1] is defined as follows:</p>
      <p>Qs((si, sj)) =
(1</p>
      <p>Pik=D1iff ((si,sj))k Weight(Di)+kLabel(si•)∩Label(sj•)k</p>
      <p>kDiff ((si,sj))k+kLabel(si•)∩Label(sj•)k
Where: Diff ((si, sj)) is a set of differences pinpointed at the state pair (si, sj)
such as Diff ((si, sj)) ⊆ Res, and Di ∈ Diff ((si, sj)) for i = 1.. k Diff ((si, sj)) k.
The function Weight returns a penalty value2 for each type of difference, and
0 6 Weight (Di ) &lt; 1. The sum of all penalties in the state pair is added
to the score of the common labels of the outgoing transitions. Common
labels of the outgoing transitions of si and sj refer to the case where no
difference is detected. Thus, a highest score is attributed (see (1): k Label (si•) ∩
Label (sj•) k). To compute the quantitative simulation of the pair state, the sum
of difference score and similarity score is divided by the number of these
differences and similarities between the outgoing transitions of si and sj (see (1):
k Diff ((si, sj)) k + k Label (si•) ∩ Label (sj•) k). For example, in Figure 2, if the
value of the deletion penalty is set to 0.5, then the quantitative simulation is:
Qs((ServiceOrdered , ServiceOrdered )) = 0.5+1 = 0.75.
1+1
2 How penalty values are set is out of the scope of this paper.
if, si• = {}
otherwise
(1)</p>
      <p>Mean quantitative simulation: Once the quantitative simulation is computed
to all state pairs, a mean quantitative simulation value of P and P 0 can be defined
as follows :</p>
      <p>Mqs(P, P 0) =</p>
      <p>PkQsk Qs(P Si)
i=1
k Rps k
Where: P Si is a pair of states such as P Si ∈ Rps for i = 1.. k Rps k. In
the running example, if all the penalty values are set to 0.5 then the mean
quantitative simulation is: Mqs(P, P 0) = 0.875.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Tests and results in BESERIAL</title>
      <p>For validation purposes, we built a test collection consisting of 20 process
scenarios from the xCBL3 textual description of order management choreographies.
These two-party choreographies describe possible document exchanges between
trading partners in an Order Management business process.
(2)
1.2
1
e 0.8
u
l
a
V
ion 0.6
lt
a
u
m
iS 0.4
0.2</p>
      <p>Mean Quantitative Simulation
0 2 4 6 8 10 12 14 16 18 20</p>
      <p>Test Number</p>
      <p>In BESERIAL4, one interface is compared to a collection of interfaces. In
Figure 3, the graph shows which interface yields less incompatibilities with respect
to the interface given as reference. In this example, the interface which simulates
as much as possible the given one yields a mean quantitative simulation value of
0.97. The worst result is 0.14. The interfaces in tests number 14, 15 and 16 are
selected as candidates to substitute the old service.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Related work</title>
      <p>
        Compatibility test of interfaces has been widely studied in the context of Web
service conversations. Most of approaches, which focus on the behavioural
dimension of interfaces, rely on similarity calculus to check, at design time, whether
3 XML Common Business Library (http://www.xcbl.org/).
4 http://www-clips.imag.fr/mrim/User/ali.ait-bachir/WebServices/WebServices.html
or not interfaces described for instance by automata are compatible [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The
behavioural interface describes the structured activities of a business process.
Checking interface compatibility is thus based on bi-similarity algorithms [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
These approaches do not deal with the quantification of interface simulation.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], authors introduced a technique to diagnosis message structure
missmatches between service interfaces and to fix them with adapters. An extention
of this technique is applied to reslove missmatches between service protocols.
The proposed iterative algorithm builds a missmatch tree to help developers to
choose the suitable adapter each time and incompatibility is detected. However,
this technique can only be applied to protocols which describe a sequence of
operations. More complex flow controls, such as loops and options, are not taken
into consideration. Recent research has addressed interface similarity measures
issues. In [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], authors present a similarity measure for labeled directed graphs
inspired by the simulation and bi-simulation relations on labeled transition
systems. The presented algorithm returns a value of a simulation measure but does
not tell us more about the location of incompatibilities.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Future work</title>
      <p>In this paper we focused on the calculus of the differences between two
behavioural interfaces. Ongoing work aims at extending this work towards two
directions: i) detecting complex incompatibilities including structural aspects,
ii) guiding analysts in fixing detected incompatibilities. As we compare two
different versions of a same service, we identify adequately the delta introduced by
the new version. Nevertheless, if we compare two completely different services,
the semantics of operations or data types must be considered.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A.</given-names>
            <surname>Ait-Bachir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          , and
          <string-name>
            <surname>M.-C.</surname>
          </string-name>
          <article-title>Fauvet</article-title>
          . BESERIAL:
          <article-title>Behavioural service analyser</article-title>
          .
          <source>In Proc. of the BPM Int. Conf.</source>
          , pages
          <fpage>374</fpage>
          -
          <lpage>377</lpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>L.</given-names>
            <surname>Bordeaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Salan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Berardi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Mecella</surname>
          </string-name>
          .
          <article-title>When are two web services compatible?</article-title>
          <source>In Proc. of the TES Int. Conf.</source>
          , pages
          <fpage>15</fpage>
          -
          <lpage>28</lpage>
          . Springer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>H.</given-names>
            <surname>Foster</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Uchitel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Magee</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Kramer.</surname>
          </string-name>
          WS-Engineer:
          <article-title>A tool for modelbased verification of web service compositions and choreography</article-title>
          .
          <source>In Proc. of the IEEE Int. Conf. on Software Engineering (ICSE)</source>
          , pages
          <fpage>771</fpage>
          -
          <lpage>774</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>N.</given-names>
            <surname>Lohmann</surname>
          </string-name>
          .
          <article-title>Correcting deadlocking service choreographies using a simulationbased graph edit distance</article-title>
          .
          <source>In Proc. of the BPM Int. Conf., number 5240 in LNCS</source>
          , pages
          <fpage>132</fpage>
          -
          <lpage>147</lpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Martens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Moser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gerhardt</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Funk</surname>
          </string-name>
          .
          <article-title>Analyzing compatibility of bpel processes</article-title>
          .
          <source>In Proc. of the Advanced Int. Conf. on Telecom. and Int. Conf. on Internet and Web Applications and Services</source>
          , pages
          <fpage>147</fpage>
          -
          <lpage>156</lpage>
          . IEEE,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>H.</given-names>
            <surname>Motahari-Nezhad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Benatallah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Martens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Curbera</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Casati</surname>
          </string-name>
          .
          <article-title>Semiautomated adaptation of service interactions</article-title>
          .
          <source>In Proceedings of the 16th International Conference on World Wide Web</source>
          , pages
          <fpage>993</fpage>
          -
          <lpage>1002</lpage>
          . ACM,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Pathak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Basu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Honavar</surname>
          </string-name>
          .
          <article-title>Modeling web service composition using symbolic transition systems</article-title>
          .
          <source>In Proc. of the 21st Conf. on Artificial Intelligence Workshop on AI-driven Technologies for Service-Oriented Computing</source>
          , pages
          <fpage>65</fpage>
          -
          <lpage>80</lpage>
          . AAAI Press,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>