<!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>SPARQL-based Detection of Antipatterns in OWL Ontologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>François Scharffe EXMO team</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>INRIA Grenoble Rhône-Alpes Saint-Ismier</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>France francois.scharffe@inria.fr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Catherine Roussey Cemagref Aubiére, France Université de Lyon</institution>
          ,
          <addr-line>CNRS Université Lyon 1, LIRIS UMR5205 Villeurbanne</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ondrej Svab-Zamazal Knowledge Engineering Group University of Economics Prague</institution>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Oscar Corcho Ontology Engineering Group Departamento de Inteligencia Artificial Universidad Politécnica de Madrid</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Ontology antipatterns are structures that re ect ontology modeling problems because they lead to inconsistencies or to bad reasoning performance. Based on a collection of antipatterns coming from our experience in ontology engineering projects and bad modeling practices found in the literature, we propose to represent them as SPARQL queries and conduct an experiment to detect them in an ontology corpus obtained from the Watson ontology search portal.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Categories and Subject Descriptors</title>
      <p>I.2.4 [Computing Methodologies]: Arti cial
IntelligenceKnowledge Representation Formalisms and Methods
Experimentation
Antipattern detection, SPARQL query, OWL ontology</p>
    </sec>
    <sec id="sec-2">
      <title>1. INTRODUCTION</title>
      <p>The focus of this poster is to understand, in the context
of a larger experiment, how often antipatterns appear in
existing publicly available ontologies and how these
antipatterns are normally clustered in them, so as to understand
better their characteristics and their importance in terms
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.</p>
      <p>EKAW ’2010 Lisbon, Portugal
Copyright 2010 ACM X-XXXXX-XX-X/XX/XX ...$10.00.
of addressing them later in the context of ontology
debugging tools and tasks inside methodologies and methods. To
achieve this objective, we have selected a set of ontologies
from those available in the Watson semantic search engine,
we have transformed the selected antipatterns from our
catalogue into sets of SPARQL queries or have transformed
the original ontologies into a form where simpler SPARQL
queries can be run to detect antipatterns, and have run those
queries against the selected ontologies or their
transformations, switching on and o inferences, so as to see whether
there is any impact in the detection and posterior repair of
the ontologies.
2.</p>
    </sec>
    <sec id="sec-3">
      <title>A CATALOGUE OF ANTIPATTERNS</title>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] we identi ed a set of patterns commonly used by
domain experts in their implementation of OWL
ontologies, and which normally resulted in unsatis able classes or
modelling errors. These patterns are categorized into three
groups:
      </p>
      <p>Detectable Logical AntiPatterns (DLAP). They
represent errors that DL reasoners and debugging tools
normally detect. Our experiment is focused on the
detection of three examples of DLAP antipattern: AndIsOr
(AIO), OnlynessIsLoneliness (OIL), UniversalExistence
(UE).</p>
      <p>Cognitive Logical AntiPatterns (CLAP). They
represent possible modelling errors that may be due to a
misunderstanding of the logical consequences of the
used expression. We try to detect two of them:
SynonymOrEquivalence (SOE), SumOfSom (SOS).</p>
      <p>Guidelines (G). They represent complex expressions
used in an ontology component de nition that are
correct from the logical and cognitive points of view, but
for which the ontology developer could have used other
simpler alternatives or more accurate ones for
encoding the same knowledge. We choose to detect only one
antipattern of this type namely
DisjointnessOfComplement (DOC).
3.</p>
    </sec>
    <sec id="sec-4">
      <title>ANTIPATTERN DETECTION METHODS</title>
      <p>We have elaborated four di erent strategies in order to
detect antipatterns in OWL ontologies by means of SPARQL
queries, based on the usage of the PatOMat ontology pattern
detection tool1. This tool is part of the PatOMat enables
the processing of a set of SPARQL queries over a set of
ontologies, producing a report in terms of numbers of patterns
detected (queries) and details for each ontology.</p>
      <p>Transforming antipatterns into SPARQL queries is not
a trivial task. In some cases several SPARQL queries are
needed to represent all the possible versions of an
antipattern, and some of these transformations are di cult to
generate.</p>
      <p>Now we will show the di erent approaches that we have
followed in order to detect antipatterns in the collection of
ontologies that we have selected.</p>
      <p>In this approach, we take into account that SPARQL
query engines per se do not consider inferences that can
be done with OWL ontologies. However, our
assumption is that there will be cases where this is the only
solution that can be applied due to the fact that in some
cases inconsistent ontologies can lead to di culties in
the detection of antipatterns due to some wrong
inferences being done across the whole hierarchy. Hence
we write in general a large number of queries for each
antipattern, so that we embed in the syntax of those
SPARQL queries some of the inferences that should be
done in the OWL ontologies, which could be done with
a reasoner.</p>
      <p>When it is possible to use a reasoner, we materialise all
the inferences that can be done by an OWL reasoner on
the selected ontologies and then run SPARQL queries
over the resulting ontologies.</p>
      <p>Due to the uncertainty about some results from
reasoners, to the complexity of creating a large number
of SPARQL queries for an antipattern, and nally to
the fact that di erent ontology developers may have
di erent implementation styles, what leads to very
different alternative implementations of the same sets of
axioms, and makes it di cult to nd all the
possibilities in which queries should be generated in order to
identify antipatterns, we propose to follow a two step
process where we harmonise the implementation style
of the ontology using transformations before
proceeding to execute the queries.</p>
      <p>In this strategy, we have explored the behaviour of
the SPARQL query checking method on the asserted
ontology after transformation.
1The release used for this poster is at: http://eso.vse.cz/
~svabo/patomat/detectionTool.zip
4. SP Trans+R: Apply transformations on the original
ontologies in order to harmonize the axioms, and search
in the materialisation of these harmonised ontologies.
In this strategy, we transformed the ontologies in order
to harmonise the implementation style. Then, we have
explored the behaviour of the SPARQL query
checking method on the materialised ontology (also after
transformation).
4.</p>
    </sec>
    <sec id="sec-5">
      <title>EXPERIMENTS</title>
      <p>We have used the Watson API to retrieve publicly
available ontologies that we could run experiments with, and
we have always accessed these ontologies using the
Watson cache. We searched for ontologies satisfying the
following constraints: they should be implemented in OWL, they
should have at least ve classes, they should be classi ed
as inconsistent by Pellet reasoner. So the corpus is nally
composed of 66 incoherent ontologies.</p>
      <p>The table 1 shows a summary of the total numbers of
antipatterns detected on the selected ontologies using each
of the methods that have been proposed.</p>
      <p>method of
detection</p>
      <p>SP</p>
      <p>SP+R</p>
      <p>SP Trans
SP Trans+R
29
24382</p>
      <p>UE
15
3268
The results analysis shows that although antipatterns in
the collection occur rarely, they tend to appear many times
in the same ontology, re ecting a bad modeling practice.
5.</p>
    </sec>
    <sec id="sec-6">
      <title>CONCLUSION</title>
      <p>In this poster, we present how antipatterns can be
detected using di erent methods and we have tried to show
which is the best detection process to be used for each type
of antipattern. In many cases, these antipattern detection
tools are very sensitive to the implementation style of the
ontology developer.</p>
    </sec>
    <sec id="sec-7">
      <title>ACKNOWLEDGMENTS</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>O.</given-names>
            <surname>Corcho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Roussey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Vilches Blazquez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and I.</given-names>
            <surname>Perez</surname>
          </string-name>
          .
          <article-title>Pattern-based OWL Ontology Debugging Guidelines</article-title>
          . In Workshop on Ontology Patterns (
          <article-title>WOP 2009), collocated with the 8th International Semantic Web Conference (ISWC-</article-title>
          <year>2009</year>
          )., CEUR Workshop proceedings, pages
          <volume>68</volume>
          {
          <fpage>82</fpage>
          ,
          <string-name>
            <surname>Oct</surname>
          </string-name>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>