<!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>Supporting Metamodeling in Ontologies Using Rules</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Haya Majid Qureshi[</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wolfgang F</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Klagenfurt</institution>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Metamodeling is a feature in ontologies, which allows for having classes as members of other classes. While providing very exible modeling power, it also comes with decidability issues. Because of this, metamodeling are often outright forbidden or unsupported in modeling frameworks. Some work exists that provides explicit support for metamodeling by augmenting the ontology. We introduce a new approach that provides metamodeling support in ontologies by means of a transformation. It rewrites the metamodeling features automatically into rules (M-rules) and strips them from the ontology. The resulting reduced ontology O0 together with the M-rules then form a hybrid knowledge base, which can be processed using NoHR. This framework allows for e ective reasoning and querying over the combined knowledge of ontology and rules.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontologies</kwd>
        <kwd>Metamodeling</kwd>
        <kwd>Rules</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Metamodeling is a process for specifying conceptual modeling requirements,
where classes have other classes as an instance, called metaconcepts. Relations
between metaconcepts are called metaproperties. The bene t for adding
metamodeling in ontologies provide explicit availability of knowledge. This can allow
for more understandable (less subject to misinterpretation) and reusable
models. Consider an example adopted from [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], concerning the modeling of biological
species, where general of below statments imply subclass relations, stating that
all GoldenEagles are Eagles, all Eagles are Birds and Harry is an instance of
GoldenEagle, which further can be infered as an instance of Eagle and Birds.
      </p>
    </sec>
    <sec id="sec-2">
      <title>SubClassOf(:Eagle :Birds)</title>
    </sec>
    <sec id="sec-3">
      <title>SubClassOf(:GoldenEagle :Eagle)</title>
    </sec>
    <sec id="sec-4">
      <title>ClassAssertion(:GoldenEagle :Harry)</title>
      <p>Copyright © 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>However, in species domain contrary to speci c properties of some species, one
can also articulate expressions about species themselves i.e. \GoldenEagle is
listed in the IUCN Red List of endangered species" states that GoldenEagle as
a whole class is an endangered species, and not just Harry. To formally model
this expression, we can set GoldenEagle as an instance of new class
EndangeredSpecies. Making GoldenEagle a type of EndangeredSpecies is concise and
clear. Note that making GoldenEagle a subclass of EndangeredSpecies would
not be correct, as it results in incorrect conclusions like \Harry is an
EndangeredSpecies". In the aassertion above, EndangeredSpecies is a metaconcept for
GoldenEagle.</p>
      <p>
        OWL Full can express this type of metamodeling, but it is so expressive that
it leads to undecidability [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. OWL 2 DL provides no explicit semantics support
for the example above. This means that the adoption of metamodeling features
in OWL require some other, external mechanism. One promising option is the
hybrid mechanism of enriching ontologies via rules [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Ontology languages and
Logic Programming with their distinct features and bene ts have been widely
studied for knowledge representation on the Semantic Web. Here we focus on
NoHR [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], which provides a general framework for combining non-monotonic
rules with OWL 2 QL. The choice for using non-monotonic rules here are based
on their proximity to common sense reasoning, which seems particularly suitable
for metamodeling, where di erent roles of a single entity may result in di erent
conclusions. The use of OWL 2 QL is also motivated by the Higher Order
Semantics [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], in which the same objects can have multiple interpretations, depending
on their use. Our approach is to automatically remove and transform the
metamodeling portions of an ontology into metamodeling-style non-monotonic rules
(in short M-rules). The resulting hybrid knowledge base can then be queried
using NoHR. This approach allows for avoiding the semantic discrepancy and
inconsistency problems in ontology and yet support metamodeling in ontologies
by means of rules.
2
      </p>
      <sec id="sec-4-1">
        <title>Preliminaries</title>
        <p>
          This section provides a brief overview of the OWL 2 QL ontology language under
Metamodeling Semantics [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] and the Hybrid MKNF formalism [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
OWL 2 QL Let VO be a vocabulary for an ontology, consisting of a tuple
VO = (VN ; VC ; VOP ; VDP ; VDT ; `), where VN is the set of IRIs (International
Resource Identi ers), and VC ; VOP ; VDP and VDT are subsets of VN used to
denote the entity names of classes, object properties, data properties, datatypes.
Any entity in VN may simultaneously have more then one role, for instance it
can either be a class, or an individual, or data property, or an object property or
a data type. Axioms are formed using ExpO over VO, the set of nite expressions
denoting the entities of the ontology.
        </p>
        <p>The Metamodeling Semantics for OWL 2 QL is based on an interpretation
structure, constituted by a tuple = ( ;: I ;: E ;: R;: A;: T ), where is the disjoint
union of the two non-empty sets o (the object domain) and (the alue
domain), and interpretation functions are partial, which means a single object
can simultaneously be an individual :I , a class :E , an object property :R, a data
property :A, and a data type :T . An interpretation I is a pair ( ; I) for ontology
O, where is the interpretation structure and I is the interpretation function.
The semantics of logically implied axioms are de ned in accordance with the
notion of axiom satisfaction with the interpretation I. Moreover, I is said to
be a model of O if there exists at least an interpretation that is a model of O.
Finally, an axiom , is logically implied by O, denoted as O j= , if it holds for
every model of O.</p>
        <p>
          NoHR Hybrid Knowledgebase We adopt hybrid knowledge bases consisting
of well-founded MKNF [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] within NoHR, as combined knowledge representation
for rst-order translatable OWL 2 QL ontologies and non-monotonic rules. A
hybrid MKNF knowledge base K is a pair (O; P), where
{ O is any decidable description logic (DL) language, in our case OWL 2 QL,
and
{ P is nite set of MKNF rules of the form:
        </p>
        <p>KH</p>
        <p>
          KB1+; : : : ; KBn+; notB1 ; : : : ; notBm
where H is the rule head and Bi with arity 1 i m are rst order atoms in
the rule body. A rule with an empty body is a Fact. A rule is a DL-safe rule, if all
variables in the rule occur in at least one non-DL atom. If all rules are DL-safe,
then K is DL-safe. The semantic transformation of K is based on the MKNF
formula (K), to which the semantics of MKNF can be applied. As de ned
in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], well-founded MKNF can be queried based on SLG(O), that guarantees
posing ground queries to the DL part of K. These queries return an atom set,
which, together with already proved information and O, is necessary to derive
an atom of the original query. For a more technical discussion we refer to [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
3
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>M-Ontology to M-Rules Framework</title>
        <p>It is not easy to do metamodeling in ontologies, as there is little language support
for ontological metamodeling. However, OWL 2 provides support for a basic level
of metamodeling in ontologies via the use of Punning, but standard reasoners
give no semantic support for those punned entities and treat them as di erent
type of entities. Moreover, metamodeling features in ontology can easily pose
semantic discrepancy in O, that results in undecidability in query answering.</p>
        <p>To tackle these issues, our approach is to give semi-metamodeling support
to ontologies by expressing the metamodeling information in non-monotonic
Mrules (short for metamodeling-rules). For this we remove the metamodeling
portion from the original ontology and transform it into the sine M Ontology
(O0) and also generate M-rules for the removed portion.</p>
        <p>De nition 1. A sine M Ontology (O0) is a subset of a metamodelled-ontology
M O, without Clashing Axioms.</p>
        <p>De nition 2. Consider entities C1 and c1 in an M-ontology. If there exists
some axiom of the form (at-the-least) C1 v C2 and A(c1), then these are called
clashing axioms, where C1 c1 and appears more than one type of position with
the same IRI.</p>
        <p>Our framework makes use of two languages: MS for OWL 2 QL as an ontology
language, and NoHR as reasoner for hybrid knowledge base.</p>
        <p>The proposed framework consist of three functions:
1. The rst function checks for clashing axioms in M O and generates the
sine-M Ontology. To retain the same semantic knowledge between M O
and sine M Ontology, we omit the clashing axioms appearing in the ABox,
because omission of general concepts and roles stores in T Box will cause
semantic inconsistencies and change the meaning of the represented domain.
2. The second function takes eliminated axioms with attached information as
input and translates them into M-rules. The basic building blocks for
Mrules are the OWL 2 QL assertions under MS, where an assertion is simply an
axiom consisting of sets of individuals, classes or roles. The form of assertions
for M-O that are suitable for metamodeling can have one of following forms:
p1(e1; e2) and p2(e1; e2; e3), where p1 can be a class assertion C(x) or disjoint
assertion C1 u C2 v ? on concepts and p2 is a role or property C(x; y) and
e1; e2; e3 are expressions over VO.Currently we have introduced and focused
on the following assertions notions for M-rules. We say that:
{ In mCAssert(e1; e2), e1 represents an object argument and e2 appears
as class argument.
{ In isDisjCAssert(e1; e2), e1; e2 appear as class arguments.
{ In mRAssert(e1; e2; e3), represents information about Object and Data
property.</p>
        <p>In mOPAssert(e1; e2; e3), e2 and e3 represent individual arguments
and e1 appears as property argument.</p>
        <p>In mDPassert(e1; e2; e3), e2 and e3 represent individual arguments
and e1 appears as literal.
3. The third function passes the O0 and M-rules to the NoHR reasoner for
validation and for querying the hybrid knowledge base.</p>
        <p>The basic structure and semantics of O0 after omission of clashing axioms
remain the same as M O.</p>
        <p>Lemma 1. O0 is said to be a subset of M O if there exists at least some
syntactic correspondence between the signature of both O0 and M-O, for the existence
of named entities, so signature(M O) \ signature(O0) 6= ;.</p>
        <p>Lemma 2. Let M O be a metamodelling ontology and O0 be a sine M Ontology.
A as a concept/unary predicate and R as a role/binary predicate, O0 is a
semantic preserving representation model of M O.</p>
        <p>M
M</p>
        <p>O j= A(a)
O j= R(a; b)
()
()</p>
        <p>0 = A(a)
O j</p>
        <p>0 = R(a; b)
O j
Example 1. Consider the example mentioned in the introduction, which shows
that EndangeredSpecies is a metaconcept for GoldenEagle. First, we strip the
metamodeling part from the metamodelled ontology M O and generate O0:</p>
        <p>In Table 1 we can see that the translation of M O to O0did not delete
the EndangeredSpecies class, even though it is a metaclass in order to retain
the same schematic structure and semantic knowledge in O0as M O. So, the
translation function just eliminates the fact that makes EndangeredSpecies a
metaclass and that is in this case an axiom of the form:</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>ClassAssertion(:GoldenEagle :EndangeredSpecies)</title>
      <p>Then, the translation function transforms the eliminated part from M O into
M-rules, which captures the metamodeling semantics of OWL 2 QL. To avoid
ambiguity and misinterpretation of the arguments, we have used "is" and "Of"
in our predicate i.e. isInstanceOf(?X, ?Y) which gives more clarity of roles of
the arguments. After translation, metamodeling axioms are appended to the
M-rules.</p>
      <p>mCAssert(GoldenEagle,EndangeredSpecies)
isInstanceOf(?C,?D) :- mCAssert(?C,?D),not isTmCAssert(?C,?D)
isTmCAsert(?C,?D) :- mCAsert(?C,?B), mCAsert(?B,?D)</p>
      <p>isInstanceOf(?X,GoldenEagle) :- GoldenEagle(?X)
isInstanceOf(?X,EndangeredSpecies) :- EndangeredSpecies(?X)</p>
      <p>EndangeredSpecies(?X) :- isInstanceOf(?X,EndangeredSpecies)
We have used one of the notions introduced above, mCAssert(e1; e2), where
m stands for meta and the argument e1 represents the class as an individual.
isTmCAssert is the transitive closure on meta-classes and the key idea for its
de nition is to stop cycles, which may occur when both arguments of mCAssert
are the same or when the arguments form a loop. Next we de ned the
isInstanceOf predicate in the rules. The purpose of this predicate is to show the
instanceOf hierarchy chain between entities and captures the metamodeling
semantics of entities. Rules 4 and 5 help rule 2 to capture all the instances that
are linked with meta-Assertions and ease the meta-querying. On the other hand,
rule 6 updates the instances listed for EndangeredSpecies in O0along with the
instances listed in M-rules. To accommodate metaquerying, our translation
function also checks the facts that come along with meta-asserted axioms like disjoint
axioms. Suppose BaldEagle and GoldenEagle are disjoint in O0and are instances
of EndangeredSpecies. Then, to capture the correct semantics of O0in M-rules,
we have to de ne a new predicate called isDisjCAssert.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
isDisjCAssert(GoldenEagle,BaldEagle)
isDisjcOf(?X,?Y) :- isDisjCAssert(?Y, ?X)
isDisjCAssert(?Y, ?X) :- isDisjCAssert(?X, ?Y)
The isDisjCAssert predicate ensures the semantic correspondence between the
entities in the ontology and te atoms in rules. Rule 7 is the meta-assertion
involving GoldenEagle and BaldEagle. Rule 9 ensures symmetry, and Rule 8
(wit 9) checks for disjoint assertions on instance level and makes GoldenEagle
and BaldEagle di erent individuals. If the asserted meta-axioms come with role
assertions, then the translation function will use mRAssert(e1; e2; ; e3). Suppose
in Example 1 we have a property axiom, which says that animals are listed
in EndangeredSpecies by IUCN, and assume IUCN a metaclass, which makes
ListedBy a metaproperty. The translation of this axiom will be:
mOPAssert(ListedBy,EndangeredSpecies,IUCN) (10)
isOPInstance(?R,?X,?Y) :- mOPAssert(?R,?X,?Y), not isTmOPAssert(?R,?X,?Y) (11)
isTmOPAssert(?R,?X,?Y) :- mOPAssert(?R,?X,?Z),mOPAssert(?R,?Z,?Y) (12)</p>
      <p>ListedBy(?X,?Y) :- isOPInstance(ListedBy,?X,?Y) (13)
Rule 11 shows that the isOPInstance predicate helps capturing those entities
that are linked together via a relation and isTmOPAssert helps avoiding cyclic
relations. We omit dealing with other OWL 2 QL axioms, since we assume that
the three assertions treated in the M-rules above are su cient for most basic
metamodeling tasks.
4</p>
      <sec id="sec-5-1">
        <title>Query Language</title>
        <p>As query language we consider conjunctive queries. A conjunctive query q over
O is an expression ask where B (query body), consisting of a conjunction of
atoms over VO. We consider a metavariable in a query to be a variable that may
refer to metaclasses and metaproperties.</p>
        <p>De nition 3. A metaquery is an expression consisting of meta-predicates p and
meta-variables v, where p can have other p as their arguments and v can appear
in predicate positions.</p>
        <p>The semantics of queries resort to the interpretation of queried ontology
and rules according to metamodeling semantics. We expressed the queries in
NoHR, that allow conjunction of predicates with variables in a query and to get
the correct substitution for variables, queries need to be ground before being
processed by the DL reasoner.</p>
        <p>Example 2. Consider a conjunctive query q to Example 1, where q should retrieve
all those Birds that are instances of EndangeredSpecies (ES) and live in Central
Park Zoo (CPZ):
isInstanceOf(?C, EndangeredSpecies), isInstanceOf(?X, ?C),Birds(?X), Lives in(?X, CPZ)
With the use of O0and M-rules, we get the set qi0 = fq00; q10; q20g is a rewriting for
q, where q0 checks for all the instances of EndangeredSpecies de ned by rules
and will substitute ?C with GoldenEagle. q1 takes the substituion of ?C and
checks for its instances from both O0and M-rules and will substitute ?X with
Harry. q2 takes the substition of ?X = Harry and checks O0for the property
Lives in, if proven true, it can derive the queried goal and the answer to qi0 is
equivalent to q for any set of ground facts A.</p>
        <p>
          The query q, according to De nition 3 is clearly a metaquery. The full power
of metaquyering, where T box and Abox atoms coexist, can be achieved with the
use of the generalized predicate isInstanceOf from the translation function. We
called isInstanceOf predicate generalized, as it tries to capture the semantics of
rst order (FO) constructs like C(x), C1 v C2 such that it does not require FO
constructs in the query. For instance, in the above example we ask to retrieve
all those birds of subclass Eagle who are instances of EndangeredSpecies (ES)
and live in Central Park Zoo (CPZ). This query can be answered by the query
above, with the fact that GoldenEagle is an instance of EndangeredSpecies and
GoldenEagle is a subclass of Eagle as well.
Higher Order Semantics [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] extends DL-LiteR to take metaclasses and
metaqueries into account. The interpretation structure follows the Hilog style semantics,
which allows the elements in the domain o to have polymorphic characteristics.
For reasoning with the extended DL LiteR, punning has been adopted. This
extension guarantees a low complexity but at the cost of restricted expressivity.
        </p>
        <p>
          Hybrid Integration of rule systems with ontology languages have shown
signi cant advances and plays a central role in the development of the Semantic
Web. Our focus here is on one of the integration techniques known as the hybrid
MKNF knowledge bases [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], which consist of a nite number of MKNF rules and
a decidable fragment of description logic. The well-founded semantics version of
hybrid MKNF knowledge bases o ers e cient reasoning and inconsistency
handling and NoHR [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] is a system, which provides a platform for querying over a
combination of both rules and an ontology. However, there is no work, to the
best of our knowledge, that uses NoHR reasoning with metamodeling features.
6
        </p>
      </sec>
      <sec id="sec-5-2">
        <title>Conclusion and Future Work</title>
        <p>We showed that our approach not only allows metamodeling facility in ontology
but it allows for writing a slightly restricted form of metaqueries as well. We
plan to perform more experiments to evaluate our approach, that is, a
comparison with other approaches that support metamodeling feature in OWL 2 QL
ontologies. Also we plan to extend the notion of assertions to achieve the full
power of meta-querying by using non-monotonic rules.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alferes</surname>
            ,
            <given-names>J.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Knorr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Swift</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Query-driven procedures for hybrid MKNF knowledge bases</article-title>
          .
          <source>ACM Transactions on Computational Logic (TOCL) 14(2)</source>
          ,
          <volume>1</volume>
          {
          <fpage>43</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Costa</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Knorr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leite</surname>
          </string-name>
          , J.:
          <article-title>Next step for NoHR: OWL 2 QL</article-title>
          . In: International Semantic Web Conference. pp.
          <volume>569</volume>
          {
          <fpage>586</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Guizzardi</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida</surname>
            ,
            <given-names>J.P.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guarino</surname>
          </string-name>
          , N.,
          <string-name>
            <surname>de Carvalho</surname>
          </string-name>
          , V.A.:
          <article-title>Towards an ontological analysis of powertypes</article-title>
          .
          <source>In: JOWO@ IJCAI</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lepore</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Poggi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A higher-order semantics for owl 2 ql ontologies</article-title>
          .
          <source>In: Description Logics</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Meditskos</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bassiliades</surname>
          </string-name>
          , N.:
          <article-title>Rule-based owl ontology reasoning systems: Implementations, strengths, and weaknesses</article-title>
          .
          <source>In: Handbook of Research on Emerging Rule-Based Languages and Technologies: Open Solutions and Approaches</source>
          , pp.
          <volume>124</volume>
          {
          <fpage>148</fpage>
          .
          <string-name>
            <given-names>IGI</given-names>
            <surname>Global</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>On the properties of metamodeling in OWL</article-title>
          . In: International Semantic Web Conference. pp.
          <volume>548</volume>
          {
          <fpage>562</fpage>
          . Springer (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
          </string-name>
          , R.:
          <article-title>Reconciling description logics and rules</article-title>
          .
          <source>Journal of the ACM (JACM) 57(5)</source>
          ,
          <volume>1</volume>
          {
          <fpage>62</fpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>