<!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 Graphical Tool for Automatic Generation of OWL Ontologies</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>
        <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>
      <abstract>
        <p>-The ontologies are became the backbone of the semantic web, the development of these ontologies from scratch is a very difficult task. The use of models is useful to deal with such problems since it allows visually modeling of the ontologies themselves. In this paper, we propose an approach based on the combined use of Meta-modeling and Graph Grammars to automatically generate a visual modeling tool for OWL ontologies. In our approach registered in the MDA architecture, the UML Class diagram formalism is used to define a metamodel of class diagrams. The meta-modeling tool ATOM3 is used to generate a visual modeling tool according to the proposed class diagram meta-model. We have also proposed a graph grammar to automatically generate OWL ontologies of the graphically specified class diagram models. This allows the user to pass a very important step in the development process of OWL ontologies. Our environment is illustrated through an example.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>The ontologies are became the backbone of the semantic
web, this last provides various languages for representing
ontologies including XML, RDF, DAML, and OWL. OWL
(Ontology Web Language) is the most widely used of these
languages because of its high expressive power and the fact
that it is the W3C standard ontology language for the Semantic
Web [10].</p>
      <p>
        In the other hand, UML is the unified object oriented
modeling language which became an important standard
widely used by domain experts for expressing their domain
knowledge. The development of OWL ontologies from scratch
is a very difficult task. The use of models is useful to deal with
such problems since it allows visually modeling of the
ontologies themselves. An OWL ontology visualized as UML
diagrams allow us to better describe our ontology to humans,
and most people can understand an UML class diagram at a
glance. In this paper we propose an approach based on the
combined use of Meta-modeling and Graph Grammars to
automatically generate a visual modeling tool for OWL
ontologies. We implement these concepts presented above in
ATOM3: A Tool for Multi-formalism and Meta-Modeling [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
We propose an UML class diagram meta-model and we use the
meta-modeling tool AToM3 to generate automatically a visual
modeling tool to process UML class diagram models. We also
define a graph grammar to translate the models created in the
Mustapha BOURAHLA
generated tool to OWL ontologies represented in RDF/XML
format.
      </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, and then we
give an overview of the AToM3 tool [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In Section 5, we
describe our approach that provides a graphical environment
for automatic generation of OWL ontologies. In Section 6, we
illustrate our tool through an example. Finally concluding
remarks drawn from the work and perspectives for further
research are presented in Section 7.
      </p>
      <p>
        The idea of our work is not innovating, indeed several
works exist in the literature tackle this subject. In [14] the
authors proposed a transformation of UML towards DAML at
the end of the Nineties, by showing similarities and differences
between the two languages. In [15] the work of “Converting
UML to OWL Ontologies” proposed a transformation of
Ontology UML Profile (OUP) towards an ontology OWL. 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 as well as mappings amongst RDF,
RDFS, Common Logic and Topic Maps, it should be noted that
several works are carried out like answer to the call of the
OMG and gathered in the ODM that we do not evoke here. In
[9], 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 (intermediate
format of UML model) to generate an ontology OWL DL
represented as RDF/XML format. And finally in [16], the
authors proposed a detailed comparison between UML and
OWL that carried out in 2008. In the other side Atom3 has
been proven to be a very powerful tool allowing the
metamodeling 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 pre-ceding
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 another vision different from that approached in
preceding works either in the proposition of transformation
rules, or in theirs implementation, this vision is to propose the
transformation rules in a level of abstraction close to the
application in order to obtain usable ontologies, because more
the selected level of abstraction is close to the application
minus ontology is reusable, but more it is usable. Then we
propose a graph grammar implementation for these rules.</p>
    </sec>
    <sec id="sec-2">
      <title>III. OWL FROM UML CLASS DIAGRAM</title>
      <p>
        UML (Unified Modeling Language) is a language to
visualize, specify, build and document all the aspects and
artifacts of a software system [7]. UML defines thirteen
diagrams; some of them represent the system statically while
others show the functionalism of the system. The class diagram
is considered very important for object oriented modeling; it
shows the internal structure of a system and makes it possible
to provide an abstract representation of its objects [
        <xref ref-type="bibr" rid="ref2">2</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. OWL1 offers
three sub-languages with increasing expression intended for
specific communities of developers and users: OWL Lite,
OWL DL, and OWL Full [10] whereas OWL2 defines three
new profiles: OWL2 EL, OWL2 QL, and OWL2 RL [13].</p>
      <p>
        UML and OWL have different goals and approaches;
however they have some overlaps and similarities, especially
for representation of structure (class dia-grams). 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, whereas
OWL is a notation for knowledge representation, but both are
modeling languages.
      </p>
    </sec>
    <sec id="sec-3">
      <title>IV. GRAPH TRANSFORMATION</title>
      <sec id="sec-3-1">
        <title>A. Overview</title>
        <p>Modeling and model transformation play an essential role
in the MDA “Model Driven Architecture”. MDA recommends
the massive use of models in order to allow a flexible and
iterative development, thanks to refinements and enrichments
by successive transformations.</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. The principle of model
transformation is illustrated by figure 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.
        </p>
        <p>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>
          Therefore, the graph transformation is the process to choose
a rule among the graph grammar rules, apply this rule on a
graph pattern that is matched with the LHS pattern to produce
the RHS pattern, and reiterate the process until no rule can be
applied [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>B. AToM3</title>
        <p>
          AToM3 [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] “A Tool for Multi-formalism and
MetaModeling” is a visual tool for model transformation, written in
Python [8] and is carried out on various platforms (Windows,
Linux, …). It implements various concepts like multi-paradigm
modeling, meta-modeling and graph grammars. It can be also
used for simulation and code generation.
        </p>
        <p>AToM3 provides visual models those are conform to a
specific formalism, and uses the graph grammar to go from a
model to another.</p>
        <p>In the next sections, we will discuss how we use AToM3 to
meta-model class diagrams and how to generate OWL models
by applying a graph grammar.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>V. 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. In our approach
we have to profit from the convergence between UML and
OWL especially for representation of structure (class
diagrams), most people can model and understand UML class
diagram at a glance, it is not the case in different
representations of ontologies like RDF/XML, Turtle or other
representations. We have to benefit of visualizing OWL
ontologies as UML class diagram models.</p>
      <p>For the realization of this application we have to propose
and to develop a meta-model of class diagram (figure 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
usable ontologies.</p>
      <p>For the ontology, the choice among OWL profiles is made
on OWL DL because it places certain constraints on the use of
the structures of OWL such as separation two to two between
classes, datatypes, datatype properties, objects properties,
annotation properties, ontologies properties, individuals, data
values, and integrated vocabulary [11]. That means, for
example, a class cannot be at the same time an individual [12].
These constraints enable us to lead to our objective which is an
ontology well reflecting what is modeled in a class diagram.</p>
      <sec id="sec-4-1">
        <title>A. Transformation rules</title>
        <p>Our approach is realized according to suggested
transformation rules (Table I). We propose a set of rules in
particular for classes‟ transformation, enumerations,
associations, roles, dependencies, association classes, and
almost all the elements of a class diagram. The level of
abstraction in those rules is close to the application in order to
have usable ontologies. For lack of space, we have presented
some of these rules.</p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Datatypes transformation</title>
        <p>UML data types are transformed into XML schema (XSD)
data types because OWL uses the majority of the datatypes
integrated into XML schema. The calls of these datatypes are
done through datatype URI address reference
http://www.w3.org/2001/XMLSchema [11]. The instances of
the primitive types used in UML itself include: Boolean,
Integer, String, and UnlimitedNatural [7]. Table II presents the
UML primitive datatypes and their transformations.</p>
        <p>UML
Integer
Boolean</p>
        <p>String
UnlimitedNatural</p>
        <p>XSD
xsd:integer
xsd:boolean
xsd:string
xsd:nonNegativeInteger
xsd:positiveInteger</p>
      </sec>
      <sec id="sec-4-3">
        <title>C. 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
metaformalism (CD_classDiagramsV3), and the constraints are
expressed in Python [8] code (fig. 3):</p>
        <p>After we built our meta-model, it remains only its
generation. The generated meta-model 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.</p>
      </sec>
      <sec id="sec-4-4">
        <title>D. 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 id="sec-4-4-1">
          <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-4-4-2">
          <title>Rule 1: Class transformation</title>
          <p>Name: class2class</p>
        </sec>
        <sec id="sec-4-4-3">
          <title>Priority: 1</title>
          <p>Role: This rule transforms an UML class towards an OWL
class (see Table III). In the condition of the rule we test if the
class is already transformed, if not, in the action of the rule we
reopen the OWL file to add the OWL code of this class.
:=</p>
        </sec>
        <sec id="sec-4-4-4">
          <title>Action</title>
        </sec>
        <sec id="sec-4-4-5">
          <title>Rule 3: Binary association transformation</title>
          <p>Name: asso2prop</p>
        </sec>
        <sec id="sec-4-4-6">
          <title>Priority: 3</title>
          <p>Role: This rule transform an association of the class diagram
towards an OWL object property, it allows also the
transformation of roles and cardinalities of this association.</p>
        </sec>
        <sec id="sec-4-4-7">
          <title>Rule 4: Association-class transformation</title>
          <p>Name: ac2class</p>
        </sec>
        <sec id="sec-4-4-8">
          <title>Priority: 1</title>
          <p>Role: This rule allows the promotion of association class to a
full class (see Table VI), that reflects what we show in the
transformation rules. This class takes as name the name of the
LHS class-association preceded by (AC-). Two binary
associations are created in the RHS named AG_AC, AD_AC,
thus two new roles RG_AC and RD_AC as illustrated in the
transformation rules.</p>
        </sec>
        <sec id="sec-4-4-9">
          <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;‟ (see fig. 5).</p>
          <p>Let us apply our approach on a simple example of
development of a small OWL ontology which describes a
population; it describes a group of people and their relations of
parenting.</p>
          <p>The population which we wish to describe is made up of
humans, and divided into two subclasses Man and Woman.
Human can have a relationship with another human. A man
and a woman can be married. This small ontology can be
modeled quite simply with the class diagram (fig. 6).</p>
          <p>We start the execution of our graph grammar; we obtain the
intermediate graph (see fig. 7). In parallel, there is an automatic
generation of the file which contains OWL code stored on hard
disc (see fig. 9):</p>
          <p>After the execution of the graph grammar on our example
we obtain our ontology generated and stored. We can visualize
this ontology by specialized tools such as SWOOP (fig. 8):</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>VII. CONCLUSION</title>
      <p>We saw in this paper how to implement an application
which makes a graphical environment for the automatic
generation of OWL ontologies based on class diagram models
and by using graph transformation in particular the powerful
tool AToM3. 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 visually 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 environment to
automatically generate OWL/SWRL from UML/OCL models
in AToM3.</p>
      <p>V1.0,</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <fpage>AToM3</fpage>
          . 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.univpa ris13.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-list>
  </back>
</article>