<!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>CSCB Tools: A Tool to Synthesize Pareto Optimal State Machine Models from Choreography Using Petri Nets⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Toshiyuki Miyamoto</string-name>
          <email>miyamoto@eei.eng.osaka-u.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Graduate School of Engineering, Osaka University</institution>
          ,
          <addr-line>Suita, Osaka 565-0871</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <fpage>335</fpage>
      <lpage>340</lpage>
      <abstract>
        <p>Application of service-oriented architecture, in which the en tire system is built by a combination of independent software components, to a wide variety of computer systems is expected. The problem to synthesize state machine models of the services from a communication diagram representing the overall specifications of service interaction is known as the choreography realization problem. It should be minded on automatic synthesis that software models should be understandable to software engineers. We have proposed a method to synthesize hierarchical state machine models for the choreography realization problem in former PNSEs. We have implemented the method as a plug-in of R ational Software Architect. In this paper, we present the prototypical tool.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In recent years, the internationalization of activities and information
technology in enterprises has intensified competition between companies. Under such
circumstances, service-oriented architecture (SOA)[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] h as been attracting
attention as the architecture of information systems in enterprises. In SOA, an
information system is built by composing independent software units called
services.
      </p>
      <p>
        In SOA, the problem to synthesize the concrete model from an abstract
specification is known as the choreography realization problem[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], in which the
abstract specification, called choreography, is defined as a set of interactions
among services, which are given in a dependency relation of messages sent and
received; the concrete model is called the service implementation and defines
the behavior of the service. This paper utilizes the communication diagram and
the state machine of UML 2.x[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] to describe the choreography and the service
implementation, respectively.
      </p>
      <p>
        Bultan and Fu formally introduced the choreography realization problem in
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. They used collaboration diagrams of UML1.x and showed some conditions
for a given choreography to be realizable. In addition, they showed a method
⋆ This work was supported by KAKENHI (26330083).
to represent the service implementation as the state space in which a state was
defined as a set of unsent messages, and they also showed a method to map to
a set of finite state machines. However, it is not intelligible because the number
of states increases exponentially as the number of messages increases.
      </p>
      <p>
        Cruz-Lemus et al. experimentally evaluated the relationsh ip between some
metrics of state machines and the time needed to understand them[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. According
to the result, state machines are intelligible the smaller the following metrics: the
number of simple states (NSS), the number of transitions (NT), and the number
of guards (NG).
      </p>
      <p>
        Miyamoto et al. proposed the Construct State-machine Cutti ng Bridges (CSCB)
method, a method for synthesizing hierarchical state machines from a
communication diagram[
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6, 8, 7</xref>
        ]. In this method, dependency relations among sent and
received message events are represented by Petri nets[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]; state machines are then
synthesized. We have implemented the CSCB method as a plug-i n of Rational
Software Architect (RSA) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
      </p>
      <p>
        Recently, a new notion called re-constructible decomposit ion of acyclic
relations was introduced; a necessary and sufficient condition for a decomposed
relation to be re-constructible was shown[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Using the re-c onstructibility, we
have proposed an extended version of the CSCB method in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In this paper, we
report the extension of the plug-in of RSA so as to support the extended CSCB
method.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>CSCB Tools</title>
      <p>2.1</p>
      <p>CSCB method
The CSCB method synthesizes state machines for each service from
choreography defined by a communication diagram. At first, the method derives an
acyclic relation for each service. Second, the relations are transformed to Petri
nets. Third, when a Petri net has T-T bridges, it is modified by cutting bridges
while keeping the behavior. Finally, each Petri net is converted into a
hierarchical state machine. We use RSA as the editor for communication diagrams and
the repository to store synthesized state machines.
2.2</p>
      <p>
        Extended CSCB method
The result in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] allows us to use any acyclic relation in some range. In the
extended CSCB method, a set of acyclic relations for each service is derived at
the first step. A set of state machines are synthesized and our tool selects more
intelligible state machines using the following metrics for intelligibility: NSS,
NT, NG, number of depths (ND), and sum of number of partners for all regions
(NP). Because we use several metrics, a set of Pareto optimal state machines is
selected.
connect
cbUML
cbUML::grammer
      </p>
      <p>mPN
cbUML::cd
cbUML::sm</p>
      <p>mPN::stateSpace
We have implemented the synthesis function as a plug-in of RS A; one can
download the plug-in from the following URL:</p>
      <p>
        Fig. 1 shows packages of the CSCB Tools. We have proposed an UML
subset, called the subset of UML for formally describing choreography and
behavioral feature (cbUML), to discuss the choreography realization problem, and an
extended Petri net, called the message mark graph (MMG) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. cbUML is the
main package for cbUML models, cbUML::cd is the package for communication
diagrams, cbUML::sm is the package for state machines, and cbUML::grammer
defines the grammer of statements in cbUML models. mPN is the package for
MMGs and mPN::stateSpace is the package to generate reachability spaces of
MMGs, which is used in the projection method[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The package connect
connects cbUML model with RSA. Retrieving and storing UML models from and
to RSA are done through connect. Fig. 2 shows a screen-shot of the tool. We
use class and communication diagrams to define choreography.
2.4
      </p>
      <p>
        Example
Fig. 3 shows an example choreography, which is taken from BPEL-WS 2.0
specification[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The system is composed of five services: Customer, Vendor, Shipping,
Invoicing, and Scheduling. When Vendor receives order from Customer, it
sends requests to Shipping, Invoicing, and Scheduling.
      </p>
      <p>The request to Shipping is shipReq, and the reply from Shipping is shipInfo.
The requests to Invoicing are productInfo and shipType; the reply from
Invoicing is invoice. Vendor sends productInfo after receiving order; it sends
shipType after receiving shipInfo. Invoicing does internal process to make an
invoice after receiving productInfo and shipType; then it sends invoice as a
reply. The request to Scheduling are productSchedule and shipSchedule.
Vendor sends productSchedule after receiving order; it sends shipSchedule
after receiving shipInfo. Vendor sends orderReply to Customer after receiving
shipInfo and invoice and sending shipSchedule.</p>
      <p>From this communication diagram, twelve state machines were constructed.
Among the state machines, the tool selected the state machine shown in Fig. 4
as the best. The state machine behaves as follows. When Vendor receives order,
it sends productSchedule to Scheduling, productInfo to Invoicing, and
shipReq to Shipping. After that, it receives shipInfo, then it sends shipSchedule
to Shipping and shipType to Invoicing. Finally, when it receives invoice, it
sends orderReply to Customer.</p>
      <p>
        Table 1 shows the comparison result. Compared to the projection method[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
CSCB and extended CSCB methods succeeded in reducing NSS and NT.
Compared to the CSCB method[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the extended CSCB methods succeeded in
synthesizing more intelligible state machine. Specially, the state machine does not
have any guards and, thus, it has no implicit control flow.
      </p>
    </sec>
    <sec id="sec-3">
      <title>Conclusions</title>
      <p>In this paper, we extended the function for synthesizing state machines of our
tool. The function has been implemented as a plug-in of Ratio nal Software
Architect. Currently, our tool can synthesize hierarchical state machines of services
from one communication diagram. Synthesizing state machines from multiple
communication diagrams is one of our interests. State machines may be modified
by designers; conformance checking of state machines should also be developed.
Our further interest is developing model checking and simulation functionalists
of communication diagrams or state machines for checking some properties of
the system.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Antonio</given-names>
            <surname>Cruz-Lemus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Genero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Piattini</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Metrics fo r UML Statechart Diagrams</article-title>
          . In: Genero,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Piattini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Calero</surname>
          </string-name>
          , C. (eds.)
          <source>Metrics for Software Conceptual Models</source>
          , pp.
          <fpage>237</fpage>
          -
          <lpage>272</lpage>
          . Imperial College Press, Lon don (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bultan</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Specification of realizable service conversations using collaboration diagrams</article-title>
          .
          <source>Service Oriented Computing and Applications</source>
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <fpage>27</fpage>
          -
          <lpage>39</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>CSCB Tools: Tool for supporting the design of systems based on soa</article-title>
          .
          <source>In: IEEE GCCE</source>
          . pp.
          <fpage>42</fpage>
          -
          <lpage>43</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Choreography realization by re-constructibl e decomposition of acyclic relations</article-title>
          .
          <source>IEICE Transactions on Information and Systems E99.D(6)</source>
          ,
          <fpage>1420</fpage>
          -
          <lpage>1427</lpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Choreography realization by re-constructibl e decomposition of acyclic relations</article-title>
          .
          <source>Tech. Rep. MSS2015-37</source>
          , IEICE (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hasegawa</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>A Petri net approach to synthesize intelligible state machine models from choreography</article-title>
          .
          <source>In: PNSE</source>
          . pp.
          <fpage>222</fpage>
          -
          <lpage>236</lpage>
          (
          <issue>20</issue>
          12)
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hasegawa</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oimura</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>An approach for synthesizing intelligible state machine models from choreography using petri nets</article-title>
          .
          <source>IEICE Transactions on Information and Systems E97.D(5)</source>
          ,
          <fpage>1171</fpage>
          -
          <lpage>1180</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oimura</surname>
          </string-name>
          , H.:
          <article-title>A tool to synthesize intelligible state machine models from choreography using petri nets</article-title>
          .
          <source>In: Joint Proc. of PNSE and ModBE</source>
          . pp.
          <fpage>257</fpage>
          -
          <lpage>258</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Murata</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Petri nets: Properties, analysis and applications</article-title>
          .
          <source>Proc. IEEE</source>
          <volume>77</volume>
          (
          <issue>4</issue>
          ),
          <fpage>541</fpage>
          -
          <lpage>580</lpage>
          (
          <year>Apr 1989</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. OASIS:
          <article-title>Web services business process execution language version 2</article-title>
          .0 (
          <issue>2006</issue>
          ), http://docs.oasis-open.
          <source>org/wsbpel/2</source>
          .0/ wsbpel-specificat ion-draft.html
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. OMG:
          <article-title>Unified modeling language</article-title>
          , http://www.uml.org/
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Su</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bultan</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Towards a theory of web service choreographies</article-title>
          .
          <source>In: Proceedings of the 4th international conference on Web services and formal methods</source>
          . pp.
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Thomas</surname>
          </string-name>
          , E.:
          <string-name>
            <surname>ServiceO-riented Architecture</surname>
          </string-name>
          .
          <source>Prentice Hall</source>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>