<!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>From UML class diagrams to OWL ontologies: a Graph transformation based Approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Aissam BELGHIAT</string-name>
          <email>Belghiatissam@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mustapha BOURAHLA</string-name>
          <email>mbourahla@hotmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Md Boudiaf</institution>
          ,
          <addr-line>Msila, 28000</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
      </contrib-group>
      <fpage>330</fpage>
      <lpage>335</lpage>
      <abstract>
        <p>Models are placed by modeling paradigm at the center of development process. These models are represented by languages, like UML the language standardized by the OMG which became necessary for development. Moreover the ontology engineering paradigm places ontologies at the center of development process, in this paradigm we find OWL (the description language adopted by a great community of users) the principal language for knowledge representation. The bridging between UML and OWL appeared on several regards such as the classes and associations. In this paper, we propose an approach based graph transformation and registered in the MDA architecture for the automatic generation of OWL ontologies from UML class diagrams. The transformation is based on transformation rules; the level of abstraction in these rules is close to the application in order to have usable ontologies.</p>
      </abstract>
      <kwd-group>
        <kwd>UML</kwd>
        <kwd>Ontology</kwd>
        <kwd>OWL</kwd>
        <kwd>ATOM3</kwd>
        <kwd>MDA</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>UML is the unified object oriented modeling language which became an important
standard. In the other side, the ontologies became the backbone of the semantic web
which described formally using a standard language called OWL (Ontology Web
Language). In this work we propose a set of rules for transforming classes diagrams
into OWL ontologies in the order to profit from the power of ontologies so that the
information described by those diagrams can be shared and linked with other
information and we could start dealing with the overlaps, gaps, and integration barriers
between modeling languages and get greater value out of the information capture.
These rules will be implemented within AToM3 to automate this transformation.</p>
      <p>The rest of the paper is organized as follows: In Section 2, we present some related
works. In Section 3, we present some basic notions about UML, OWL. In Section 4,
we present concepts about model and graph transformation. In Section 5, we describe
our approach. Finally concluding remarks drawn from the work and perspectives for
further research are presented in Section 6.</p>
    </sec>
    <sec id="sec-2">
      <title>Related Works</title>
      <p>
        The idea of our work is not innovating, indeed several works exist in the literature
tackle this subject. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] the OMG notices the interest of such subject and proposed
in its turn the ODM which provides a profile for writing RDF and OWL within UML,
it also includes partial mappings between UML and OWL. In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], the author presented
an implementation of the ODM using ATL language. In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the author used a style
sheet “OWLfromUML.xsl” applied to an XMI file to generate an ontology OWL DL
represented as RDF/XML format. In the other side Atom3 has been proven to be a
very powerful tool allowing the meta-modeling and the transformations between
formalisms, in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and other works we can found treatment of class diagrams, activity,
and other UML diagrams. In these works the Meta modeling allows visual modeling
and graph grammar allows the transformation.
      </p>
      <p>Obviously, the heart of our work is articulated on transformation rules and their
implementation. In preceding works, the transformation rules are more specific and
reflect a general opinion of the author often related to a specific field which he works
on (specific transformation). In this paper we propose that transformation rules are in
a level of abstraction close to the application in order to obtain usable ontologies.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Bridging UML and OWL</title>
      <p>
        UML (Unified Modeling Language) is a language to visualize, specify, build and
document all the aspects and artifacts of a software system [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        OWL (Ontology Web Language), was recommended by the W3C in 2004, and its
version 2 in 2009, is designed for use by applications that need to process the content
of information instead of just presenting information to humans [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        UML and OWL have different goals and approaches; however they have some
overlaps and similarities, especially for representation of structure (class diagrams).
UML and OWL comprise some components which are similar in several regards, like:
classes, associations, properties, packages, types, generalization and instances [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
UML is a notation for modeling the artifacts of objects oriented software [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], whereas
OWL is a notation for knowledge representation, but both are modeling languages.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Graph Transformation</title>
      <p>Model transformation play an essential role in the MDA. MDA recommends the
massive use of models in order to allow a flexible and iterative development.</p>
      <p>A model transformation is a set of rules that allows passing from a meta-model to
another, by defining for each one of elements of the source their equivalents among
the elements of the target. These rules are carried out by a transformation engine; this
last reads the source model which must be conform to the source meta-model, and
applies the rules defined in the model transformation to lead to the target model which
will be itself conform to the target meta-model (see fig. 1).</p>
      <p>
        Graph transformation was largely used for the expression of model transformation
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Particularly transformations of visual models can be naturally formulated by
graph transformation, since the graphs are well adapted to describe the fundamental
structures of models. The set of graph transformation rules constitutes what is called
the model of graph grammar, each rule of a graph grammar is composed of a left hand
side (LHS) pattern and of a right-hand sided (RHS) pattern.
      </p>
      <p>
        AToM3 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] “A Tool for Multi-formalism and Meta-Modeling” is a visual tool for
model transformation, written in Python [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and is carried out on various platforms. It
provides visual models those are conform to a specific formalism, and uses the graph
grammar to go from a model to another.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Our approach</title>
      <p>Our solution is implemented in AToM3. Our choice is quickly related to AToM3
because of the advantages which it presents like its simplicity, and its availability.</p>
      <p>
        For the realization of this application we have to propose and to develop a
metamodel of class diagram (fig.2), this meta-model allows us to edit visually and with
simplicity class diagrams on AToM3 canvas. In addition to meta-model proposed we
develop a graph grammar made up of several rules which allows transforming
progressively all what is modeled on the canvas towards an OWL ontology stored in a
disk file (fig.2). The graph grammar is based on transformation rules; those rules try
to transform the class diagram in the implementation level, always in order to obtain
at the end a usable description of ontology. For ontology, the choice among OWL
profiles is made on OWL DL because it places certain constraints on the use of the
structures of OWL [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ][
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
5.1
      </p>
      <sec id="sec-5-1">
        <title>Transformation rules</title>
        <p>Our approach is realized according to suggested transformation rules (Table 1). We
propose a set of rules for all elements of a class diagram. The level of abstraction of
rules is close to the application. For lack of space, we have presented one rule.</p>
      </sec>
      <sec id="sec-5-2">
        <title>Class</title>
        <p>An UML class is transformed to an OWL class; the name of the class is preserved.
&lt;owl:Class rdf:ID="ClassName"/&gt;
5.2</p>
      </sec>
      <sec id="sec-5-3">
        <title>Meta-model of UML Class diagram</title>
        <p>
          To build UML class diagram models in AToM3, we have to define a meta-model for
them. Our meta-model is composed of two classes and four associations developed by
the meta-formalism (CD_classDiagramsV3), and the constraints are expressed in
Python [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] code (fig.3):
        </p>
        <p>After we built our meta-model, it remains only its generation. The generated
metamodel comprises the set of classes modeled in the form of buttons which are ready to
be employed for a possible modeling of a class diagram.
5.3</p>
      </sec>
      <sec id="sec-5-4">
        <title>The Proposed Graph grammar</title>
        <p>To perform the transformation between class diagrams and OWL ontologies, we have
proposed a graph grammar composed of an initial action, ten rules, and a final action.
For lack of space, we have not presented all the rules.</p>
      </sec>
      <sec id="sec-5-5">
        <title>Initial Action: Ontology header</title>
        <p>Role: In the initial action of the graph grammar, we created a file with sequential
access in order to store generated OWL code. Then we begin by writing the ontology
header which is fixed for all our generated ontologies (fig. 4).</p>
      </sec>
      <sec id="sec-5-6">
        <title>Final Action: Definition of the end of ontology</title>
        <p>Role: In the final action of the graph grammar, we end our ontology, we will have to
open our file and to add „&lt;/rdf:RDF&gt;‟ (cf. fig. 5).
We saw in this paper how to implement an application which makes a transformation
from a UML class diagram to an OWL ontology based on graph transformation and
by using the tool AToM3.</p>
        <p>For the realization of this application we developed a meta-model for UML class
diagrams, and a graph grammar composed of several rules which enables us to
transform all what is modeled in our AToM3 generated environment to an OWL ontology
stored in a hard disk file.</p>
        <p>In future work, we plan to extend the transformation of semantic rules models
towards the language of rules SWRL (Semantic Web Rule Language).
7</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. AToM3. Home page: http://atom3.cs.mcgill.ca.
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Laurent</surname>
            <given-names>AUDIBERT</given-names>
          </string-name>
          , “UML2”, http://www.lipn.univparis13.fr/audibert/pages/ enseignement/cours.htm,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Fowler</surname>
            , Martin,
            <given-names>“UML</given-names>
          </string-name>
          <string-name>
            <surname>Distilled - Third Edition - A Brief</surname>
          </string-name>
          <article-title>Guide to the Standard Object Modeling Language”</article-title>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>G.</given-names>
            <surname>Karsai</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Agrawal, “
          <article-title>Graph Transformations in OMG‟s Model-Driven Architecture”</article-title>
          ,
          <source>Lecture Notes in Computer Science</source>
          , Vol
          <volume>3062</volume>
          , Springer, juillet
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Sebastian</given-names>
            <surname>Leinhos</surname>
          </string-name>
          , http://diplom.ooyoo.de,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. OMG, “Ontology Definition Metamodel”, http://www.omg.org/spec/ODM/1.0, May
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. OMG,
          <string-name>
            <surname>“OMG Unified Modeling</surname>
            <given-names>Language</given-names>
          </string-name>
          , Infrastructure,
          <year>v2</year>
          .3”,http://www.omg.org/spec/UML/2.1.2/Infra structure/PDF, May
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Python</surname>
          </string-name>
          . Home page: http://www.python.org.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. SIDo Group, “
          <article-title>ATL Use Case - ODM Implementation (Bridging UML and OWL)”</article-title>
          ,http://www.eclipse.org /m2m/atl/usecases/ODMImplementation/,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. W3C OWL Working Group, “
          <article-title>OWL Web Ontology Language-Overview”</article-title>
          , http://www.w3.org/TR/2004/rec-owl-features-
          <volume>20040210</volume>
          /.
          <source>W3C Recommendation 10 February</source>
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. W3C OWL Working Group, “
          <article-title>OWL Web Ontology Language-Guide”</article-title>
          , http://www.w3.org/TR/2004/REC-owl
          <source>-guide-20040210. W3C Recommendation 10 February</source>
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>