<!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>On Implementing Temporal Query Answering in DL-Lite* (extended abstract)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Veronika Thost</string-name>
          <email>thost@tcs.inf.tu-dresden.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jan Holste</string-name>
          <email>mail@janholste.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Özgür Özçep</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Technische Universität Dresden</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Technische Universität Hamburg-Harburg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Lübeck</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Temporal information plays a central role in many applications of ontology-based data access (OBDA). For example, knowledge about the past is usually kept in patient records, and collected by companies or scientific projects as MesoWest4, focusing on weather data. Such applications obviously benefit from using ontologies for data integration and access (e.g., the wind force 'Storm' on the well-known Beaufort Wind Force Scale is equally characterized by wind speed and wave height, which can be represented by a general concept inclusion as HighWindSpeed t HighWaves v Storm). Temporal knowledge is however not taken into account by systems implementing OBDA, in general. Though, assuming that we consider several weather stations' data of the past 24 hours, a query such as the following could be interesting: “Get the heritage sites that are nearby a weather station, for which at some time in the past (24 hours) a danger of a hurricane was detected, since then, the wind force has been continuously very high, and it increased considerably during the two latest times of observation.” For that reason, we investigate different approaches for answering temporal conjunctive queries (TCQs) [4, 5] w.r.t. ontologies written in the description logic (DL) DL-Litecore (hereinafter called DL-Lite). TCQs combine conjunctive queries (CQs) via LTL operators5 and have already been studied extensively in the context of DL-Lite [13, 8]. The above example query could be specified as the following TCQ: HeritageSite(x) ^ WeatherStation(y) ^ nearby(x; y) ^ HighWind(y) S DangerOfHurricane(y) ^ # Storm(y) ^ ViolentStorm(y); asking for all pairs (x; y) of heritage sites and nearby weather stations, whose sensor values at some point in time implied a danger of a hurricane, since (S) then, the measurements have implied Beaufort category 'high wind', in the previous (# ) moment of observation they implied category 'storm', and the latest values imply 'violent storm'. The semantics of TCQs is based on temporal knowledge bases, which, in addition to the ontology (assumed to hold at every point in time), contain a sequence of fact bases A0; A1; : : : ; An, representing the data collected at specific points in time. Especially note that the ontology and the fact bases itself are formulated in a classical DL.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        answering w.r.t. an ontology written in DL-Lite. Specifically, Ontop internally rewrites a
given conjunctive query, which is written in the abstract vocabulary of the ontology, into
an SQL query that encodes the relevant ontological knowledge but addresses a standard
database system; the latter can then be used to store the data and efficiently answer the
queries. But whereas a lot of DL research is studying temporal extensions of ontology
and query languages [
        <xref ref-type="bibr" rid="ref11 ref13 ref14 ref2 ref3 ref5 ref6 ref8">2, 6, 3, 11, 13, 5, 8, 14</xref>
        ], none of the freely available systems takes
the temporal nature of the data into account, yet (i.e., the query languages supported
do not provide operators for explicitly referencing different points in time).
Nevertheless, recently, several practical approaches for answering temporal queries have been
developed in the fields of (RDF) stream reasoning [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and complex event processing [
        <xref ref-type="bibr" rid="ref1 ref9">9,
1</xref>
        ]. These systems are tailored to continuously answering given queries over an infinite
stream of data—which is usually realized by restricting the focus to a window of the
data (i.e., instead of considering all the past data available, the number of considered
time points or data instances is fix). But only few of these systems support ontologies,
yet, and standards for a common stream representation and processing, for query
languages, and for operation semantics are still to be developed.
      </p>
      <p>
        Our work complements these applied approaches by starting from a DL
perspective, where many use cases consider static data, ontologies are important, and there are
several well-investigated query languages. Specifically, we study three pragmatic
approaches for answering TCQs based on the work of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. We prototypically implemented
and evaluated them, and in this paper report on our experiences.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Algorithms for Temporal Query Answering</title>
      <p>
        In particular, [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] propose algorithms for answering temporal queries (w.r.t. TKBs) that
generalize TCQs in that they combine queries of a generic atemporal query language Q
via LTL-operators (i.e., we restrict Q to CQs).6 Similar to the streaming scenario, [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
assume a fix set of TCQs to be answered continuously at time point n.
      </p>
      <p>
        We first implemented the Iterative Algorithm (IA) (cf. Section 6 in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]), which
iteratively computes sets of answers to several subqueries of the TCQ to be answered,
for each time point i, 0 i n. For example, the answers to # Storm(x) at i are
obtained by evaluating Storm(x) at i 1. Since the processing at i only uses Ai and
the sets computed for the previous moment, whose sizes are bounded, the IA achieves a
so-called bounded history encoding (i.e., it’s runtime does not depend on the number of
considered fact bases). A growing number of data from the past however usually leads
to an increase in processing time, in practice. We therefore describe a window-based
variant of the IA, the Vector Algorithm (VA) (cf. Section 4 in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]). With this approach,
the entire history can still be regarded (i.e., by considering it as one window) but, for
example, streaming scenarios can be managed, too. The VA specifically supports
sliding windows, where the TCQs are not evaluated at every time point, but in fix intervals,
by only regarding the then necessary of the above mentioned sets of answers. To answer
the query # Storm(x) at every second point in time, for example, Storm(x) does not
always have to be evaluated. Our implementations of both algorithms are based on
materializing the fact bases and thus may be extended in the future w.r.t. other rewritable
6[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] assume Q to be a rewritable query language, which basically means that the certain
answers to every query in Q w.r.t. a knowledge base K can be obtained by answering an appropriate
adaptation of the query in a canonical model of K.
query languages (e.g., by employing a corresponding reasoner for the atemporal query
answering, temporal queries over EL-TKBs could be answered).
      </p>
      <p>
        To get an impression of the performance of a temporal rewriting approach, we
finally consider (a rather simple) Rewriting Algorithm (RA) translating TCQs into
standard database queries. Note that the idea is similarly described by [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. However, in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ],
the TCQs are assumed to be rewritten into a temporal standard query language. Since it
turned out that such query languages are only partially supported by existing databases,
we describe a rewriting into basic SQL. In particular, we developed the QuAnTOn
library, which translates TCQs w.r.t. a DL-Lite ontology into SQL queries encoding the
relevant ontological knowledge and addressing a standard database. QuAnTOn applies
Ontop for rewriting the CQs into SQL, appropriately combines these SQL queries, and
adds clauses specifying the temporal conditions. For example, the TCQ # Storm(x)
could be translated into the below SQL query with the inner query coming from Ontop.
SELECT loc FROM
(SELECT loc, sensor, timestamp FROM sensorvalues
WHERE (sensor = 'wind-speed' AND value &gt; 24.5) OR
(sensor = 'wave-height' AND value &gt; 9))
WHERE timestamp = current_time-1;
      </p>
    </sec>
    <sec id="sec-3">
      <title>Evaluation Results</title>
      <p>
        We focus on the querying of weather data as outlined above and regard sequences of fact
bases each containing 1000 assertions representing sensor measurements. We chose this
(streaming) scenario, sketched in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], to facilitate a comparison with stream reasoning
systems, which is planned for future work. We also use an extension of the
corresponding sensor-observation ontology7. To especially learn about the performance of different
kinds of TCQs, we only use very simple CQs within the latter. We investigate the time
needed for rewriting and answering TCQs in dependence of the number n + 1 of fact
bases considered and show the below;8 the full details can be found in [
        <xref ref-type="bibr" rid="ref12 ref16">16, 12</xref>
        ].
– The time required for the initial preprocessing (per TCQ) is negligible: less than 1
ms for the IA/VA and about 200 ms for the application of the RA.
– The scenario considering a fix set of sensors suits our constant domain assumption,
and the IA shows a rather constant performance (Figure 1).
– The VA is only applicable for windows of moderate size, due to memory issues.
– The time taken for answering the queries of the RA strongly depends on the kind
of the queries and the application (e.g., the impact of fetching the results is large).
0
7http://wiki.knoesis.org/index.php/LinkedSensorData
8The tests were run on an 2,2 GHz Intel Core i7 machine with 4 GB RAM. For answering
the queries returned by QuAnTOn, we applied a MySQL (v5.2.38) database.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Anicic</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rudolph</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fodor</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stojanovic</surname>
          </string-name>
          , N.:
          <article-title>Stream reasoning and complex event processing in etalis</article-title>
          .
          <source>Semant. web 3</source>
          (
          <issue>4</issue>
          ),
          <fpage>397</fpage>
          -
          <lpage>407</lpage>
          (
          <year>Oct 2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Artale</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <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>Wolter</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Temporalising tractable description logics</article-title>
          . In: Goranko,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>X.S</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the 14th International Symposium on Temporal Representation and Reasoning (TIME</source>
          <year>2007</year>
          ), pp.
          <fpage>11</fpage>
          -
          <lpage>22</lpage>
          . IEEE Press (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Artale</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ryzhikov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharyaschev</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A cookbook for temporal conceptual data modelling with description logics</article-title>
          .
          <source>ACM Transactions on Computational Logic</source>
          <volume>15</volume>
          (
          <issue>3</issue>
          ),
          <volume>25</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borgwardt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Lippmann, M.:
          <article-title>Temporalizing ontology-based data access</article-title>
          . In: Bonacina,
          <string-name>
            <surname>M.P.</surname>
          </string-name>
          (ed.)
          <source>Proc. of the 24th Int. Conf. on Automated Deduction (CADE'13). Lecture Notes in Computer Science</source>
          , vol.
          <volume>7898</volume>
          , pp.
          <fpage>330</fpage>
          -
          <lpage>344</lpage>
          . Springer-Verlag (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borgwardt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Lippmann, M.:
          <article-title>Temporal query entailment in the description logic SHQ</article-title>
          .
          <source>Journal of Web Semantics</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghilardi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>LTL over description logic axioms</article-title>
          .
          <source>ACM Transactions on Computational Logic</source>
          <volume>13</volume>
          (
          <issue>3</issue>
          ),
          <volume>21</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>21</lpage>
          :
          <fpage>32</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Balduini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dell'Aglio</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Della</given-names>
            <surname>Valle</surname>
          </string-name>
          , E.:
          <article-title>Stream reasoning for linked data</article-title>
          , http://streamreasoning.org/events/sr4ld2014
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Borgwardt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Lippmann,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Thost</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          :
          <article-title>Temporalizing rewritable query languages over knowledge bases</article-title>
          .
          <source>Journal of Web Semantics</source>
          (
          <year>2015</year>
          ), in press.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Cugola</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Margara</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Tesla: A formally defined event specification language</article-title>
          .
          <source>In: Proceedings of the Fourth ACM International Conference on Distributed Event-Based Systems (DEBS '10)</source>
          . pp.
          <fpage>50</fpage>
          -
          <lpage>61</lpage>
          . ACM, New York, NY, USA (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Gonçalves</surname>
            ,
            <given-names>R.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bail</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Jimenez-ruiz, E.,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>OWL Reasoner Evaluation (ORE</article-title>
          ) workshop
          <year>2013</year>
          results: Short report
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Gutiérrez-Basulto</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jung</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Lightweight description logics and branching time: A troublesome marriage</article-title>
          .
          <source>In: Proc. of the 14th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR'14)</source>
          . AAAI Press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Holste</surname>
          </string-name>
          , J.:
          <source>Ontology-Based Temporal Reasoning on Streams. Master's thesis</source>
          , Hamburg University of Technology (
          <year>October 2014</year>
          ), http://www.sts.tuhh.de/ pw-and
          <string-name>
            <surname>-</surname>
          </string-name>
          m-theses/
          <year>2014</year>
          /holste14a.pdf
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Klarman</surname>
          </string-name>
          , S., Meyer, T.:
          <article-title>Querying temporal databases via OWL 2 QL</article-title>
          . In: Kontchakov,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Mugnier</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.L</surname>
          </string-name>
          . (eds.)
          <source>Web Reasoning and Rule Systems, Lecture Notes in Computer Science</source>
          , vol.
          <volume>8741</volume>
          , pp.
          <fpage>92</fpage>
          -
          <lpage>107</lpage>
          . Springer International Publishing (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Özçep</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Möller</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neuenstadt</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>A stream-temporal query language for ontology based data access</article-title>
          . In: Lutz,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Thielscher</surname>
          </string-name>
          , M. (eds.)
          <source>KI 2014: Advances in Artificial Intelligence, Lecture Notes in Computer Science</source>
          , vol.
          <volume>8736</volume>
          , pp.
          <fpage>183</fpage>
          -
          <lpage>194</lpage>
          . Springer International Publishing (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>High performance query answering over DL-Lite ontologies</article-title>
          .
          <source>In: Principles of Knowledge Representation and Reasoning: Proceedings of the Thirteenth International Conference, KR 2012</source>
          , Rome, Italy, June 10-14,
          <year>2012</year>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Thost</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Holste</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Özgür Özçep:
          <article-title>On implementing temporal query answering in DL-Lite</article-title>
          .
          <source>LTCS-Report 15-12</source>
          ,
          <article-title>Chair for Automata Theory</article-title>
          , TU Dresden, Germany (
          <year>2015</year>
          ), http://lat.inf.tu-dresden.de/research/reports/2015/ THO-LTCS-
          <volume>15</volume>
          -12.pdf, see http://lat.inf.tu-dresden.de/research/reports.html.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duc</surname>
            ,
            <given-names>P.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.P.:</given-names>
          </string-name>
          <article-title>SRBench: a streaming RDF/SPARQL benchmark</article-title>
          .
          <source>In: Proceedings of the 11th International Conference on The Semantic Web - Volume Part I</source>
          . pp.
          <fpage>641</fpage>
          -
          <lpage>657</lpage>
          . ISWC'
          <volume>12</volume>
          , Springer-Verlag, Berlin, Heidelberg (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>