<!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>Large-Scale Reasoning on Expressive Horn Ontologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carlo Allocca</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Calimeri</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cristina Civili</string-name>
          <email>c.civilig@samsung.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roberta Costabile</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bernardo Cuteri</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alessio Fiorentino</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Davide Fusca</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefano Germano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Laboccetta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Manna</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simona Perri</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kristian Reale</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Ricca</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pierfrancesco Veltri</string-name>
          <email>veltrig@dlvsystem.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jessica Zangari</string-name>
          <email>zangarig@mat.unical.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DLVSystem L.T.D., Polo Tecnologico Unical</institution>
          ,
          <addr-line>Rende</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Mathematics and Computer Science, University of Calabria</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Samsung R&amp;D Institute</institution>
          ,
          <addr-line>Staines</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <fpage>10</fpage>
      <lpage>21</lpage>
      <abstract>
        <p>E cient large-scale reasoning is a fundamental prerequisite for the development of the Semantic Web. In this scenario, it is convenient to reduce standard reasoning tasks to query evaluation over (deductive) databases. From a theoretical viewpoint much has been done. Conversely, from a practical point of view, only a few reasoning services have been developed, which however typically can only deal with lightweight ontologies. To ll the gap, the paper presents owl2dlv, a novel and modern Datalog system for evaluating SPARQL queries over very large OWL 2 knowledge bases. owl2dlv builds on the well-known ASP system dlv by incorporating novel optimizations sensibly reducing memory consumption and a server-like behavior to support multiplequery scenarios. The high potential of owl2dlv for large-scale reasoning is outlined by the results of an experiment on data-intensive benchmarks, and con rmed by the direct interest of a major international industrial player, which has stimulated and partially supported this work.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Datalog is a powerful, yet simple and elegant rule-based language originally
designed in the context of deductive databases for querying relational data. After
almost 40 years, however, its scope of applicability and its extensions go de
nitely beyond the initial target, so much that now they range from optimization
and constraint satisfaction problems [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] to even ontological design and
reasoning in the Semantic Web [
        <xref ref-type="bibr" rid="ref20 ref30">20,30</xref>
        ]. Indeed, in the development of the Semantic
Web, e cient large-scale reasoning is a fundamental prerequisite. In this
scenario, it is convenient to reduce standard reasoning tasks to query evaluation
over (deductive) databases. From a theoretical viewpoint much has been done:
in many ontological settings, the problem of evaluating a conjunctive query over
a knowledge base (KB) consisting of an extensional dataset (ABox) paired with
an ontology (TBox) can be reduced to the evaluation of a Datalog query (i.e., a
Datalog program, possibly nonrecursive and including strong constrains, paired
with a union of conjunctive queries, both constructed only from the original
query and the TBox) over the same ABox [
        <xref ref-type="bibr" rid="ref25 ref28 ref35 ref42 ref45">25,28,35,42,45</xref>
        ]. Conversely, from a
practical viewpoint the situation is not so rosy. Many classical Datalog reasoners,
such as clingo [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] and dlv [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ], are based on one-shot executions performing
heavy operations (e.g., loading and indexing) multiple times and hence are rather
unsuited. Also, only a few reasoning services with a server-like behavior, such
as mastro [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], ontop [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ], and rdfox [
        <xref ref-type="bibr" rid="ref41">41</xref>
        ], have been developed, which
however can only deal with lightweight TBoxes. To ll the gap, the paper presents
owl2dlv, a modern Datalog system, based on the aforementioned rewriting
approach, for evaluating SPARQL conjunctive queries [
        <xref ref-type="bibr" rid="ref44">44</xref>
        ] over very large OWL 2
knowledge bases [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ].
      </p>
      <p>
        Reasoning over OWL 2 is generally a very expensive task: fact entailment
(i.e., checking whether an individual is an instance of a concept) is already
2NExpTime-hard, while decidability of conjunctive query answering is even an
open problem. To balance expressiveness and scalability, the W3C identi ed
three tractable pro les |OWL 2 EL, OWL 2 QL, and OWL 2 RL| exhibiting
good computational properties: the evaluation of conjunctive queries over KBs
falling in these fragments is in PTime in data complexity (query and TBox are
considered xed) and in PSpace in combined complexity (nothing is xed) [
        <xref ref-type="bibr" rid="ref43">43</xref>
        ].
To deal with a wide variety of ontologies, owl2dlv implements the Horn-SHIQ
fragment of OWL 2, which enjoys good computational properties: conjunctive
queries are evaluated in PTime (resp., ExpTime) in data (resp., combined)
complexity. Moreover, it is also quite expressive: it generalizes both OWL 2 QL
and OWL 2 RL, while capturing all OWL 2 EL constructs except role chain [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ].
      </p>
      <p>
        From the technical side, owl2dlv builds on the well-known ASP system
dlv [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ], and in particular its most recent incarnation dlv2 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], by incorporating
a server-like modality, which is able to keep the main process alive, receive and
process multiple user's requests on demand, and restore its status thanks to an
embedded persistency layer. Following the approach proposed by Eiter et al. [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ],
a Horn-SHIQ TBox paired with a SPARQL query are rewritten, independently
from the ABox, into an equivalent Datalog query.
      </p>
      <p>
        The high potential of owl2dlv for large-scale ontological reasoning is
outlined by the results of an experiment on data-intensive benchmarks, and
conrmed by the direct interest of a big international industrial player, which has
partially supported this work and also stimulated the evolution of the system
with a major challenge: \deal with LUBM-8000 |the well-known LUBM [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ]
standard benchmark for ontological reasoning collecting about 1 billion factual
assertions upon 8,000 universities| over machines equipped with 256GB RAM
and with an average query evaluation time of at most 10 minutes". Eventually,
not only the system was able to widely win the general challenge as reported in
Figure 1; but, amazingly, the average time taken by owl2dlv on the ten (out
of fourteen) bound queries |i.e., queries containing at least one constant| of
LUBM-8000 was eventually less than one second (see Section 7 for details).
      </p>
      <p>Number of handled triples
using at most 256 GB
1.03 billion triples
1 billion triples
675 millions triples</p>
      <p>13 minutes
10 minutes</p>
      <p>OWL2DLV (Feb 2019)
Challenge target</p>
      <p>DLV2 (Aug 2018)
375 gigabytes
256 gigabytes
250.0 gigabytes</p>
      <p>Peak of memory
over LUBM-8000
(1 billion triples)</p>
      <p>
        Average time
over LUBM-8000 2.4 minutes
(1 billion triples)
OWL 2. As said, we focus on the Horn-SHIQ [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] fragment of OWL 2. In
Description Logic (DL) terminology and notation, a knowledge base (KB) K is
a pair (A; T ), where A is a set of (factual) assertions representing extensional
knowledge about individuals and T is a set of axioms representing intensional
knowledge about the domain of interest. Let NI (individuals), NC f&gt;; ?g
(atomic concepts) and NR (role names) be pairwise disjoint discrete sets. A role
r is either a role name s or its inverse s . A concept is either an atomic concept
or an expression of the form C u D, C t D, :C, 8r:C, 9r:C, &gt; nr:C or 6 nr:C,
where C and D are concepts, r is a role, and n 1. General concept inclusions
(GCIs), role inclusions (RIs), and transitive axioms (TAs) are respectively of
the form C1 v C2, r1 v r2, and Tr (r), where: t is disallowed in C2, &gt; nr
and 6 nr are disallowed in C1, and they are disallowed also in C2 in case r is
transitive. A Horn-SHIQ TBox is a nite set of GCIs, RIs and TAs satisfying
some non-restrictive global conditions [
        <xref ref-type="bibr" rid="ref34 ref36">34,36</xref>
        ]. An instance I is a set of assertions
of the form C(a) and r(a; b), where C 2 NC, r 2 NR, and a; b 2 NI. An ABox
is any nite instance. Common formats for OWL 2 KBs are both Turtle [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]
and RDF/XML [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. For example, assertions Woman(Ann), Person(Tom) and
likes(Tom; Ann) are encoded in Turtle as:
:Ann rdf:type :Woman .
      </p>
      <p>:Tom rdf:type :Person ; :likes :Ann .
while the GCI Woman v Person is encoded in RDF/XML as:
&lt;owl:Class rdf:about="#Person"/&gt;
&lt;owl:Class rdf:about="#Woman"&gt;</p>
      <p>
        &lt;rdfs:subClassOf rdf:resource="#Person"/&gt;
&lt;/owl:Class&gt;
SPARQL. It is the standard language in the Semantic Web for querying OWL 2
knowledge bases [
        <xref ref-type="bibr" rid="ref44">44</xref>
        ]. As in databases, the most important class of SPARQL
queries are the conjunctive ones, which syntactically are quite similar to SQL
queries. For example, to select the individuals that are instances of Person we
write SELECT ?X WHERE f ?X rdf:type :Person g. According to the example
given in the previous section, however, the answer to this query is di erent when
executed over the ABox only (giving just Tom as answer) or by also taking into
account the TBox (giving as answer also Ann). More generally, when querying
OWL 2 knowledge bases the TBox plays the role of a st-order theory and it
has to be taken into account properly, as described next.
      </p>
      <p>
        OBQA. A model of a KB K = (A; T ) is typically any instance I A satisfying
all the axioms of T , written I j= T , where GCIs, RIs and TAs can be regarded as
rst-order expressions [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. For example, inclusion C u D v E over atomic
concepts is equivalent to 8x (E(x) C(x) ^ D(x)). (For a comprehensive picture,
we refer the reader to [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ].) The set of all models of K is denoted by mods(K).
To comply with the so-called open world assumption (OWA), note that I might
contain individuals that do not occur in K. The answers to a query q(x) over
an instance I is the set q(I) = fa 2 NIjxj j I j= q(a)g of jxj-tuples of individuals
obtained by evaluating q over I. Accordingly, the certain answers to q under
OWA is the set cert(K; q) = TI2mods(D; ) q(I): Finally, ontology-based query
answering (OBQA) is the problem of computing cert(K; q).
      </p>
      <p>
        DLV. It is one of the most used logic programming systems based on answer
set semantics[
        <xref ref-type="bibr" rid="ref39">39</xref>
        ], a well-known formalism extended by many expressive
constructs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] useful in several application domains [
        <xref ref-type="bibr" rid="ref10 ref11 ref4 ref8 ref9">4,8,9,10,11</xref>
        ]. Recently, it has
been redesigned and reengineered to version 2.0, called dlv2 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], to enjoy modern
evaluation techniques together with development platforms fully complying with
the ASP-Core-2 language. Nowadays, it integrates two sub-systems: i-dlv [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ],
handling the deductive databases and program grounding, and wasp [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for the
model search phase. dlv2 has been the basis for the development of owl2dlv.
3
      </p>
    </sec>
    <sec id="sec-2">
      <title>Ontological Reasoning via Datalog</title>
      <p>
        As said, to perform OBQA, owl2dlv follows the approach of Eiter et al. [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ].
From an OWL 2 Horn-SHIQ TBox T and a SPARQL conjunctive query q(x),
owl2dlv runs Algorithm 1 to build a Datalog program PT and a union of
conjunctive queries Qq;T (x) such that, for each ABox A, the evaluation of Qq;T (x)
over A [ PT produces the same answers as the evaluation of q(x) over A [ T .
      </p>
      <p>Algorithm 1: TBox and Query Rewriting</p>
      <p>Input: An OWL 2 Horn-SHIQ TBox T together with a query q(x)
Output: The Datalog program PT together with the query Qq;T (x)
1. T 0 Normalize(T );
2. T EmbedTransitivity(T 0);
3. (T ) Saturate(T );
4. PT RewriteTBox( (T ));
5. Qq;T (x) RewriteQuery(q(x); (T ));</p>
      <p>As an example, consider a TBox T consisting of the GCIs CommutingArea v
9linked :Capital , 9linked :Capital v DesirableArea, and Capital v DesirableArea,
together with the TA Tr (linkedViaTrain) and the RI linkedViaTrain v linked .
According to Algorithm 1 PT is as follows:
linked(X,Y) :- linkedViaTrain(X,Y).
desirableArea(Y) :- capital(X), linked(Y,X).
desirableArea(X) :- capital(X).
capital*(Y) :- commutingArea(X), linkedViaTrain(X,Y).
capital*(Y) :- capital*(X), linkedViaTrain(X,Y).
capital(X) :- capital*(X).</p>
      <p>desirableArea(X) :- commutingArea(X).</p>
      <p>Moreover, starting from the SPARQL query q(x) reported below</p>
      <p>SELECT ?X WHERE { ?X :linkedViaTrain ?Y. ?Y rdf:type :DesirableArea }
we obtain the following UCQ Qq;T (x), also encoded as a set of Datalog rules:
q(X) :- linkedViaTrain(X,Y), desirableArea(Y).
q(X) :- linkedViaTrain(X,Y), capital(Y).
q(X) :- linkedViaTrain(X,Y), commutingArea(Y).
q(X) :- linkedViaTrain(X,Y), capital*(Y).
q(X) :- commutingArea(X).</p>
      <p>q(X) :- capital*(X).
4</p>
    </sec>
    <sec id="sec-3">
      <title>Query Optimization</title>
      <p>
        The pair (Qq;T (x); PT ) returned by Algorithm 1 is further optimized by a
pruning strategy followed by the so-called Magic Sets rewriting |the latter is already
in use in dlv2 but it has been further improved due to the speci c nature of PT .
The result of this phase consists of the pair (opt(Qq;T (x)); opt(PT )).
Pruning Strategy. Pairs of GCIs of the form C1 v C2 and C2 v C1 give rise
to Datalog queries containing rules with multiple predicates having the same
extensions: C1(X) : C2(X) and C2(X) : C1(X). The same happens with RIs.
During the evaluation of the query, however, this can be considerably expensive.
Hence, we adopt the following pruning strategy. Let E = fE1; :::; Ekg be a set of
equivalent concepts or roles. First, we remove from PT all the rules of the form
Ei(X) : Ej(X) with 1 &lt; i k and 1 j k. Second, let PT1 be the subset of
PT containing only rules of the form E1(X) : Ej(X) with 2 j k, for each
i 2 f2; :::; kg, we replace each occurrence of Ei by E1 both in Qq;T (x) and in
each rule of PT that does not belong to PT1 . An analogous technique is applied
over RIs of the form r v s and s v r by taking into account, in this case,
that the rst argument of r (resp., s) maps the second one of s (resp., r).
Magic Sets Rewriting. Datalog systems usually implement a bottom-up
algorithm that iteratively derives new facts by matching bodies with already known
facts. Queries are answered on the xpoint of the algorithm producing the
canonical model of the program. In contrast, a typical top-down algorithm for query
answering looks for a rule from which some answers to the input query might be
derived; if this kind of rule is found, its body atoms are considered as subqueries
and the procedure is iterated. This way, only parts of the program that are
relevant for answering the query are evaluated. Magic Sets [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] aim at combining
the bene ts of the two algorithms; in fact the program is rewritten to simulate a
top-down query evaluation via a bottom-up algorithm. Basically, Magic Sets
introduce rules de ning additional atoms, named magic atoms, to identify relevant
atoms for answering the query, namely atoms reachable by a top-down query
evaluation. The bottom-up evaluation is then limited by adding magic atoms in
the bodies of the original rules. Consider the Datalog query
ancestor(X,Y) :- parent(X,Y).
ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
      </p>
      <p>ancestor(mario,X)?
The Magic Sets rewriting starts with the query seed m#ancestor#bf(mario),
modi es the rules de ning the intentional predicate ancestor, and introduces
magic rules for every occurrence of intentional predicates in the modi ed rules:
m#ancestor#bf(mario).
ancestor(X,Y) :- m#ancestor#bf(X), parent(X,Y).
ancestor(X,Y) :- m#ancestor#bf(X),parent(X,Z),ancestor(Z,Y).
m#ancestor#bf(Z) :- m#ancestor#bf(X), parent(X,Z).</p>
      <p>ancestor(mario,X)?
The new program is specialized for answering the original query as its
bottomup evaluation only materializes descendants of mario, rather than the full
ancestor relation. For large programs, however, many \irrelevant" rules may be
introduced, which in turn unavoidably overload the reasoning. To optimize the
rewriting, owl2dlv performs two novel steps: (1) Eliminate rules that have a
magic atom with predicate m#p# if 6= f f and m#p#f f also occurs in
the rewritten program; and (2) Remove every rule r1 whenever it is subsumed
by some other rule r2 (r1 v r2), namely there is a variable substitution that
maps the head (resp., body) of r2 to the head (resp., body) of r1. To avoid the
quadratic number of checks, owl2dlv associates each rule with a suitable hash
value of size 64 bits. Then, r1 v r2 is checked only if the bit-a-bit equation
hash(r1) &amp; hash(r2) == hash(r2) is satis ed.
5</p>
    </sec>
    <sec id="sec-4">
      <title>OWL2DLV: Design and Implementation</title>
      <p>The owl2dlv architecture is depicted in Figure 2. The system features four main
modules: Loading, Rewriting, Query Answering, and Command Interpreter. Clients
interact with the system through the latter one, which takes user commands
and requests to the internal modules to execute the corresponding behavior, and
provide the output to the client. This module allows to \keep alive" the system,
and execute multiple commands (e.g., loading, warmup, data updates, and query
evaluations) without having to instantiate a new process for each client request.
The Command Interpreter can be controlled either via command line (e.g., bash
shell in Linux) or from external applications through a Java API. The remaining
three modules are discussed below.</p>
      <p>
        Loading. It handles the input of the system. In particular, it processes an
OWL 2 ABox encoded in Turtle format via the ABox Loader. To guarantee a
high performance both in the scanner and in the parser phase, owl2dlv employs
Flex &amp; Bison [
        <xref ref-type="bibr" rid="ref1 ref2">1,2</xref>
        ] in the implementation of the o cial Turtle grammar and
the parsing procedure. The RDFS datatypes xsd : double, xsd : integer, and
xsd : string are e ciently and e ectively handled; nevertheless, the datatypes
check is optional. The result of the parsing phase are Datalog-like facts; with all
the pre xed names expanded, predicate names encoded using IRIs and terms
encoded using strings (and eventually integers). They are then stored in the
owl2dlv data structures handled by the Data Manager. Finally, it worth noting
that a scalability test over the LUBM dataset [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ] shows that this module evolves
linearly both in time and memory. Concerning the TBox, owl2dlv supports
OWL 2 Horn-SHIQ ontologies encoded in RDF/XML. The input is parsed by
the TBox Loader using the well-known OWL API [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ] and loaded in DL-like data
structures that are suitable for the purposes of Algorithm 1. During the parsing,
every range restriction on one of the aforementioned datatype properties is also
kept in a suitable data structure, later exploited by other modules. Finally, the
system supports a set of SPARQL conjunctive queries via the Query Loader. Also
in this case, the input is parsed via the OWL API.
      </p>
      <p>Rewriting. It is responsible to implement Algorithm 1 via the Datalog Rewriter
submodule and optimize |as described in Section 4 by applying the
pruning strategy and the Magic Sets rewriting| its output (Qq;T (x); PT ) via the
Optimizer. The Datalog Rewriter is also in charge of producing the datatypes
directives: for each data property enforcing a datatype d in the range of a role r,
the directive #datatypes( r/2 ,f2:dg) is added to PT . This syntax is
inherited from dlv2, where r/2 says that r is of arity 2, and 2:d that the second
argument of r must be of type d. Moreover, for each range assertion for a role
r2 over a datatype d and for each role inclusion r1 v r2, a range assertion for r1
over d is added to PT , until a xpoint is reached.</p>
      <p>
        Query Answering. This module, which is in charge of answering to Datalog
queries over the input ABox, consists of three submodules. The Data Manager
handles the extensional part of each input predicate and organizes it e ciently
by means of indexed data structures; as data may undergo through updates,
the module is also responsible for managing data additions and deletions. The
Query Manager handles query rewritings, along with meta-information about the
scheduling, guiding the evaluation of each input query. These two submodules
may need to exchange info: the Data Manager may ask for information about
the structure of the Datalog queries to single out an optimal indexing policy,
while the Query Manager may need statistics about data distribution to de ne
an optimal scheduling. Query answering is carried out by the Datalog Engine,
which represents an extension of i-dlv [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] (the grounder of dlv2). The overall
evaluation procedure is based on a bottom-up process based on a semi-nave
approach empowered with optimizations working in synergy [
        <xref ref-type="bibr" rid="ref21 ref22">21,22</xref>
        ] and extended
via techniques speci cally devised to manage e ciently large sizes of data as we
brie y summarize below. The evaluation process has been endowed with a
fruitful memory-releasing policy that, on the basis of structural information over the
program at hand, anticipates the release of memory occupied by internal data
structures as soon as these are no longer needed. Speci cally, data structures
intended to represent the intensional part of a predicate p, are removed once all
rules depending on p have been fully grounded. Moreover, we devised an
optimized data retrieval strategy to reduce both the memory needed to store data
and the time required to retrieve them. In particular, performance improvements
have been achieved by re-implementing internal data structures and by
optimizing crucial points of the retrieval task that, when frequently executed on large
sizes, may negatively a ect the performance. The system features also a
persistence mechanism allowing to serialize input data handled by the Data Manager
on the disk in order to enable a faster reloading of input data.
6
      </p>
    </sec>
    <sec id="sec-5">
      <title>OWL2DLV: Functionalities and Application Scenarios</title>
      <p>When dealing with query answering in large-scale contexts, it is fairly common
that the system at hand is required to repeatedly query on demand a certain
KB where the ABox slowly changes over time by preserving, however, its
structural properties. This features a number of scenarios that might signi cantly
di er, depending on what is known before the reasoning starts. To maximize the
performance, each scenario requires an appropriate query answering strategy,
or setting, acting as a tuning mechanism that determines an e ective indexing
schema, along with a compatible body-ordering (when possible) for all rules.
This is performed by the Query Answering module during the so-called warmup
phase, executed just after the loading phase has been completed. The resulting
overhead, although not negligible, is paid only once. We now summarize some
of the most common scenarios while assuming that an initial ABox A is known.
Informed. Both the TBox T and some template queries (i.e., prototypical
conjunctive queries where some arguments bounded by constants are marked in
order to indicate that such constants might change at query time) are known.
In this case, for each template query q(x), the system performs a preliminary
run of opt(Qq;T (x)) over A [ opt(PT ). This step pre-computes indices and body
orderings that will be of use when the system will be actually queried; roughly,
it saves the choices that dlv2 would make in case of a \one-shot" execution.
Responsive. The TBox T is known, while no information is available about the
incoming queries. Here, a more general strategy is adopted: the system performs
a single preliminary run over A [ PT (without any query) and, similarly to the
previous case, it stores information about body ordering and indexing for all rules
of PT that dlv2 would choose in a one-shot execution. Then, by predicting how
PT is generally modi ed by the pruning and the Magic Sets rewriting, owl2dlv
enriches the set of created indices accordingly.</p>
      <p>Dynamic. Nothing is available. Clearly, no preliminary run for pre-computing
body orderings can be performed. Depending on the memory availability, this
drives the system to opt either for an aggressive indexing policy where all possible
indices are computed over input data or a parsimonious (yet \blind") indexing
policy where only the rst attribute of each predicate is indexed, while delegating
to the query answering phase the creation of possibly needed further indices. This
setting is also used as the default whenever the user tries to specify a setting not
compatible with the actual scenario.
7</p>
    </sec>
    <sec id="sec-6">
      <title>OWL2DLV: Performance</title>
      <p>
        We report the results of an experimental evaluation of owl2dlv over LUBM [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ]
and DBpedia [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Note that, by focusing on the few ready-to-use OWL 2
reasoning services with a server-like behavior, neither mastro [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ] nor ontop [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]
nor rdfox [
        <xref ref-type="bibr" rid="ref41">41</xref>
        ] fully support query answering in both domains; in particular
all of them do not process some of the axioms in the LUBM TBox. Further
experiments with computationally intensive benchmarks, such as LUBM9 [
        <xref ref-type="bibr" rid="ref40">40</xref>
        ] and
UOBM [
        <xref ref-type="bibr" rid="ref37">37</xref>
        ], will be part of an extended version of this paper. Moreover, a
comparison against mastro, ontop and rdfox on lightweight ontologies as well
as a comparison against modern Datalog-based systems like vadalog [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and
graal [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] for query existential rules [
        <xref ref-type="bibr" rid="ref12 ref13">12,13</xref>
        ] is also in our agenda.
Benchmarks. LUBM is the prime choice of our industrial partner for the
challenge. It describes a very-large real-world application domain encoded in OWL 2
Horn-SHIQ with customizable and repeatable synthetic data. The benchmark
incorporates 14 SPARQL queries, 10 of which are bound (i.e., containing at least
a constant). When rewritten together with the TBox, each LUBM query gives rise
to a Datalog query consisting of about 130 rules. Data generation is carried out
by the LUBM data generator tool (UBA) whose main parameter is the number
of universities to consider: 8,000 in our case, for a total number of about 1 billion
triples. This dataset is next referred to as LUBM-8000. Concerning DBpedia, it
is a well-known KB created with the aim of sharing on the Web the multilingual
knowledge collected by Wikimedia projects in a machine-readable format. For
this benchmarks, we inherited a set of queries from an application conceived to
query DBpedia in natural language applying the approach [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. When rewritten
together with the TBox, each DBpedia query gives rise to a Datalog query of
almost 5400 rules. The latest release of the o cial DBpedia dataset consists of
13 billion pieces of multilingual information (RDF triples). Here, we focus on the
Max Memory
Loading
Warmup
Query Answering (all)
Query Answering (bound)
information extracted from the English edition of Wikipedia that is composed by
about half a billion triples (https://wiki.dbpedia.org/public-sparql-endpoint).
Results and Discussion. The machine used for testing is a Dell Linux server
with an Intel Xeon Gold 6140 CPU composed of 8 physical CPUs clocked at 2.30
GHz, with 297GB of RAM. According to the challenge, a memory limit of 256GB
has been set during all tests. Table 1 shows the results of our analysis; bound
queries are reported in bold. The upper part of the table reports times needed by
owl2dlv to answer queries under the three scenarios discussed in Section 6; the
second part shows extra statistics about peaks of memory, loading and warmup
times, and average answering times computed over all queries and over bound
queries only. In the informed scenario {where we assume that the TBox and
the template queries are known in advance{ we obtain the best performance.
Despite the large ABox, on LUBM almost all bound queries are answered in less
than 0:1 seconds with an average time of about 0:7 seconds, while on DBpedia
the average evaluation time over all queries is about 0:2 seconds. These results
con rm the e ectiveness of all enhancements herein discussed and of the Magic
Sets technique. In the responsive scenario {where only the TBox is known in
advance{ the system performance is comparable with the one obtained in the
informed scenario, although in general the evaluation time is a bit higher. These
results con rm that the warmup policy of this setting has a positive impact on
the system performance although queries are not known. Finally, in the dynamic
scenario {where nothing is known{ the parsimonious indexing policy is adopted
since 256GB are not enough to use the aggressive one. Uniformly, the same policy
is also used for DBpedia although not expressly needed. This produces a general
gain in the warmup phase later unavoidably paid during the query evaluation
due to some missing index that has to be computed on-the- y.
      </p>
      <p>Acknowledgments. This work has been partially supported by Samsung
under project \Enhancing the DLV system for large-scale ontology reasoning", by
MISE under project \S2BDW" (F/050389/01-03/X32) { \Horizon2020" PON
I&amp;C2014-20 and by Regione Calabria under project \DLV LargeScale" (CUP
J28C17000220006) { POR Calabria 2014-20.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>1. The fast lexical analyzer</article-title>
          . URL https://github.com/westes/ ex
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>2. Gnu bison. URL https://www.gnu.org/software/bison</mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Adrian</surname>
          </string-name>
          , W.T.,
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuteri</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodaro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fusca</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manna</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zangari</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>The ASP system DLV: advancements and applications</article-title>
          .
          <source>KI</source>
          <volume>32</volume>
          (
          <issue>2-3</issue>
          ),
          <volume>177</volume>
          {
          <fpage>179</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Adrian</surname>
          </string-name>
          , W.T.,
          <string-name>
            <surname>Manna</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Amendola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Adrian</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Entity set expansion from the web via ASP</article-title>
          .
          <source>In: ICLP TCs</source>
          , pp.
          <volume>1</volume>
          :
          <issue>1</issue>
          {
          <issue>1</issue>
          :
          <issue>5</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodaro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fusca</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zangari</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>The ASP system DLV2</article-title>
          . In: LPNMR (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodaro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Advances in WASP</article-title>
          . In: LPNMR, LNCS, vol.
          <volume>9345</volume>
          , pp.
          <volume>40</volume>
          {
          <issue>54</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greco</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
          </string-name>
          , N.:
          <article-title>Magic sets for disjunctive datalog programs</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>187</volume>
          ,
          <issue>156</issue>
          {
          <fpage>192</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Amendola</surname>
          </string-name>
          , G.:
          <article-title>Preliminary results on modeling interdependent scheduling games via answer set programming</article-title>
          .
          <source>In: RiCeRcA@AI*IA</source>
          , vol.
          <volume>2272</volume>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Amendola</surname>
          </string-name>
          , G.:
          <article-title>Solving the stable roommates problem using incoherent answer set programs</article-title>
          .
          <source>In: RiCeRcA@AI*IA</source>
          , vol.
          <volume>2272</volume>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Amendola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodaro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>On the application of answer set programming to the conference paper assignment problem</article-title>
          .
          <source>In: AI*IA</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Amendola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greco</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Modeling and reasoning about NTU games via answer set programming</article-title>
          .
          <source>In: IJCAI</source>
          , pp.
          <volume>38</volume>
          {
          <issue>45</issue>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Amendola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manna</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Finite model reasoning over existential rules</article-title>
          .
          <source>TPLP</source>
          <volume>17</volume>
          (
          <issue>5-6</issue>
          ),
          <volume>726</volume>
          {
          <fpage>743</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Amendola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manna</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Enhancing existential rules by closed-world variables</article-title>
          .
          <source>In: IJCAI</source>
          , pp.
          <volume>1676</volume>
          {
          <issue>1682</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Auer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bizer</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kobilarov</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cyganiak</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ives</surname>
            ,
            <given-names>Z.G.</given-names>
          </string-name>
          :
          <article-title>Dbpedia: A nucleus for a web of open data</article-title>
          .
          <source>In: ISWC, LNCS</source>
          , pp.
          <volume>722</volume>
          {
          <issue>735</issue>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F</given-names>
          </string-name>
          . (eds.):
          <article-title>The Description Logic Handbook</article-title>
          . C.U.P. (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Baget</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leclere</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mugnier</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rocher</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sipieter</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Graal: A toolkit for query answering with existential rules</article-title>
          .
          <source>In: RuleML</source>
          , pp.
          <volume>328</volume>
          {
          <issue>344</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Beckett</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prud</surname>
          </string-name>
          'hommeaux, E.,
          <string-name>
            <surname>Carothers</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Machina</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Rdf 1.1 turtle { terse rdf triple language</article-title>
          .
          <source>W3C Recommendation</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Bellomarini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sallinger</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>The vadalog system: Datalog-based reasoning for knowledge graphs</article-title>
          .
          <source>PVLDB</source>
          <volume>11</volume>
          (
          <issue>9</issue>
          ),
          <volume>975</volume>
          {
          <fpage>987</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Bodirsky</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalmau</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Datalog and constraint satisfaction with in nite templates</article-title>
          .
          <source>J. Comput. Syst. Sci</source>
          .
          <volume>79</volume>
          (
          <issue>1</issue>
          ),
          <volume>79</volume>
          {
          <fpage>100</fpage>
          (
          <year>2013</year>
          ).
          <source>DOI 10</source>
          .1016/j.jcss.
          <year>2012</year>
          .
          <volume>05</volume>
          .012
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Cal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lukasiewicz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>A general datalog-based framework for tractable query answering over ontologies</article-title>
          .
          <source>J. Web Semant</source>
          .
          <volume>14</volume>
          ,
          <issue>57</issue>
          {
          <fpage>83</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fusca</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zangari</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>I-DLV: the new intelligent grounder of DLV. Intelligenza Arti ciale 11(1</article-title>
          ),
          <volume>5</volume>
          {
          <fpage>20</fpage>
          (
          <year>2017</year>
          ).
          <source>DOI 10</source>
          .3233/IA-170104
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zangari</surname>
          </string-name>
          , J.:
          <article-title>Optimizing answer set computation via heuristic-based decomposition</article-title>
          . TPLP p.
          <volume>1</volume>
          {
          <issue>26</issue>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cogrel</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Komla-Ebri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
          </string-name>
          , G.:
          <article-title>Ontop: Answering SPARQL queries over relational databases</article-title>
          .
          <source>Semantic Web</source>
          <volume>8</volume>
          (
          <issue>3</issue>
          ),
          <volume>471</volume>
          {
          <fpage>487</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Giacomo</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Poggi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>RodriguezMuro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruzzi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Savo</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          :
          <article-title>The MASTRO system for ontologybased data access</article-title>
          .
          <source>Semantic Web</source>
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <volume>43</volume>
          {
          <fpage>53</fpage>
          (
          <year>2011</year>
          ).
          <source>DOI 10</source>
          .3233/SW-2011-0029
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Carral</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dragoste</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , Krotzsch,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>The combined approach to query answering in horn-alchoiq</article-title>
          .
          <source>In: KR</source>
          , pp.
          <volume>339</volume>
          {
          <fpage>348</fpage>
          . AAAI Press (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Carroll</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herman</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          :
          <article-title>Owl 2 web ontology language rdfbased semantics (second edition</article-title>
          ) (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Cuteri</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reale</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A logic-based question answering system for cultural heritage</article-title>
          .
          <source>In: JELIA, LNCS</source>
          . Springer (to appear) (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ortiz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simkus</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tran</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
          </string-name>
          , G.:
          <article-title>Query rewriting for horn-shiq plus rules</article-title>
          .
          <source>In: AAAI</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Wanko</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Theory solving made easy with clingo 5</article-title>
          . In: ICLP TCs, pp.
          <volume>2</volume>
          :
          <issue>1</issue>
          {2:
          <issue>15</issue>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>B.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kharlamov</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kostylev</surname>
            ,
            <given-names>E.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zheleznyakov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Controlled query evaluation for datalog and OWL 2 pro le ontologies</article-title>
          .
          <source>In: IJCAI</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          , He in, J.:
          <article-title>LUBM: A benchmark for OWL knowledge base systems</article-title>
          .
          <source>J. Web Semant</source>
          .
          <volume>3</volume>
          (
          <issue>2-3</issue>
          ),
          <volume>158</volume>
          {
          <fpage>182</fpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bechhofer</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The OWL API: A java API for OWL ontologies</article-title>
          .
          <source>Semantic Web</source>
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <volume>11</volume>
          {
          <fpage>21</fpage>
          (
          <year>2011</year>
          ).
          <source>DOI 10</source>
          .3233/SW-2011-0025
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>Hustadt</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>Data complexity of reasoning in very expressive description logics</article-title>
          .
          <source>In: IJCAI</source>
          , pp.
          <volume>466</volume>
          {
          <issue>471</issue>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Consequence-driven reasoning for horn SHIQ ontologies</article-title>
          .
          <source>In: IJCAI</source>
          , pp.
          <year>2040</year>
          {
          <year>2045</year>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          35.
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The combined approach to ontology-based data access</article-title>
          .
          <source>In: IJCAI</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          36. Krotzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Rudolph</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Hitzler</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Complexities of horn description logics</article-title>
          .
          <source>ACM Trans. Comput. Log</source>
          .
          <volume>14</volume>
          (
          <issue>1</issue>
          ), 2:
          <issue>1</issue>
          {2:
          <issue>36</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          37.
          <string-name>
            <surname>Ledvinka</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kremen</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Object-uobm: An ontological benchmark for objectoriented access</article-title>
          .
          <source>In: KESW</source>
          , vol.
          <volume>518</volume>
          , pp.
          <volume>132</volume>
          {
          <fpage>146</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          38.
          <string-name>
            <surname>Leone</surname>
          </string-name>
          , N.:
          <article-title>The AI system DLV: ontologies, reasoning, and more</article-title>
          .
          <source>In: IC3K</source>
          , pp.
          <volume>5</volume>
          {
          <issue>16</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          39.
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfeifer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The DLV system for knowledge representation and reasoning</article-title>
          .
          <source>TOCL</source>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>
          40.
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seylan</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The combined approach to OBDA: taming role hierarchies using lters</article-title>
          .
          <source>In: ISWC</source>
          , pp.
          <volume>314</volume>
          {
          <issue>330</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          41.
          <string-name>
            <surname>Nenov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Piro</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Banerjee</surname>
          </string-name>
          , J.:
          <article-title>Rdfox: A highlyscalable RDF store</article-title>
          .
          <source>In: ISWC</source>
          , vol.
          <volume>9367</volume>
          , pp.
          <volume>3</volume>
          {
          <issue>20</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref42">
        <mixed-citation>
          42.
          <string-name>
            <surname>Stefanoni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Small datalog query rewritings for EL</article-title>
          .
          <source>In: DL, CEUR Workshop Proceedings</source>
          , vol.
          <volume>846</volume>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref43">
        <mixed-citation>
          43.
          <string-name>
            <surname>Stefanoni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , Krotzsch,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Rudolph</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.:</surname>
          </string-name>
          <article-title>The complexity of answering conjunctive and navigational queries over OWL 2 EL knowledge bases</article-title>
          .
          <source>J. Artif. Intell. Res</source>
          .
          <volume>51</volume>
          ,
          <issue>645</issue>
          {
          <fpage>705</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref44">
        <mixed-citation>
          44.
          <article-title>W3C: SPARQL 1.1 entailment regimes</article-title>
          . https://www.w3.org/TR/ sparql11-entailment/ (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref45">
        <mixed-citation>
          45.
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Poggi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ontology-based data access: A survey</article-title>
          .
          <source>In: IJCAI</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>