<!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>SWRL2SPIN: Converting SWRL to SPIN</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nick Bassiliades</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics, Aristotle University of Thessaloniki</institution>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>SWRL is a semantic web rule language that combines OWL ontologies with Horn Logic rules of the RuleML family of rule languages. Being supported by Protégé as well as by popular rule engines and ontology reasoners, such as Jess, Drools and Pellet, SWRL has become a very popular choice for developing rule-based applications on top of ontologies. However, being doubtful whether SWRL will become a W3C standard, it is difficult to reach out to the industrial world. On the other hand, SPIN has become a de-facto industry standard to represent SPARQL rules and constraints on Semantic Web models, building on the widespread acceptance of the SPARQL query language. In this paper, we argue that the life of existing SWRL rule-based ontology applications can be prolonged by being transformed into SPIN. To this end, we have developed a prototype tool using SWI-Prolog that takes as input an OWL ontology with a SWRL rule base and transforms SWRL rules into SPIN rules in the same ontology, taking into consideration the object-oriented scent of SPIN, i.e. linking rules to the appropriate ontology classes as derived by analyzing the rule conditions.</p>
      </abstract>
      <kwd-group>
        <kwd>SWRL</kwd>
        <kwd>SPIN</kwd>
        <kwd>SPARQL</kwd>
        <kwd>OWL</kwd>
        <kwd>Rules</kwd>
        <kwd>Ontologies</kwd>
        <kwd>Prolog</kwd>
        <kwd>Transformation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Rule-based systems have been extensively used in several applications and domains,
such as e-commerce, personalization, games, businesses and academia. They offer a
simplistic model for knowledge representation for both domain experts and
programmers; experts usually find it easier to express knowledge in a rule-like format and
programmers usually find rule-based programming easier to understand and manipulate,
decoupling computation from control. The first is performed by the rules whereas the
latter is determined by the rule engine itself, that is when and how to apply the rules.</p>
      <p>
        The Semantic Web initiative [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] works on standards, technologies and tools to give
to the information a well-defined meaning, enabling computers and people to work in
better cooperation. Ontologies can be considered as a primary key towards this goal
since they provide a controlled vocabulary of concepts, each with explicitly defined and
machine processable semantics.
      </p>
      <p>
        There are mainly two modeling paradigms for the Semantic Web [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. The first
paradigm is based on the notion of the Description Logics [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] on which the Web Ontology
Language (OWL) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], the W3C recommendation for creating and sharing ontologies
on the Web, is based. The semantics of OWL ontologies can be handled by DL
reasoning systems, such as Pellet [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], RacerPro [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], Fact++ [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ] and HermiT [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] that reuse
existing DL algorithms, such as tableaux-based algorithms [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The other paradigm is
based on Horn logic, whereas a subset of the OWL semantics is transformed into rules
that are used by a rule engine to infer implicit knowledge. There are major differences
between these two paradigms, including computational and expressiveness aspects. For
example, the DL reasoning engines have a rather inefficient instance reasoning
performance, whereas rules are insufficient to model certain situations related to the open
nature of the Semantic Web. The selection of the most suitable modeling paradigm
depends on the domain and the needs of the application.
      </p>
      <p>
        Since description logics and Horn logic are orthogonal in the sense that neither of
them is a subset of the other [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], there are two interesting combinations of ontologies
and rules, namely their intersection, which is OWL 2 RL, and their union, namely
SWRL. OWL 2 RL [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] is an OWL 2 profile is aiming at applications that require
scalable reasoning without sacrificing too much expressive power. This is achieved by
defining a syntactic subset of OWL 2 which is amenable to implementation using
rulebased technologies, namely it is the largest syntactic fragment of OWL2 DL that is
implementable using rules. The design of OWL 2 RL was inspired by Description Logic
Programs [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] and pD* [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ]. Obviously, OWL 2 RL is a decidable language, but one
that is necessarily less expressive than either the description logic or rules language
from which it is formed.
      </p>
      <p>
        SWRL [
        <xref ref-type="bibr" rid="ref15 ref16">15, 16</xref>
        ] is a semantic web rule language that combines OWL ontologies with
Horn Logic rules of the RuleML family of rule languages [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ], extending the set of
OWL axioms to include Horn-like rules. SWRL is considerably more powerful than
either OWL DL or Horn rules alone; however, key inference problems for SWRL are
undecidable [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Decidability can be regained by restricting the form of admissible
rules, by imposing a suitable safety condition [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]. Being supported by the Protégé
ontology editor [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] as well as by popular rule engines and ontology reasoners, such as
Jess [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], Drools [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and Pellet [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], SWRL has become a very popular choice for
developing rule-based applications on top of ontologies [
        <xref ref-type="bibr" rid="ref12 ref22 ref28 ref3">3, 12, 22, 28</xref>
        ]. However, SWRL
being around for more than 10 years now, it is most probable that it will never become
a W3C standard; therefore, its scope is difficult to reach out to the industrial world.
      </p>
      <p>
        On the other hand, SPIN [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] has become a de-facto industry standard to represent
SPARQL rules and constraints on Semantic Web models, building on the widespread
acceptance of the SPARQL query language [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. SPARQL is well supported by
numerous engines and databases. This means that SPIN rules can be directly executed on
the databases and no intermediate engines with communication overhead need to be
introduced. Also, SPIN is more expressive than SWRL, because SPARQL has various
features such as UNIONs and FILTER expressions. SPIN has an object-oriented model
that arguably leads to better maintainable models than SWRL's flat rule lists. Finally,
SPIN goes far beyond being just a rule language, and provides means to express
constraints and to define new functions and templates.
      </p>
      <p>
        For all the above reasons, in this paper, we argue that the life of existing SWRL
rulebased ontology applications can be prolonged by being transformed into SPIN. To this
end, we have developed the SWRL2SPIN tool, using SWI-Prolog [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ] that takes as
input an OWL ontology with an SWRL rule base and transforms SWRL rules into SPIN
rules in the same ontology, taking into consideration the object-oriented scent of SPIN,
i.e. linking rules to the appropriate ontology classes as derived by analyzing the rule
conditions. Furthermore, conditions of transformed rules are optimized according to the
hosting class by re-ordering condition elements. Our SWRL2SPIN tool is accompanied
by a rich implementation of SWRL builtins (41); however, the way these builtins have
been translated provides room for extensibility in the future to increase coverage. To
the best of our knowledge there is no other tool for transforming SWRL to SPIN.
      </p>
      <p>In the rest of the paper, we overview SWRL and SPIN syntax and semantics,
focusing on their RDF vocabularies, in sections 2 and 3, respectively. In section 4 we present
our tool, its transformation methodology, how rules are embedded into classes, how
they are optimized and how builtins have been implemented. In section 5 we evaluate
the tool and finally, in section 6, we conclude.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Semantic Web Rule Language</title>
      <p>
        The Semantic Web Rule Language (SWRL) [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] is a proposed language for the
Semantic Web that can be used to express rules, combining OWL DL or OWL Lite with
the Unary/Binary Datalog RuleML sublanguages of the Rule Markup Language.
SWRL extends the set of OWL axioms to include Horn-like rules. It thus enables
Hornlike rules to be combined with an OWL knowledge base. SWRL has the full power of
OWL DL, but at the price of decidability and practical implementations. However,
decidability can be regained by restricting the form of admissible rules, typically by
imposing a suitable safety condition [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ].
      </p>
      <p>
        Rules are of the form of an implication between an antecedent (body) and consequent
(head). The intended meaning can be read as: whenever the conditions specified in the
antecedent hold, then the conditions specified in the consequent must also hold. Both
the antecedent (body) and consequent (head) consist of zero or more atoms. An empty
antecedent is treated as trivially true (i.e. satisfied by every interpretation), so the
consequent must also be satisfied by every interpretation; an empty consequent is treated
as trivially false (i.e., not satisfied by any interpretation), so the antecedent must also
not be satisfied by any interpretation. Multiple atoms are treated as a conjunction. Note
that rules with conjunctive consequents could easily be transformed (via the
LloydTopor transformations [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]) into multiple rules each with an atomic consequent. Atoms
in these rules can be of the form C(x), P(x,y), sameAs(x,y) or differentFrom(x,y), where
C is an OWL description, P is an OWL property, and x, y are either variables, OWL
individuals or OWL data values.
      </p>
      <p>SWRL has various representation syntaxes: abstract, human readable, XML concrete
and RDF concrete. Listing 1 shows an SWRL rule example in human readable syntax
that states “when a student ?s attends a course ?c that is taught by a faculty member ?f,
then the student ?s knows the faculty member ?f”.
uni:Student(?s) ∧ uni:attends(?s,?c) ∧ uni:isTaughtBy(?c,?f) →
uni:knows(?s,?f)</p>
      <sec id="sec-2-1">
        <title>Listing 1. Sample SWRL rule in human readable syntax</title>
        <p>Listing 2 shows how this rule is represented in the RDF concrete syntax. Rules are
instances of the swrl:Imp class. The head and body of the rule are lists of atoms
(swrl:AtomList); each atom can be one of classAtom, IndividualPropertyAtom,
DatavaluedPropertyAtom, SameIndividualAtom, DifferentIndividualsAtom, or
BuiltinAtom. All but the builtin atoms have one or two arguments (properties
swr:argumentNN); additionally classAtom has a classPredicate property, whereas the
PropertyAtoms have a propertyPredicate property. BuiltinAtoms have a list of arguments
instead and the name of the builtin function. Arguments can be variables, declared as
instances of the swrl:Variable class, datatype constants, in the Value^^Datatype format,
or individuals, i.e. instances of an OWL class.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Listing 2. Sample rule in SWRL RDF concrete syntax</title>
        <p>3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>SPARQL Inferencing Notation</title>
      <p>
        Modeling languages for the semantic web, such as RDF Schema [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and OWL [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ],
provide mechanisms for capturing the static structure of data, i.e. they are used to define
classes, properties and relationships between these conceptual entities. While they
define axiomatic definitions of data structures, describing general computational behavior
of objects is not within their scope. On the other hand, object oriented languages
provide well-known mechanisms for defining object behavior by describing classes and
associating methods with class members. Object oriented methods often formalize how
the modification of one attribute implies changes to other attributes. Another common
purpose of methods is to capture constraints to ensure that the state of the objects
remains within the bounds that the class designer had intended.
      </p>
      <p>
        The SPARQL Inferencing Notation (SPIN) [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] combines concepts from
object-oriented languages, query languages, and rule-based systems to describe object behavior
on the semantic web. One of the basic ideas of SPIN is to link class definitions with
SPARQL queries to capture constraints and rules that formalize the expected behavior
of those classes. SPARQL is used because it is an existing W3C standard [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] with
well-formed query semantics across RDF data, has existing widespread use amongst
most RDF query engines and graph stores, and provides sufficient expressivity for both
queries and general computation of data. To facilitate storage and maintenance,
SPARQL queries are represented in RDF triples, using the SPIN SPARQL Syntax [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
      </p>
      <p>
        The SPIN Modeling Vocabulary [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] defines a collection of properties and classes
that can be used to link RDFS and OWL classes with SPARQL queries. For example,
the class ex:Department can define a property spin:rule that points to a SPARQL
CONSTRUCT query that computes the value of ex:studentProfessorRatio based on the
values of ex:enrolledStudents and ex:numberOfFaculty. These properties follow
existing SPARQL standards, and the execution of these constructs can be efficiently handled
by any SPARQL processor. Since SPIN is entirely represented in RDF, rules and
constraints can be shared on the web together with the class definitions they are associated
with. The attachment of rules to classes also encourages a style in which rules are
locally scoped and thus easier to maintain, avoiding the spaghetti code of "flat" rule
languages, such as SWRL.
      </p>
      <p>The SPIN class description vocabulary defines several RDF properties that can be
used to attach SPARQL queries to classes. The property spin:rule can be used by SPIN
reasoning engines to construct inferred RDF triples from the currently asserted
information in the model. The SPARQL queries referenced by the SPIN properties are
interpreted in the context of the associated class. At run-time, the SPARQL variable ?this
is (by default) pre-bound with instances of the class and its sub-classes. Typically, the
query itself does not need to bind ?this to any value in the WHERE clause. The
execution context (e.g., inference engine) will do this before the query is executed.</p>
      <p>SPIN takes an object-oriented world view on Semantic Web models, in which
SPARQL queries play a similar role to functions and methods. Inheritance (expressed
using rdfs:subClassOf) is treated in the sense that any query/rule defined for
superclasses will also be applied to subclasses. In other words, SPIN class descriptors can
only "narrow down" and further restrict what has been defined further up in the class
hierarchy. In this spirit, global class descriptions are those that are attached to the root
class rdfs:Resource or its OWL equivalent owl:Thing. Those global queries may not
even mention ?this at all.</p>
      <p>The property spin:rule links an rdfs:Class with a SPARQL CONSTRUCT query that
defines an inference rule that determines how additional triples can be inferred from
what is stated in the WHERE clause. For each binding of the pattern in the WHERE
clause of the rule, the triple templates from the CONSTRUCT clause are instantiated
and added as inferred triples to the underlying model. At query execution time, the
SPARQL variable ?this is bound to the current instance of the class.</p>
      <p>The example in Listing 3a defines a SPIN rule (in textual SPARQL format),
attached to class uni:Student via the spin:rule property, that infers the value of the
uni:knows property from values of uni:attends and uni:isTaughtBy. Listing 3b shows
how the same rule is represented using the SPIN modeling vocabulary.
uni:Student
a rdfs:Class ;
spin:rule
[ a sp:Construct ;
sp:text """</p>
      <p>CONSTRUCT {</p>
      <p>?this uni:knows ?f .
}
WHERE {
?this uni:attends ?c .
?c uni:isTaughtBy ?f
}"""
].</p>
      <p>[ a sp:Construct ;
sp:templates ([
sp:object spin:_this;
sp:predicate uni:knows ;
sp:subject sp:_f
]) ;
sp:where (
[ sp:object spin:_this ;
sp:predicate uni:attends ;
sp:subject sp:_c ]
[ sp:object sp:_c;
sp:predicate uni:knows ;
sp:subject sp:_f ]
Listing 3. Sample SPIN rule in (a) human-friendly notation and (b) SPIN modeling vocabulary</p>
      <p>SPIN rules are instances of the sp:Construct class; the rule “head” is defined with
the sp:templates property whereas the sp:where property defines the rule “body”. The
above properties contain lists of triple patterns (sp:subject, sp:predicate, sp:object).
Other SPARQL query elements contained in rule “body” can be TriplePath, Filter,
Bind, Optional, Union, NamedGraph, SubQuery, NotExists, Minus, Service, and
Values. In the following we only present the first three, since they are the only ones used
in the SWRL2SPIN tool.</p>
      <p>A TriplePath is similar to a triple pattern, but instead of an sp:predicate, has an
sp:path property, whose value can be one of several types, sp:SeqPath being the most
usual one. The sequential steps of the path are represented through consecutive
sp:pathNN properties. The representation is more complex when arbitrary length path
matching is involved, i.e. when the * operator is used.</p>
      <p>Filter elements are blank nodes, instances of sp:Filter that have property
sp:expression, pointing to an expression that can be evaluated to true or false. Expressions are
actually function calls which are resresnted as instances of the function's URI. All other
properties of expressions (or function calls) are interpreted as arguments, using
consecutive sp:argNN properties. However, other property names can be used as well,
depending in the function. Arguments can be either datatype constants or variables, which
are blank nodes with an sp:varName property whose value is a string. E.g. the FILTER
(?y &gt; 30) expression is shown in Listing 4a.</p>
      <p>The BIND keyword assigns a computed value to a variable. Bind assignments in the
rule “body” are represented as instances of the class sp:Bind, having an sp:variable
property to point at the variable on the right side of the assignment. The property
sp:expression points to the root of the expression tree that delivers the computed value, in
much a similar way to filter expressions (i.e. function calls). E.g., the expression BIND
((?x * 2) AS ?y) is shown in Listing 4b.</p>
      <p>[ rdf:type sp:Filter ;
sp:expression [
rdf:type sp:gt ;
sp:arg1 [</p>
      <p>sp:varName "y" ;
] ;
sp:arg2 "30"^^xsd:int ;</p>
      <p>Listing 4. Filter (a) and Bind (b) expressions in SPIN modeling vocabulary.</p>
      <p>The SWRL2SPIN tool accepts at its input an OWL ontology with SWRL rules
embedded in the ontology using the RDF concrete syntax of SWRL, as exported by tools
such as Protégé combined with the SWRLtab plugin. The tool produces at its output an
OWL ontology (just copying the input one) extended by SPIN rules that have been
created by translating the SWRL rules. SPIN rules are embedded inside their
corresponding classes, following the OO nature of SPIN, instead of having a flat rule base
as in SWRL. Furthermore, the ?this variable of SPIN is used to identify instances of the
rule-embedding class, therefore SWRL condition elements that identify the class of the
corresponding instances are removed, speeding-up, thus, rule execution. Finally, the
same SWRL may involve instances of multiple classes, so our tool generates multiple
versions / views of a rule, optimized for each of the classes, separately.</p>
      <p>The main procedure for translating a SWRL rule into a SPIN rule involves mapping
classes and properties of the RDF concrete syntax of SWRL into corresponding classes
and properties of the SPIN modeling vocabulary, in a recursive way starting from
swrl:Imp instances, following an almost one-to-one mapping scheme shown in Table
1. The only exception to the straightforward mapping is the SWRL built-ins whose
translation is customized for each function. We will discuss translation of built-ins in
section 4.3.</p>
      <p>In the following, we give an example of translating a SWRL rule without built-ins
to a SPIN rule. Consider the SWLR rule in Listing 1 that is translated into the SPIN
rule in Listing 5. The actual translation is between the RDF representations of the
SWRL and SPIN rules, shown in Listing 6 and Listing 7, respectively.</p>
      <p>CONSTRUCT {</p>
      <p>?x :knows ?z .
}
WHERE {
?x rdf:type :Student .
?x :attends ?y .</p>
      <p>?y :isTaughtBy ?z .</p>
      <p>}</p>
      <p>Listing 5. Translation of SRWL rule of Listing 1 into SPIN
Listing 6. Example of an input SWRL rule in RDF concrete syntax</p>
      <p>One of the unique features of SPIN compared to SWRL is the ability to embed rules
into classes and treat them in an OO way as inheritable behaviors (aka methods). By
doing so, instances of the embedding class can be identified by variable ?this. In
SWRL2SPIN we
1. identify variables in the rule body that refer to class instances that play the role of
the “subject” in the triple patterns;
2. identify the classes these variables refer to;
3. generate as many rules as the number of the different classes “discovered” in step 2;
4. rewrite each rule of step 3 so that:
• corresponding variable names are replaced by ?this
• rdf:type triple patterns that refer to ?this are removed from the rule body
• triple patterns in the rule body are re-ordered so that the order of triple patterns is
optimal.</p>
      <sec id="sec-3-1">
        <title>For step 1, we collect all the variables in the rule body that are</title>
      </sec>
      <sec id="sec-3-2">
        <title>1. arguments of a swrl:ClassAtom construct;</title>
        <p>2. first arguments of a swrl:IndividualPropertyAtom or a
swrl:DatavaluedPropertyAtom construct;</p>
        <p>The rationale behind this is that subjects of triple patterns can only play the role of
the “referenced object”, i.e. the object that exhibits the class behavior. For our example,
the collected variables are:</p>
      </sec>
      <sec id="sec-3-3">
        <title>1. variable ?x, due to Student(?x) class atom</title>
        <p>2. variable ?y, due to isTaughtBy(?y,?z) individual property atom.</p>
        <p>In step 2, we identify the class that the instantiations of the above variables belong
to by:
1. checking if they are arguments of a swrl:ClassAtom construct;
2. retrieving the domain / range of arguments of swrl:IndividualPropertyAtom
constructs;
3. retrieving the domain of arguments of swrl:DatavaluedPropertyAtom constructs.</p>
        <p>For the ongoing SWRL rule example, the collected variables ?x and ?y belong to
classes Student and Course, respectively. The former is discovered from the
Student(?x) class atom, while the latter is discovered from the domain of the
isTaughtBy(?y,?z) individual property atom and / or the range of the attends(?x,?y)
atom. Thus, the SWRL rule is converted into two SPIN rules stored at classes Student
(Listing 8a) and Course (Listing 8b), respectively:</p>
        <p>CONSTRUCT { # @Student</p>
        <p>?this :knows ?z .
}
WHERE {
?this :attends ?y .</p>
        <p>?y :isTaughtBy ?z .
}
CONSTRUCT { # @Course</p>
        <p>?x :knows ?z .
}
WHERE {
?x rdf:type :Student .
?x :attends ?this .</p>
        <p>?this :isTaughtBy ?z .</p>
        <p>}</p>
      </sec>
      <sec id="sec-3-4">
        <title>Listing 8. SPIN rule embedded at class (a) Student, (b) Course</title>
        <p>4.2</p>
        <p>Optimizing SPIN rules</p>
        <p>In the previous example, the body of the SPIN rule at class Course has two triple
patterns that contain variable ?this and one triple pattern for variable ?x ranging over
all instances of class Student, following the initial ordering of the atoms at the body of
the SWRL rule. However, it is evident that this ordering leads to a very inefficient
SPARQL query execution, since variable ?x can be instantiated with many values,
whereas variable ?this instantiates each time only with one value. So, SWRL2SPIN
reorders the triple patterns in the body of converted / embedded SPIN rules using the
following heuristics:
1. Triple patterns that contain variable ?this at the subject of the triple pattern are placed
first;
2. Triple patterns that contain variable ?this at the object of the triple pattern are placed
second;
3. Triple patterns that contain the properties owl:sameAs or owl:differentFrom are
placed after the triple patterns that instantiate the variables of their subject and
object;
4. The order of all other triple patterns remains unchanged.</p>
        <p>According to the above, the triple patterns of the body of the SPIN rule at class
Course are re-ordered as shown in Listing 9.
CONSTRUCT { # @Course</p>
        <p>?x :knows ?z . }
WHERE {
?this :isTaughtBy ?z .
?x :attends ?this .</p>
        <p>?x rdf:type :Student . }</p>
      </sec>
      <sec id="sec-3-5">
        <title>Listing 9. Optimized SPIN rule at class Course</title>
        <p>4.3</p>
        <p>Implementing SWRL builtins</p>
        <p>
          The translation of the SWRL builtins does not follow the straightforward approach
for the rest of the SWRL atoms and it depends on the nature of each function and the
existence of equivalent SPIN or SPARQL functions. More specifically, SWRL
specification [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] has defined 78 builtin functions classified across the categories:
Comparisons, Mathematics, Boolean Values, Strings, Date, Time and Duration, URIs, and
Lists. Currently, SWRL2SPIN implements more than half of the SWRL builtins (41),
mostly in the categories: Comparisons, Mathematics, Strings, and Lists. For the Date,
Time and Duration category, we implemented only the swrlb:date function.
        </p>
        <p>The conversion of the builtins falls into ten categories: binary filter, associative infix
assign, binary infix assign, unary assign, assign function, filter function, magic
property, complex assign, complex filter, and complex expression1. Filter-type conversions
lead to SPARQL FILTER Boolean expressions, whereas assign-type conversions lead
to BIND expressions. Simple mathematical comparisons and operations are treated as
binary infix mathematical operations, such as &gt;= or -. Addition and multiplication in
SWRL builtins can have an arbitrary number of arguments, so they are treated as
associative binary infix operators. Finally, there are also simple unary operators, e.g. minus.</p>
        <p>Another large category is SWRL builtin functions with an exact equivalent SPIN /
SPARQL function, as e.g. round, replace, and contains. The conversion of these
functions is straightforward, as in the FILTER case all arguments of the SWRL builtin
become arguments of the SPIN / SPARQL function, whereas in the BIND case the first
argument of the SWRL builtin becomes the variable to be bound in the SPIN / SPARQL
BIND expression, whereas the rest of the arguments of the SWRL builtin become the
arguments of the SPIN / SPARQL function.</p>
        <p>As discussed in Section 3, FILTER and BIND expressions both have an
sp:expression property that contains the mathematical or functional SPARQL expression; BIND
also has an sp:variable for the assigned variable. All expressions belong to a type, which
is the name of the main SPARQL function in the expression, e.g. sp:gt, sp:lcase, etc. In
the case of the complex functional expressions, the outer function is the type of the
FILTER expression, e.g. sp:contains in the case of the containsIgnoreCase SWRL
builtin. The argument list of the SWRL builtin (property swrl:arguments) is treated as
explained above, generating sp:argNN properties of the SPARQL expression / function.
The only exception is the spif:cast function, whose second argument is represented by
an arg:datatype property. The values of the sp:argNN properties can be SPIN variables,
datatype constants, individuals or nested SPARQL functions / expressions.
1 Due to space limitations, details can be found at https://github.com/nbassili/SWRL2SPIN</p>
        <p>The rest of the SWRL builtins are treated as Complex cases, meaning that their
translation involves the combination of more than one simple functions, as discussed above.
Complex cases can be filters, assignments or general SPARQL expressions (graph
patterns) and they are treated in an ad-hoc manner. For example, the integerDivide builtin
is translated as a division and a cast to integer, whereas the pow builtin is translated as
repetitive multiplication using recursion. List builtins are of special interest because
their translation cannot be performed using SPIN/SPARQL functions, but can be
treated using SPARQL path expressions. For example, the member builtin is translated
into a recursive path expression combining rdf:first and rdf:rest. The translation of the
length builtin is the most complicated one because it requires a SPARQL subquery that
counts all the elements in the list, i.e. all possible iterations of the rdf:rest property in
the rdf:rest* recursive path. As an example, consider the SWRL rule in Listing 10
which is translated in the SPIN rule at class Person (Listing 11). Specifically, the RDF
concrete syntax for the SWRL builtin atom is shown in Listing 12, whereas the
converted SPIN / SPARQL expression is shown in Listing 13.</p>
        <p>Person(?x) ∧ firstName(?x, ?y) ∧ lastName(?x, ?z) ∧
swrlb:stringConcat(?a, ?y, " ", ?z) → fullName(?x, ?a)</p>
      </sec>
      <sec id="sec-3-6">
        <title>Listing 10. Sample SWRL rule with builtin</title>
        <p>CONSTRUCT { # @Person</p>
        <p>?this :fullName ?a . }
WHERE {
?this :firstName ?y .
?this :lastName ?z .</p>
        <p>BIND (CONCAT(?y, " ", ?z) AS ?a) . }
Listing 11. Sample SWRL builtin translated to SPIN/SPARQL
[ rdf:type swrl:BuiltinAtom ;
swrl:builtin swrlb:stringConcat ;
swrl:arguments [ rdf:type rdf:List ;
rdf:first :a ;
rdf:rest [ rdf:type rdf:List ;
rdf:first :y ;
rdf:rest [ rdf:type rdf:List ;
rdf:first " "^^xsd:string ;
rdf:rest ( :z ) ] ] ]
] ;
Listing 12. RDF syntax for the SWRL builtin example
[ rdf:type sp:Bind ;
sp:expression [ rdf:type sp:concat ;
sp:arg1 [ sp:varName "y" ; ] ;
sp:arg2 " " ;
sp:arg3 [ sp:varName "z" ; ];];
sp:variable [ sp:varName "a" ; ] ;</p>
      </sec>
      <sec id="sec-3-7">
        <title>Listing 13. RDF syntax for the converted example of Listing 12</title>
        <p>A special case is magic properties which are supported by many SPARQL engines
to dynamically compute values at query time. A magic property usually is implemented
by a calculation function that determines bindings of the variables on the left or right
side of the predicate. SPIN enables users to define such magic properties, in a very
similar way as SPIN Functions, but providing greater flexibility. In contrast to
BIND/FILTER functions, magic properties can return multiple values. Furthermore,
any input or output variable may be unbound; it is the task of the magic property to find
their potential bindings. The magic property spif:split is used in SWRL2SPIN to
translate the swrlb:tokenize SWRL builtin. The first variable of the SWRL builtin generates
multiple bindings. When the spif:split magic property is used, the subject of the “triple
pattern” generates multiple alternative bindings. Magic properties are treated in an
adhoc manner in SWRL2SPIN, since their definition and behavior does not follow a
regular pattern.</p>
        <p>
          The rest of the SWRL builtins will be implemented as a future work, most probably
as complex conversion cases or as user-defined magic properties. We notice here that
the only other SWRL related tool supporting functions for RDF lists is the SWRL-IQ
plugin [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for Protégé 3.x.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <p>
        To evaluate SWRL2SPIN we have initially generated use cases of a University
ontology with various SWRL rules in Protégé2 [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], including all supported
SWRLbuiltins. Then we have used the SWRLDroolsTab [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] to run SWRL rules and identify
all the inferences. Consequently, we have converted the SWRL use cases through
SWRL2SPIN and we have tested the generated SPIN rules using TopSPIN in TopBraib
Composer FE [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ] for equivalent inferences. The results were found identical for all
use cases, except the ones that could not be run in SWRLDrools.
      </p>
      <p>Finally, we have evaluated the optimized SPIN rules (section 4.2) of SWRL2SPIN
against their unoptimized version. For this we have used the unoptimized rule at Listing
8b against the optimized rule at Listing 9 in an ontology with 100K student instances
that all attend the same course with one teacher. The inference took 1256,93 msec (on
average) for the optimized rule version at TopBraid against 1414,61 msec for the
unoptimized rule. Results are statistically significant with a p-value equal to 0,0208&lt;0,05.
All tests were performed on a Windows 10 PC with Intel i7-4770 @ 3.40GHz, 8 GB
RAM and SSD.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In this paper we have argued that SPIN is a more promising de-facto industrial
standard for the future of combining ontologies and rules, because it builds upon the
2 We have used the SWRLTab editor of both Protégé 3.5 and 5.2.
widespread use of SPARQL. Furthermore, SWRL has been around for quite a while,
not being able to achieve a W3C recommendation status. SPIN also offers more
expressivity than SWRL due to constructs like FILTER and UNION, and also offers
object-orientation by being able to store rules to classes as behaviors to be inherited
through the class hierarchy. Thus, we believe that existing large SWRL projects can
benefit from being translated into SPIN rules.</p>
      <p>To this end we have developed in Prolog and presented the SWRL2SPIN prototype
tool3 that translates ontologies with SWRL rules into ontologies with SPIN rules. We
have tested the tool using ontologies and SWRL rule bases edited (and tested for
reasoning) by Protégé and we have successfully imported the translated ontologies and
SPIN rules into the TopBraid Composer, having the same inference results. We have
also evaluated the scalability of the tool and the effectiveness of some optimization of
the generated SPIN rules. Our tool currently supports 41 SWRL builtins, including
builtins for lists which are usually not supported, but we have provided a structured
methodology for supporting more in the future.</p>
      <p>
        Notice that our translation methodology is based on direct RDF-to-RDF translation
between the SWRL and SPIN RDF vocabularies; therefore, it is not dependent on the
implementation language we have choose for SWRL2SPIN. As for future work, we
plan to evaluate it for converting larger SWRL rule bases, to support more SWRL
builtins and to possibly provide this tool as an add-on to some SPIN rule engine. Finally, a
transition of the tool to SHACL SPARQL rules [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] is underway4.
7
3
4
      </p>
      <p>Available at https://github.com/nbassili/SWRL2SPIN
https://github.com/nbassili/SWRL2SHACL</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baader</surname>
            <given-names>F.</given-names>
          </string-name>
          <year>2003</year>
          .
          <article-title>The Description Logic Handbook: Theory, Implementation and Applications</article-title>
          . Cambridge Univ Press.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Baader</surname>
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            <given-names>U.</given-names>
          </string-name>
          <year>2001</year>
          .
          <article-title>An overview of tableau algorithms for description logics</article-title>
          .
          <source>Studia Logica</source>
          ,
          <volume>69</volume>
          (
          <issue>1</issue>
          ),
          <fpage>5</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Billet</surname>
            <given-names>Y.-G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gravier</surname>
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fayolle</surname>
            <given-names>J.:</given-names>
          </string-name>
          <article-title>SWRL-Based Context Awareness for Application Servers Hosting Digital Services</article-title>
          .
          <source>RuleML America</source>
          <year>2011</year>
          :
          <fpage>222</fpage>
          -
          <lpage>229</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Brickley</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guha R</surname>
          </string-name>
          .V. (Eds.),
          <source>RDF Schema 1</source>
          .1,
          <string-name>
            <given-names>W3C</given-names>
            <surname>Rec</surname>
          </string-name>
          , 25
          <source>Feb</source>
          <year>2014</year>
          , http://www.w3.org/TR/rdf-schema/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>5. Drools, http://www.drools.org/</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Elenius</surname>
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>SWRL-IQ: A Prolog-based Query Tool for OWL and SWRL</article-title>
          . OWLED 2012
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Friedman-Hill</surname>
            <given-names>E.</given-names>
          </string-name>
          <year>2003</year>
          . Jess in Action:
          <source>Rule Based Systems in Java. Manning Publications. ISBN 1-930110-89-8</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Glimm</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stoilos</surname>
            <given-names>G.</given-names>
          </string-name>
          , Wang
          <string-name>
            <surname>Z.</surname>
          </string-name>
          ,
          <source>HermiT: An OWL 2 Reasoner, J Automated Reasoning</source>
          (
          <year>2014</year>
          )
          <volume>53</volume>
          :
          <fpage>245</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Grosof</surname>
            <given-names>B. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Volz</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Decker</surname>
            <given-names>S.</given-names>
          </string-name>
          <year>2003</year>
          .
          <article-title>Description Logic Programs: Combining Logic Programs with Description Logic</article-title>
          .
          <source>In Proceedings of the International Conference on World Wide Web</source>
          (pp.
          <fpage>48</fpage>
          -
          <lpage>57</lpage>
          ). ACM Press.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Haarslev</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hidde</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Möller</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wessel</surname>
            <given-names>M.</given-names>
          </string-name>
          <article-title>The RacerPro knowledge representation and reasoning system</article-title>
          .
          <source>Semantic Web Journal</source>
          ,
          <volume>3</volume>
          (
          <issue>3</issue>
          ):
          <fpage>267</fpage>
          -
          <lpage>277</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Harris</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seaborne</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <source>SPARQL 1.1 Query Language, W3C Rec, 21 Mar</source>
          <year>2013</year>
          . http://www.w3.org/TR/sparql11-query/
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Herrero-Zazo</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Segura-Bedmar</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hastings</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martínez</surname>
            <given-names>P.</given-names>
          </string-name>
          : DINTO:
          <article-title>Using OWL Ontologies and SWRL Rules to Infer Drug-Drug Interactions and their Mechanisms</article-title>
          .
          <source>J. of Chemical Information and Modeling</source>
          <volume>55</volume>
          (
          <issue>8</issue>
          ):
          <fpage>1698</fpage>
          -
          <lpage>1707</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Hitzler</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            <given-names>P. F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rudolph</surname>
            <given-names>S.,</given-names>
          </string-name>
          <article-title>OWL 2 Web Ontology Language Primer (2nd Edition)</article-title>
          ,
          <source>W3C Rec, 11 Dec</source>
          <year>2012</year>
          . http://www.w3.org/TR/owl-primer
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            <given-names>J.</given-names>
          </string-name>
          <year>2005</year>
          .
          <article-title>Semantic Web Architecture: Stack or Two Towers?</article-title>
          .
          <source>Principles and Practice of Semantic Web Reasoning. PPSWR 2005. LNCS 3703</source>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            <given-names>P. F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bechhofer</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsarkov</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <article-title>OWL rules: A proposal and prototype implementation</article-title>
          ,
          <source>Journal of Web Semantics</source>
          ,
          <volume>3</volume>
          (
          <issue>1</issue>
          ),
          <year>2005</year>
          , pp.
          <fpage>23</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            <given-names>P. F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boley</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tabet</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grosof</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dean</surname>
            <given-names>M.</given-names>
          </string-name>
          <year>2004</year>
          .
          <article-title>SWRL: A Semantic Web Rule Language Combining OWL and RuleML</article-title>
          .
          <source>W3C Member Submission. 21 May</source>
          <year>2004</year>
          . http://www.w3.org/Submission/SWRL/
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Knublauch</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Allemang</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Steyskal</surname>
            <given-names>S.</given-names>
          </string-name>
          , SHACL Advanced Features, W3C Working Group Note 08 June 2017, https://www.w3.org/TR/shacl-af/
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Knublauch</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            <given-names>J. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Idehen</surname>
            <given-names>K.</given-names>
          </string-name>
          , SPIN - Overview and Motivation,
          <source>W3C Member Submission, 22 Feb</source>
          <year>2011</year>
          . http://www.w3.org/Submission/spin-overview/
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Knublauch</surname>
            <given-names>H.</given-names>
          </string-name>
          , SPIN - Modeling
          <string-name>
            <surname>Vocabulary</surname>
          </string-name>
          ,
          <source>W3C Member Submission, 22 Feb</source>
          <year>2011</year>
          . http://www.w3.org/Submission/spin-modeling/
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Knublauch</surname>
            <given-names>H.</given-names>
          </string-name>
          , SPIN - SPARQL Syntax,
          <source>W3C Member Submission, 22 Feb</source>
          <year>2011</year>
          . http://www.w3.org/Submission/spin-sparql/
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Lloyd</surname>
            <given-names>J. W.</given-names>
          </string-name>
          <article-title>Foundations of logic programming (2nd edition</article-title>
          ). Springer series in symbolic computation. Springer,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Matheus</surname>
            <given-names>C. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baclawski</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kokar</surname>
            <given-names>M. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Letkowski</surname>
            <given-names>J. Using SWRL</given-names>
          </string-name>
          and
          <article-title>OWL to Capture Domain Knowledge for a Situation Awareness Application Applied to a Supply Logistics Scenario</article-title>
          .
          <source>RuleML</source>
          <year>2005</year>
          :
          <fpage>130</fpage>
          -
          <lpage>144</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Motik</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuenca Grau</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          , Wu
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Fokoue</surname>
          </string-name>
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Lutz</surname>
          </string-name>
          <string-name>
            <surname>C.</surname>
          </string-name>
          ,
          <article-title>OWL 2 Web Ontology Language Profiles (2nd Edition)</article-title>
          ,
          <source>W3C Recommendation 11 Dec</source>
          <year>2012</year>
          . https://www.w3.org/TR/owl2-profiles/
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Motik</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Studer</surname>
            <given-names>R.</given-names>
          </string-name>
          <year>2005</year>
          .
          <article-title>Query Answering for OWL-DL with Rules</article-title>
          .
          <source>J. of Web Semantics</source>
          .
          <volume>3</volume>
          (
          <issue>1</issue>
          ):
          <fpage>41</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>25. Protégé ontology editor. http://protege.stanford.edu/.</mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>26. RuleML, http://wiki.ruleml.org/index.php/RuleML_Home</mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Sirin</surname>
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grau</surname>
            <given-names>B. C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kalyanpur</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Katz</surname>
            <given-names>Y.</given-names>
          </string-name>
          <year>2007</year>
          .
          <article-title>Pellet: A Practical OWL-DL Reasoner</article-title>
          .
          <source>Journal of Web Semantics</source>
          ,
          <volume>5</volume>
          (
          <issue>2</issue>
          ),
          <fpage>51</fpage>
          -
          <lpage>53</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Somodevilla</surname>
            <given-names>M. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mena</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pineda Torres</surname>
            <given-names>I. H.</given-names>
          </string-name>
          , de Célis Herrero C. P.:
          <article-title>Deducting Lifestyle Patterns by Ontologies' SWRL Rules</article-title>
          .
          <source>DEXA Workshops</source>
          <year>2015</year>
          :
          <fpage>9</fpage>
          -
          <lpage>13</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29. SWRL Drools Tab,
          <year>2012</year>
          . http://protege.cim3.net/cgi-bin/wiki.pl?SWRLDroolsTab.
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>ter Horst H. J. Completeness</surname>
          </string-name>
          ,
          <article-title>decidability and complexity of entailment for RDF Schema and a semantic extension involving the OWL vocabulary</article-title>
          .
          <source>J. of Web Semantics</source>
          <volume>3</volume>
          (
          <issue>2</issue>
          -3):
          <fpage>79</fpage>
          -
          <lpage>115</lpage>
          ,
          <year>2005</year>
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31. TopQuadrant, TopBraid Composer, https://www.topquadrant.com/tools/IDE-topbraidcomposer
          <article-title>-maestro-edition/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>Tsarkov</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          <year>2006</year>
          .
          <article-title>Fact++ description logic reasoner: System description</article-title>
          .
          <source>In Proceedings of Automated Reasoning</source>
          (pp.
          <fpage>292</fpage>
          -
          <lpage>297</lpage>
          ). Springer.
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>W3C</surname>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>The Semantic Web Activity</article-title>
          . http://www.w3.org/2001/sw/.
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <surname>Wielemaker</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schrijvers</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Triska</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lager</surname>
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>SWI-Prolog</article-title>
          .
          <source>TPLP</source>
          <volume>12</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>67</fpage>
          -
          <lpage>96</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>