<!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>Using Comp-O to Build and Describe Component-Based Services</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>G. Alary</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>N. Hernandez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>J.-P. Arcangeli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>S. Trouilhet</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>J.-M. Bruel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institut de Recherche en Informatique de Toulouse University of Toulouse</institution>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Comp-O is an extension of OWL-S that we have proposed to describe the semantics of component-based services. Based on a proof-of-concept prototype, this demonstration shows how Comp-O is used to support assistance to developers of component-based services and automatically generate their descriptions for publication and discovery purposes1.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Background and problem</title>
      <p>
        Component-based software engineering [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] consists in building software as
assemblies of reusable and versatile software components. Basically, this paradigm
emphasizes composability and reuse and fosters software exibility. In such a
way, an application can be modi ed by replacing one component by another in
the assembly.
      </p>
      <p>
        Software components [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] are runtime units that implement and provide
services that we call \component-based services". Symmetrically, at the same level
as the services they provide, software components exhibit the services they
require to be operational. Thus, since the provided and required interfaces are
explicit, they are easily composable. Composing components consists in
binding the components' required services to the provided ones to deliver composite
services with added value. In order to make a component fully operational, i.e.,
actually providing its component-based services, its required services must be
bound to (so realized by) a service that is provided by another component. As
an example, Fig. 1 represents the implementation of a component-based service
that provides the apparent temperature in Fahrenheit.
      </p>
      <p>Developing composite services is a challenging task as it requires
identifying components and services that are compatible, binding them to implement
the service, and describing it semantically for discovery by third parties. The
semantics of a component-based service depend on the semantics of the services
that are required by the provider component. Since the latter are abstracted in
the provider component, the actual semantics depend on the semantics of the
provided services they are bound to. In a way, the semantics of a composite
service are distributed among the components. Therefore, they must be synthesized
from the semantics of the components that compose the assembly.
1 Copyright © 2020 for this paper by its authors. Use permitted under Creative</p>
      <p>Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>
        The problem is to describe the services provided by components that have
required services, both to enable assistance to service developers when they
assemble components and to combine such descriptions to automatically
generate composite service descriptions. For that, the vocabulary used to describe
component-based services must take into account the required services, and these
atomic descriptions must be combinable. State of the art shows that considering
ontologies when describing services improves their discoverability [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and
composition [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Several ontologies and approaches exploiting them have thus been
proposed. However, existing solutions mainly consider Web services and are
limited to the description and composition of provided services without considering
required services. In this work, we propose to describe component-based services
with ontologies in order to leverage the semantics of such knowledge
representations regarding two issues : (i) to support a detailed description of composite
services; (ii) to support the composition of services and produce a description of
a composite service depending on the components participating in the assembly.
      </p>
      <p>The next section presents the ontology we propose, called Comp-O. Then,
Section 3 introduces a proof-of-concept implementation and shows how
CompO supports the building of composite services and the automatic generation of
their semantic descriptions.
2</p>
      <p>
        Comp-O, an OWL-S extension for component-based
services
The development of our ontology, compliant with the NeOn methodology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], is
detailed in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The requirements of a component-based service ontology tested
against six ontologies (hRests2, MSM3, OWL-S4, SAREF5, SOSA/SSN6 and
WSML7) motivated the reuse of OWL-S. With OWL-S, the service o ered can be
2 https://lov.linkeddata.es/dataset/lov/vocabs/hr
3 https://lov.linkeddata.es/dataset/lov/vocabs/msm
4 https://www.w3.org/Submission/OWL-S/
5 https://ontology.tno.nl/saref/
6 https://www.w3.org/TR/vocab-ssn/
7 https://www.w3.org/Submission/WSML/
described using the pre/post conditions that are annotated in the service pro le.
The invocation of other services and the internal orchestration are described in
the service process.
      </p>
      <p>Comp-O8, the extension of OWL-S we have proposed, is available on line at
https://comp-o.github.io/comp-o. It allows representing service required
interfaces. This representation can be exploited when de ning composite services.
Comp-O consists of
{ three new classes:
comp-o:ComponentBasedService,
comp-o:RequiredPerform,
comp-o:ServiceContract,
{ and one object property comp-o:requiredPerformContract.</p>
      <p>The class comp-o:RequiredPerform is de ned to describe the required
interfaces of a component-based service. It specialises owls-process:Perform. This
control construction references a comp-o:ServiceContract represented by a
service pro le that does not reference any process (a black-box). The class
compo:ServiceContract specialises owls-pro le:Pro le. It is used to de ne the types
of inputs and outputs and pre/post-conditions speci ed by a required interface.
The class comp-o:ComponentBasedService specialises owls-service:Service. It is
de ned to describe a service that can have no or several comp-o:RequiredPerform
(required interface) in its process, and that is not operational until all its
compo:RequiredPerform are replaced with an actual perform referencing another
process.</p>
      <p>Finally, the comp-o:requiredPerformContract predicate is used to link a
compo:RequiredPerform with the comp-o:ServiceContract it requires.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Using Comp-O to build composite services and automatically generate their descriptions</title>
      <p>To demonstrate our solution, we have developed a proof-of-concept
implementation. It is available at https://github.com/comp-o/comp-o-poc. In practice,
a command line interface helps the user to select and assemble components, and
outputs its OWL-S description.</p>
      <p>A demonstration video is available online at https://www.irit.fr/~Sylvie.
Trouilhet/demo/iswc2020.mp4. It brie y introduces the concepts of software
components and component-based services using a simple example in the eld
of ambient systems. It sets out service description and discovery issues. Then,
the above example is used to illustrate what can be done using Comp-O:
relying on service descriptions as inputs, the developer is assisted when building a
component-based service and its description is automatically generated.
8 The pre xes used are comp-o: https://comp-o.github.io/comp-o#,
owlsservice: http://www.daml.org/services/owl-s/1.2/Service.owl#, owls-process:
http://www.daml.org/services/owl-s/1.2/Process.owl#, owls-pro le: http://
www.daml.org/services/owl-s/1.2/Profile.owl#</p>
      <p>The building process is described below and summarized in Fig. 2. A list
of the available component-based services is rst presented. To do this, all that
is needed is to retrieve the set of resources typed by the service:Service class.
Then, the developer must choose the \root" service, i.e., the service to
implement. Comp-O helps to determine whether the component that provides it has
any required interface, i.e., if one of the control constructions of the process of
the service it provides is a comp-o:RequiredPerform. This property can be
comprehensively checked considering OWL-S vocabulary using a SPARQL query.</p>
      <p>If the component providing the service does not require any service, it can
be described and published as an OWL-S service. If the component has one or
more required services, the latter must be bound to external component-based
services. If so, to ease the binding decisions, it can be determined whether a
provided service matches a required one. This requires checking that the types
of the inputs and outputs, the preconditions and the post-conditions match.
This task must be repeated as long as there are unbound required services in
the assembly. Then, the component-based implementation of the chosen service
is operational, and its OWL-S description can be generated.</p>
      <p>To generate the semantic description, the rst step consists in replacing
every comp-o:RequiredPerform by an owls-process:Perform referencing the process
associated in the assembly, using the owls-process:process predicate instead of
referencing a comp-o:ServiceContract via the comp-o:requiredPerformContract
predicate. The process of a component-based service can reference as variables
the inputs and outputs of a comp-o:ServiceContract it requires. For each
service, the second step is therefore to replace the references to these variables by
references to the equivalent variable of the associated service. This step can be
accomplished by processing all the owls-process:fromProcess predicates having as
object a resource of the type comp-o:ServiceContract. Once these two steps are
complete, the component-based services are then described as OWL-S services.
In this work, we have experimented Semantic Web technologies in the eld
of component-based software engineering. This paper has introduced Comp-O,
an extension of OWL-S for component-based services which are services
provided by software components, and the use of Comp-O to support the design
of component-based services. Our proposal contributes to the state of the art
in terms of assistance to component-based software developers and automated
description of component-based services.</p>
      <p>
        In a near future, we plan to use Comp-O in an ongoing project which aims to
make user-oriented services emerge at runtime in ambient environments. There,
an intelligent engine builds on the y component-based services from software
components that are present at the time in the environment, without having been
required by the user. As a consequence, emerging services must be semantically
described to the user [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] who can, in addition, edit them and participate to their
design while being assisted in such a task.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>I.</given-names>
            <surname>Sommerville</surname>
          </string-name>
          .
          <article-title>Component-based software engineering</article-title>
          . In Software Engineering, chapter
          <volume>16</volume>
          , pages
          <fpage>464</fpage>
          {
          <fpage>489</fpage>
          .
          <string-name>
            <surname>Pearson</surname>
            <given-names>Education</given-names>
          </string-name>
          ,
          <source>10th edition</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. OMG. Uni ed Modeling
          <source>Language (OMG UML) Version 2.5.1, chapter 11.6.3</source>
          .1 Components semantics.
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Klusch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kapahnke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Schulte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Lecue</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          .
          <article-title>Semantic Web Service Search: a Brief Survey</article-title>
          .
          <source>KI-Kunstliche Intelligenz</source>
          ,
          <volume>30</volume>
          (
          <issue>2</issue>
          ):
          <volume>139</volume>
          {
          <fpage>147</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>K.</given-names>
            <surname>Kurniawan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.J.</given-names>
            <surname>Ekaputra</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.R.</given-names>
            <surname>Aryan</surname>
          </string-name>
          .
          <article-title>Semantic Service Description and Compositions: A Systematic Literature Review</article-title>
          . In ICICoS, pages
          <volume>1</volume>
          {
          <issue>6</issue>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>M. C. Suarez-Figueroa</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Gomez-Perez</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Fernandez-Lopez</surname>
          </string-name>
          .
          <article-title>The NeOn Methodology for Ontology Engineering</article-title>
          , pages
          <fpage>9</fpage>
          <lpage>{</lpage>
          34. Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>G.</given-names>
            <surname>Alary</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Hernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Arcangeli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Trouilhet</surname>
          </string-name>
          , and J.
          <string-name>
            <surname>-M. Bruel</surname>
          </string-name>
          .
          <article-title>Comp-O: an OWL-S Extension for Composite Service Description</article-title>
          .
          <source>In Proc. of the 22nd Int. Conf. on Knowledge Engineering and Knowledge Management (EKAW)</source>
          ,
          <year>2020</year>
          . To appear.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>M.</given-names>
            <surname>Koussai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Trouilhet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Arcangeli</surname>
          </string-name>
          , and J.
          <string-name>
            <surname>-M. Bruel</surname>
          </string-name>
          .
          <article-title>Automated useroriented description of emerging composite ambient applications</article-title>
          .
          <source>In Proc. of the 31st Int. Conf. on Software Engineering and Knowledge Engineering (SEKE)</source>
          , pages
          <fpage>473</fpage>
          {
          <fpage>478</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>