<!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>A Semantics-Based Approach to Software Reuse</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrea Taglialatela</string-name>
          <email>andrea.taglialatela@trs.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Taglino</string-name>
          <email>francesco.taglino@iasi.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Istituto di Analisi dei Sistemi ed Informatica ―A. Ruberti‖ - IASI-CNR Viale Manzoni 30</institution>
          ,
          <addr-line>00185 Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Tecnologia nelle Reti e nei Sistemi - T.</institution>
          <addr-line>R.S. SpA Via della Bufalotta 378 00139 Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This work presents the ongoing development of a semantics-based method for supporting software reuse. Among the different paradigms the reuse of software can be characterized by, we focus on the retrieval aspect. To this end, the proposed method is based on three main aspects: (i) the building of a domain reference ontology. This is carried on through the adoption of the SOBE (Social Ontology Building and Evolution) method; (ii) semantic annotation of software artefacts. We introduced the concept of Semantic Descriptor as the mean for creating semantics-based information proxies of the software artefacts; (iii) semantics-based search and retrieval of software artefacts. We adopted SemSim, a semantic similarity matching method. The work is conducted within the Sentinel project.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Software reuse is a fundamental aspect of industry best practices. It represents a
degree of maturity of software development and provides clear benefits [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]:
─ Portability, to reduce the effort required to support applications across different OS
platforms, programming languages, and compilers;
─ Flexibility, to support a growing range of patterns;
─ Extensibility, to support updates and additions of new features;
─ Reliability, to ensure that software components are robust and fault tolerant.
In addition to that, software reusability has to be also supported by mechanisms for
easily and efficiently access and retrieve available software artefacts. This work
addresses this aspect, by presenting an ontology-based approach for creating a
semantically enriched library of software artefacts for supporting software artefacts retrieval.
The proposed approach is based on the following steps:
─ Definition of the domain specific knowledge: this is a crucial aspect in
addressing any interoperability problem. Different actors and stakeholders (e.g., software
developers and designers) need to share a common reference in order to act in an
heterogeneous environment. In our case, this common reference is represented by a
domain ontology which describes the relevant concepts the software talks about
(e.g., air traffic control). To this end, we propose SOBE (Social Ontology Building
Evolution) a method which mixes automatic knowledge extraction and social
participation facilities for building domain ontologies.
─ Semantic description of software artefacts: for each software artefact, a
semantics-based image is built by instantiating a semantic descriptor (SD) which allows
the description of a piece of software by using the common domain ontology.
─ Semantics-based search and retrieval of software artefacts: once a repository of
semantic descriptors has been established searching for software artefacts means to
query semantic descriptors and retrieve software resources by following the link to
the actual software repository. This allow people to interact with homogeneous
proxies of the actual resources, since descriptors are characterized by content from
the common domain ontology.
      </p>
      <p>The paper is organized in the following way. In section 2, SOBE, the proposed
method for ontology building is presented. In section 3, the description of the method
for the semantic description of software artefacts is reported. In section 4, the
semantic search similarity method for retrieval of semantically described software artefacts
is described. Section 5 reports about related works, and finally Conclusions and
Future Work section ends the manuscript.
2</p>
    </sec>
    <sec id="sec-2">
      <title>SOBE: a method for social participation in building reference ontologies</title>
      <p>
        The methodology for building the reference ontology representing the application
domain that certain software components refer to is SOBE (Social Ontology Building
and Evolution). It derives from the UPON [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] methodology.
      </p>
      <p>
        UPON is a methodology for building domain ontologies developed along the
guideline of the Unified Process [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], a consolidated method in the context of software
engineering. UPON is based on an incremental process which is given by the enrichment
of intermediate artefacts (e.g., a lexicon, and a glossary).
      </p>
      <p>Inspired by UPON, SOBE is characterized by the following main aspects:
─ An incremental approach through the production of the following results:
o Lexicon, that defines the shared terminology;
o Glossary, through the enrichment of the terms in the lexicon by identification
of natural language descriptions. Once natural language definitions have been
attached, synonyms can be identified. In the case of synonyms, one of the
term is chosen as preferred term;
o IS-A taxonomy, through the identification of generalization/specialization
relationships between concepts;
o Definition of further relationships, such as part-of.
─ Knowledge extraction from documental resources: in building ontologies,
especially when they are about very specific application domains (e.g., in the case of
the air traffic control), it is necessary to refer to existing sources. Such sources can
come either from standards (or somehow validated), or from the company
developing the software (e.g., technical specifications, source code). The former contribute
in giving solidity to the ontology, while the latter contribute in terms of specific
company needs. The proposed methodology considers informative sources of
different nature:
o Non structured sources: for these typologies of textual documents natural
language technique are used to analyze the text and extract terms and more
complex linguistic expressions (chunk extraction);
o Structured sources (e.g., glossaries or taxonomies): which are considered as
they are.
─ Social participation of domain experts involved in the application domain the
software library refers to. This step aims at validating and enriching a consensus on the
contents to be included in the ontology. The social participation to the ontology
building is supported by two main aspects:
o Voting: to allow domain experts to express preferences on the addition or
removal of automatic extracted contents.
o Discussing: to evaluate in a collaborative manner the introduction of certain
contents in the ontology.
3</p>
    </sec>
    <sec id="sec-3">
      <title>A method for semantic enrichment of software artefacts</title>
      <p>With semantic enrichment we here intend the possibility to associate to a digital
resource (in our case to a software artefact, such as, Java Classes or Packages) a
description built in terms of a reference ontology.</p>
      <p>The proposed methodology is characterised by the following aspects:
─ Semantic Descriptor: the informative structure which allows the annotation to be
represented;
─ An automatic support to the annotation which is based on the analysis of comments
accompanying the software code;
─ Manual validation of the automatic suggestion.</p>
      <sec id="sec-3-1">
        <title>3.1 Semantic Descriptor structure</title>
        <p>The Semantic Descriptor represents the informative structure which represents the
annotation of a single software artefact. The descriptor is organized in accordance
with the following structure:
Header: collects the following information items:
 Name: the name of the artefact;
 Description: a natural language description of the artefact;
 Author: who developed the artefact;
 Language: programming language use in the implementation of the artefact;
 Release Date: date in which the artefact has been released;
 ResourceLink: a reference to the actual artefact. Following the value of this
field it is possible from the descriptor to access to the actual resource described
by the descriptor itself;
Some of these fields are taken from the Dublin core Vocabulary1 used to describe
documents.</p>
        <p>
          Content: represents the actual semantic contribution of the descriptor. The Content
section collects the set of concepts belonging to the built reference ontology which
describe the artefact at best. This concepts collection is represented in the form of an
Ontology-based Feature Vector (OFV) [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. When it represents the annotation it is here
called annotation ofv (a-ofv).
        </p>
        <p>Documental references: allow references to documents (e.g., technical
specifications, API documentation) to be specified in the semantic descriptor of the software
artefact..</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Automatic support to the semantic annotation of software artefacts</title>
        <p>When we want to annotate a huge number of software artefacts (e.g., Classes), it is
useful to have an automatic supporting mechanism giving annotation suggestions. The
proposed methodology provides a mechanism like this which is based on the analysis
of the text representing the comments added by the developer to the artefacts. This
means that the result of the automatic support depends much on the quality of the
comments in the code.</p>
        <p>Given a software artefact (e.g., a Java class) the automatic support is organized in the
following way:
─ Identification of the information in the header of the Semantic Descriptor
o Name: corresponds to the name of the artefact (e.g., the name of file or the
folder);
o Description: is given by the comment to the Class;
1 http://dublincore.org/documents/dces/
o Author: in a Java Class, it can be identified by a specific tag (@author) in the
code, it it has been inserted;
o Language: it can be identified by looking at the extension of the file
─ Identification of the concepts from the ontology that describe the artefact (Content
section):
o from the code, comments to the Class and to each method are extracted;
o comments are analysed by using natural language processing techniques in
order to extract nouns in the text. Not only single-word terms are extracted,
but also multi-words ones.
─ In order to identify concepts that are suitable for describing an artefact, extracted
terms are matched with the concepts in the reference ontology. For this purpose,
string matching techniques are applied. If a term extracted from the comments
corresponds to the label of a concept or a synonym of its, then the concept is inserted
in the Content section. If the term occurs in the natural language description of a
concept in the reference ontology, then the concept is inserted in the Content
section but marked as ―Suspected‖.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3 Manual validation of the automatic suggestion</title>
        <p>The automatic support represents a suggestion and as such, it needs to be validated by
a human being who can modify, add or remove proposed annotations. In particular,
those concepts that have been inserted in the Content section as Suspected should
have analysed accurately.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Semantic search of software artefacts</title>
      <p>Once software artefacts have been semantically annotated, search for them can be
performed on semantic descriptors without inspecting software artefacts directly.
Indeed, semantic descriptors have a defined structure and their content is strongly
characterized by the reference domain ontology. In particular, being enriched by
concepts from the reference ontology, allows us to apply a semantic similarity search
method which exploit the Content section of the semantic descriptor.</p>
      <p>The schema of a query is represented by the same structure of a semantic descriptor in
terms of both Header and Content sections.</p>
      <p>
        About the criteria related to the Header section (e.g., the author or the programming
language), an exact matching is required. For what concerns search criteria related to
the Content section, a similarity metrics exploiting the information content of the
concepts in the ontology and their specialization/generalization relationships is
applied. In particular, a request ofv (r-ofv) is specified. For each software artefact, the
semantic similarity method (SemSim) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] computes the semantic similarity between
the a-ofv associated to the artefact and the r-ofv. On the basis of the obtained
similarity degree, a ranking of the software artefacts is defined.
      </p>
      <p>
        Since the SemSim method is based on an information content approach, each concept
in the ontology has associated a weight representing the probability that the concept
annotates a software artefact. In this case we talk about a Weight Reference Ontology
(WRO) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Finally, the search method is based on three steps:
─ Given an a-ofv and a r-ofv, for each pair of concepts (ci, cj), where ci belongs to
aofv and cj belongs to r-ofv is computed. The semantic similarity between pairs of
concepts is computed on the basis of their information content [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ];
─ the similarity between each a-ofv and the r-ofv is computed in accordance with the
maximum weighted matching problem in bipartite graphs [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ];
─ The answer is given in terms of a list of software artefacts on the basis of the
similarity degree corresponding to the a-ofv in the related semantic descriptor.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Related work</title>
      <p>
        [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] groups the approaches for search and retrieval of software artefacts into four
categories: simple keyword-based text search, faceted classification and retrieval,
signature matching and behavioural matching.
      </p>
      <p>
        Keyword-based searching is the simplest approach and its effectiveness depends on
the names of the components themselves [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        Faceted classification and retrieval involves extracting keywords from components
description and documentation and arranging this information into a predefined
classification scheme (e.g., a taxonomy). Despite promising results [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], this approach is
very effective if maintenance to the classification scheme is provided in efficient way.
Pure signature-based matching approaches, like [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], describes components on the
basis of their input and output parameters, but components having matching
signatures do not guarantee to be related.
      </p>
      <p>
        Behavioural matching extends signature matching and attempts to describe the
behaviour of a component. However, this approach appears cumbersome and hard to apply
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        Among semantics-based approaches we recall Fusion [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] which provides a method
for describing components similar to the one used for describing services. However, it
allows only one single domain category to be specified for describing a software
component.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions and Future Work</title>
      <p>In this paper we presented a semantics-based approach aimed at supporting the re-use
of software artefacts. The approach is articulated in three main steps: (i) building an
ontology related to the specific domain the software talks about; (ii) annotating the
software artefacts. The annotation is performed instantiating semantic descriptors that
represent proxies of the software artefacts and describe their content in terms of the
domain ontology; (iii) allowing the search and retrieval of software artefacts by
querying the repository of the semantic descriptors. The search functionality is
characterised by semantic similarity reasoning that works on the domain specific description of
the software artefacts.</p>
      <p>As future work, we intend to enrich the semantic similarity search by explaining, in a
human interpretable way, the meaning of the returned results, that are currently shown
with a corresponding similarity degree. Furthermore, in line with the objectives of the
Sentinel project, we intend experiment the presented approach in a real case that will
be related to the air traffic control domain.</p>
      <p>In addition, we also intend to extend the annotation criteria by taking into
consideration structural aspects of the software artefacts, such as dependencies among software
components.
shops of the 5th IFIP Conference on Artificial Intelligence Applications &amp; Innovations
(AIAI-2009).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>De Nicola</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Navigli</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Missikoff</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>A software engineering approach to ontology building</article-title>
          ,
          <source>Information Systems</source>
          ,
          <volume>34</volume>
          (
          <issue>2</issue>
          ),
          <fpage>258</fpage>
          -
          <lpage>275</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Formica</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Missikoff</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <year>2002</year>
          .
          <article-title>Concept Similarity in SymOntos: an Enterprise Ontology Management Tool</article-title>
          .
          <source>Computer Journal</source>
          <volume>45</volume>
          (
          <issue>6</issue>
          ),
          <fpage>583</fpage>
          --
          <lpage>594</lpage>
          (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Formica</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Missikoff</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pourabbas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taglino</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <year>2010</year>
          .
          <article-title>Semantic Search for Enterprises Competencies Management</article-title>
          .
          <source>In the Proc. Of the International Conference on KNowledge Engineering and Ontology Development (KEOD)</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Jacobson</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Booch</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rumbaugh</surname>
            <given-names>J</given-names>
          </string-name>
          .
          <source>The Unified Software Development Process, Addison Wesley</source>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <year>1998</year>
          .
          <article-title>An Information-Theoretic Definition of Similarity</article-title>
          .
          <source>In proc. of 15th the International Conference on Machine Learning</source>
          . Madison, Wisconsin, USA, Morgan Kaufmann,
          <fpage>296</fpage>
          -
          <lpage>304</lpage>
          . Shavlik J. W. (ed.).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Luqi</surname>
            , Guo,
            <given-names>J.</given-names>
          </string-name>
          ,
          <year>1999</year>
          .
          <article-title>Toward Automated Retrieval for a Software Component Repository</article-title>
          .
          <source>In Proc, of the 6th Symposium on Engineering of Computer-Based Systems (ECBS 99).</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Mili</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mittermeir</surname>
          </string-name>
          , R.T.,
          <year>1994</year>
          .
          <article-title>Storing and Retrieving Software Components: a Refinement Based System</article-title>
          .
          <source>In Proc. Of the 16th International Conference of Software Engineering.</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Mili</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mili</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mittermeir</surname>
          </string-name>
          , R.T.,
          <year>1998</year>
          .
          <article-title>A Survey of Software Storage and Retrieval</article-title>
          ,
          <source>Annals of Software Engineering</source>
          , vol.
          <volume>5</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>349</fpage>
          -
          <lpage>414</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Ostertag</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prieto-Diaz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Braun</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <year>1992</year>
          .
          <article-title>Computing Similarity in a Reuse Library System - An AI Approach</article-title>
          .
          <source>ACM Transactions on Software Engineering and Methodology</source>
          , vol.
          <volume>1</volume>
          , no. 3.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Resnik</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <year>1995</year>
          .
          <article-title>Using information content to evaluate semantic similarity in a taxonomy</article-title>
          .
          <source>In proc. of IJCAI.</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <year>1999</year>
          .
          <article-title>Why Software Reuse has Failed and How to Make it Work for You</article-title>
          .
          <source>C++ Report</source>
          , Vol
          <volume>11</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>1</given-names>
          </string-name>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Sommerville</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <year>2007</year>
          .
          <string-name>
            <given-names>Software</given-names>
            <surname>Engineering</surname>
          </string-name>
          .
          <source>Pearson Education</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Sugumaran</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Storey</surname>
            ,
            <given-names>V.C.</given-names>
          </string-name>
          ,
          <year>2003</year>
          .
          <article-title>A Semantic-Based Approach to Component Retrieval</article-title>
          .
          <source>SIGMIS Database</source>
          , vol.
          <volume>34</volume>
          , no. 3.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Zygkostiotis</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dranidis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kourtesis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <year>2009</year>
          . Semantic Annotation, Publication, and
          <article-title>Discovery of Java Software Components: An Integrated Approach</article-title>
          .
          <source>In Proc of the Work-</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>