<!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>An Approach to Tackle Livelock-freedom in SOA</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Christian Stahl</string-name>
          <email>stahl@informatik.hu-berlin.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Karsten Wolf</string-name>
          <email>karsten.wolf@uni-rostock.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Mathematics and Computer Science Technische Universiteit Eindhoven P.</institution>
          <addr-line>O. Box 513, 5600 MB Eindhoven</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Humboldt-Universit ̈at zu Berlin, Institut fu ̈r Informatik Unter den Linden 6</institution>
          ,
          <addr-line>10099 Berlin</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universit ̈at Rostock, Institut fu ̈r Informatik 18051 Rostock</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We calculate a fixed finite set of state space fragments for a service P , where each fragment carries a part of the whole behavior of P . By composing these fragments according to the behavior of a service R we build the state space of their composition P ⊕R which can be checked for deadlocks and livelocks. We show that this approach is applicable to realize a “find” request by a service R with a provided service P in SOA.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>? Funded by the DFG project “Substitutability of Services” (RE 834/16-1).
?? Supported by the DFG project “Operating Guidelines for Services” (WO 1466/8-1).</p>
      <p>In this paper, we propose a novel approach. We still build the state space
P ⊕ R, but not from operational descriptions of P and R. Instead, we calculate
a finite set of state space fragments for a service P . Each fragment carries a
part of the whole behavior of P . These fragments are published in a repository.
Upon a “find” request by a service R, the state space of P ⊕ R is calculated by
composing fragments of P according to the behavior of R. The resulting state
space can then be checked for deadlocks and livelocks using a model checker.
The approach has two advantages:
1. The construction of fragments and their internal state space reduction is done
once for each published service at the “publish” phase. That way,
computational efforts are shifted from “find” to “publish”. This is a clear advantage
as we expect the number of “find” to be much higher than the number of
“publish”.
2. When reducing the size of fragments, we can apply reduction techniques
which are different from standard state space reduction techniques used in
model checking. In fact, we may reduce the transition system after having
computed it.</p>
      <p>Section 2 formalizes fragments, shows how fragments for a given service P
can be computed, and it presents how the state space P ⊕R can be built from the
fragments of P . Section 3 sketches several abstractions to condense fragments
while preserving deadlocks and livelocks and, finally, Sect. 4 concludes the paper.
2
2.1</p>
      <p>Calculating State Spaces From Fragments</p>
      <sec id="sec-1-1">
        <title>Formalizing Fragments</title>
        <p>In this section, we define fragments and connections between these fragments.</p>
        <p>A (state space) fragment Frag = (V, E, F ) is a graph that consists of a set V
of nodes, a set E ⊆ V × V of (directed) edges, and a set F ⊆ V of final nodes.
We assume that different fragments have disjoint sets of nodes.</p>
        <p>Let x be an element of some fixed set M . An instance Frag(x) of a fragment
Frag is built by renaming the constituents as follows: v 7→ [v, x], e = [v1, v2] 7→
[[v1, x], [v2, x]] for all v ∈ V and e ∈ E. That way, the structure is preserved but
the nodes get previously unused names.</p>
        <p>To plug different fragments yielding again a state space, we define connections
which link states of one fragment to states of another fragment. A connection
CFrag1,Frag2 between fragments Frag1 and Frag2 is a subset of VFrag1 × VFrag2 .</p>
        <p>If CFrag1,Frag2 is a connection between fragments Frag1 and Frag2, then
CFrag1,Frag2 (x, y) = {([v1, x], [v2, y]) | (v1, v2) ∈ C} is a connection between
Frag1(x) and Frag2(y).</p>
        <p>Consider the fragments and the connections depicted in Fig. 1. For instance,
we have fragment Frags1 = ({v0, v1, v2}, {(v0, v1), (v0, v2), ∅}) and connection
CFrags1,Frags3 = {(v1, v4)}. Thereby, v0 relabels α, v1 relabels ωa, etc.</p>
        <p>Given a set of fragments Frag1, . . . , Fragn and connections C1, . . . , Cm, a
transitions system TS = (V, E) is defined by V = Skn=1 VFragk and E =</p>
        <sec id="sec-1-1-1">
          <title>FraFgrsa1g1</title>
          <p>v0:vα0: α</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>FraFgrsa2g2</title>
          <p>v3:vp31: p1</p>
        </sec>
        <sec id="sec-1-1-3">
          <title>FraFgrsa4g4</title>
          <p>v8:vp81:cp1c</p>
          <p>FraFgrsa5g5
v1:vω1a:ωa v2:vp21:bp1b FraFgrsa3g3
v4:vω4: ω
v9:vω9: ω
v5:vp51:dp1d
v6:vp62: p2
v7:vp71:bp1a
(a) Fragments</p>
          <p>Sin=1 EFragi ∪ Sm</p>
          <p>j=1 ECj . Thereby, several instances of one and the same fragment 2 2
or connection may be used to build TS .</p>
          <p>In the following, we introduce our service model open nets and show how
fragments and connections of an open net can be calculated.
We use open nets as a service model. An open net N consists of a Petri net
together with an interface. The interface is divided into a set of input places and
output places. Input places have an empty preset, output places have an empty
postset. Furthermore, N has a distinguished initial marking m0, and a set Ω
of final markings such that no transition of N is enabled at any m ∈ Ω. We
further require that in the initial and the final markings the interface places are
not marked.</p>
          <p>
            The behavior of an open net is defined using the standard Petri net
semantics [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]. With RN (m0) we denote the set of reachable markings of N .
          </p>
          <p>For example, the open net P depicted in Fig. 2(a) has an initial marking
m0P = [α] and the set of final markings is defined by ΩP = {[ω]}. P has two
input places c and d and two output1places a and b that are depicted on the
dashed frame. EExxamampleple 1
a
b
c
d
a
b
c ω
d
α
ω
α</p>
          <p>p1
p1</p>
          <p>p2
(a) Open net Pp2
?b
s1
s?a
1
s3 ?a
s2 ?b
?b !d !c</p>
          <p>s4s2!?ca,?b ?a,?bs3
s?5b ?a!?da,?sb4 ?as,6?b</p>
          <p>s5 ?a?a,?b s6
(b) Most permissive
strategy R∗ for P
?a,?b
?a
n4
n1τ
n2</p>
          <p>n1
?b τ
Fig. 2. Open net P and</p>
          <p>n3 n
?bi?tas!d mo2st p?bermissive
strat?a egn5y R∗. ?xn3 (!x) denotes a
sne4nding?(brec!deiving) message
x th?aat produces a token on</p>
          <p>n
input place5 x (consumes a
token from output place x)
in P .</p>
          <p>As a correctness criterion for an open net N we require the absence of
deadlocks and livelocks in N . N is deadlock-free and livelock-free if for all reachable
markings m ∈ R(m0), RN (m) ∩ ΩN 6= ∅.</p>
          <p>For the composition of two open nets M and N , we require that the input
places of M are the output places of N and vice versa. M and N can be composed
by merging input places of M with equally labeled output places of N and vice
versa.</p>
          <p>As we are interested in composing open nets such that the composition is
deadlock-free and livelock-free we define the notion of a strategy. An open net
M is a strategy for an open net N if M ⊕ N is deadlock-free and livelock-free.</p>
          <p>
            In [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ] it has been proven that there always exists a most permissive strategy
R∗ for an open net N that has richer behavior than every other strategy for N .
          </p>
          <p>The most permissive strategy for P (of Fig. 2(a)) is depicted in Fig. 2(b).
It is an automaton (which can easily be transformed in a state machine and by
adding an input (output) place for each ?x (!x) to an open net) with initial state
s1 and two final states s3 and s4. State s6 is depicted for technical purposes only.
Every edge to s6 shows a possible set of messages R∗ can receive but that will
never occur because P cannot send them.</p>
          <p>For R∗ we can prove the following useful property.</p>
          <p>Lemma 1. If R is a strategy of P , then R∗ weakly simulates R.</p>
          <p>
            The converse does not hold in general. The automaton R∗ (see Fig. 2(b))
weakly simulates R (see Fig. 3(a)) but P ⊕ R has a livelock (as we will see later
on). In fact, R is an example why the operating guideline approach in [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ] is not
applicable to tackle livelock-freedom.
          </p>
          <p>When computing R∗ we have the information needed to calculate the
fragments and connections of P . Each state s of R∗ is a fragment. In each state
s, R∗ has knowledge about the possible markings of P in s. These markings
(together with their transitions) are the nodes and the edges of the fragment.
Figure 1 shows the fragments and the connections of P . Frags1 is the fragment
derived from s1, Frags2 from s2 and so on. For s6 there is no fragment. We have
relabeled the markings of all fragments by v0, . . . , v9 to make the internals of
P anonymous. For each edge of R∗, we define a connection. The connection is
calculated from the edges of R∗ and the markings.</p>
          <p>Given a service R, the most permissive strategy R∗ for P and the fragments
and connections of P , we show in the following how a transition system P ⊕ R
can be constructed.
2.3</p>
        </sec>
      </sec>
      <sec id="sec-1-2">
        <title>Fragments and Connections for P</title>
        <p>From the construction of fragments we know that for each state s of R∗, its state
space is defined by the fragment Frag s. Furthermore, for each pair of fragments
Frag 1 6= Frag 2, the set of edges with source in Frag 1 and sink in Frag 2 is defined
by connection CFrag1,Frag2 . For each fragment Frag , let idFrag denote connection
CFrag,Frag . Then, by Lemma 1, R can only be a strategy for P if R∗ (weakly)
simulates R.
Example 1
?b</p>
        <p>Fig. 3. Constructing
the state space P ⊕ R
from the fragments
for a given service
R. Note that the ?b
edge in state n5 yields
[n4, s6] ∈ ρ. However,
as s6 is not reachable,
there is no fragment
for state s6 and hence
there is no transition
from Frag5 to Frag3.
(a) Requester R
(b) TS R
3
Definition 1 (Construction of TS R). Let % be simulation relation between
R and R∗. Compose transition system TS R from the following fragments and
connections:
– FRAG = {Frag s(n) | [n, s] ∈ %},
– CONN = {CFrags,Frags0 (n, n0) | [n, s] ∈ %, [n, x, n0] ∈ δR (x 6= τ ), [s, x, s0] ∈
δR∗ (which implies [n1 0, s0] ∈ %)} ∪ {idFrags (n, n0) | [n, s] ∈ %, [n, τ, n0] ∈ δR}
The fragment that corresponds to the initial state of R and R∗ is unique and
it contains the initial state of the resulting transition system TS R.</p>
        <p>In our example, (n1, s1), (n2, s1) ∈ %. Thus we add two instances of Frags1,
i.e. Frags1(n1), Frags1(n2). As we have transition [n1, τ, n2] ∈ δR in R we add
connection idFrags1 (n1, n2). Furthermore, we add fragment Frags3(n4) because
(n4, s3) ∈ %. From transition [n2, ?a, n4] ∈ δR in R and [s1, ?a, s3] ∈ δR∗ we
conclude that connection CFrags1,Frags3 (n2, n4) for ?a has to be added. Figure 3(b)
shows the resulting state space P ⊕ R. TS R contains a livelock (the nodes of
Frags2(n3) and Frags5(n5) have no final node), thus R is no strategy for P .</p>
        <p>The resulting transitions system T SR can be verified for deadlocks and
livelocks. Our main result of this paper guarantees that each deadlock and livelock
in P ⊕ R is preserved in TS R and vice versa.</p>
        <p>Theorem 1. Let R be a strategy for P and let TS R be as defined above. Then
TS R is bisimilar to the state space P ⊕ R.
3</p>
        <p>Deadlock and Livelock-preserving Abstraction
To speed up the model checking run when checking TS R, we can apply
stateof-the-art reduction techniques such as partial-order and symmetry reduction.
Besides this, we statically reduce the fragments. This may lead to a smaller TS R
and thus increasing the performance of our approach and, in addition, we need to
store smaller fragments in the repository (when publishing P ). All abstractions
we sketch in the following preserve both deadlocks and livelocks.</p>
        <p>For each fragment we compute its strongly connected components (SCCs).
It is sufficient to store only SCCs instead of nodes.</p>
        <p>
          To condense the state space of each fragment, we adapt state space
condensation rules from [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. These rules can be applied to each fragment. For example,
we can condense the three SCCs in Frags5 (see Fig. 1(a)) to a single SCC.
        </p>
        <p>Finally, we can also minimize R, in particular, its τ transitions. For instance,
we can apply minimization rules that preserve branching bisimulation. That way,
states n1 and n2 in Fig. 3(a) could be merged.
4</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Conclusion</title>
      <p>We have proposed a technique to realize the “find” operation in SOA in case the
composed system is required to be free of deadlocks and livelocks. We suggest
that a service provider publishes a set of state space fragments such that each
fragment carries a part of the whole behavior of P . Given a requester R, “find”
means to construct the state space P ⊕ R from the fragments of P guided by the
behavior of R. The resulting state space is checked for deadlocks and livelocks.</p>
      <p>Although the space complexity is the product of the state spaces of R and P
(in worst case), we assume that applying abstraction techniques results in much
smaller states spaces.</p>
      <p>
        We are currently implementing the proposed approach in our analysis tool
Fiona [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The computed state space P ⊕ R can then be checked for deadlocks
and livelocks using the model checker LoLA [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Future work also includes a case
study to validate the strength of the abstraction techniques.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Lohmann</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Massuthe</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolf</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Operating guidelines for finite-state services</article-title>
          . In Kleijn, J.,
          <string-name>
            <surname>Yakovlev</surname>
          </string-name>
          , A., eds.
          <source>: 28th International Conference on Applications and Theory of Petri Nets and Other Models of Concurrency, ICATPN</source>
          <year>2007</year>
          , Siedlce, Poland, June 25-29,
          <year>2007</year>
          , Proceedings. Volume
          <volume>4546</volume>
          of Lecture Notes in Computer Science., Springer-Verlag (
          <year>2007</year>
          )
          <fpage>321</fpage>
          -
          <lpage>341</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Reisig</surname>
          </string-name>
          , W.:
          <article-title>Petri Nets</article-title>
          .
          <source>EATCS Monographs on Theoretical Computer Science edn</source>
          . Springer (
          <year>1985</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Juan</surname>
            ,
            <given-names>E.Y.T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsai</surname>
            ,
            <given-names>J.J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murata</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Compositional Verification of Concurrent Systems Using Petri-Net-Based Condensation Rules</article-title>
          .
          <source>ACM Trans. on Programming Languages and Systems</source>
          <volume>20</volume>
          (
          <issue>5</issue>
          ) (
          <year>1998</year>
          )
          <fpage>917</fpage>
          -
          <lpage>979</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lohmann</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Massuthe</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stahl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weinberg</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Analyzing Interacting BPEL Processes</article-title>
          . In Dustdar, S.,
          <string-name>
            <surname>Fiadeiro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sheth</surname>
            , A., eds.: Fourth International Conference on Business Process Management,
            <given-names>BPM</given-names>
          </string-name>
          <year>2006</year>
          , Vienna, Austria, September 5-
          <issue>7</issue>
          ,
          <year>2006</year>
          , Proceedings. Volume
          <volume>4102</volume>
          of Lecture Notes in Computer Science.,
          <source>SpringerVerlag</source>
          (
          <year>2006</year>
          )
          <fpage>17</fpage>
          -
          <lpage>32</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>LoLA: A low level analyser</article-title>
          . In Nielsen,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Simpson</surname>
          </string-name>
          , D., eds.
          <source>: 21st International Conference on Application and Theory of Petri Nets, ICATPN</source>
          <year>2000</year>
          , Aarhus, Denmark, June 26-30,
          <year>2000</year>
          , Proceeding.
          <source>Number 1825 in Lecture Notes in Computer Science</source>
          , Aarhus, Denmark, Springer-Verlag (
          <year>2000</year>
          )
          <fpage>465</fpage>
          -
          <lpage>474</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>