Elsevier

Artificial Intelligence

Volume 299, October 2021, 103536
Artificial Intelligence

First-order rewritability of ontology-mediated queries in linear temporal logic

https://doi.org/10.1016/j.artint.2021.103536Get rights and content

Abstract

We investigate ontology-based data access to temporal data. We consider temporal ontologies given in linear temporal logic LTL interpreted over discrete time (Z,<). Queries are given in LTL or MFO(<), monadic first-order logic with a built-in linear order. Our concern is first-order rewritability of ontology-mediated queries (OMQs) consisting of a temporal ontology and a query. By taking account of the temporal operators used in the ontology and distinguishing between ontologies given in full LTL and its core, Krom and Horn fragments, we identify a hierarchy of OMQs with atomic queries by proving rewritability into either FO(<), first-order logic with the built-in linear order, or FO(<,), which extends FO(<) with the standard arithmetic predicates x0(modn), for any fixed n>1, or FO(RPR), which extends FO(<) with relational primitive recursion. In terms of circuit complexity, FO(<,)- and FO(RPR)-rewritability guarantee OMQ answering in uniform

Image 1
and, respectively,
Image 2
.

We obtain similar hierarchies for more expressive types of queries: positive LTL-formulas, monotone MFO(<)- and arbitrary MFO(<)-formulas. Our results are directly applicable if the temporal data to be accessed is one-dimensional; moreover, they lay foundations for investigating ontology-based access using combinations of temporal and description logics over two-dimensional temporal data.

Introduction

Ontology-mediated query answering has recently become one of the most successful applications of description logics (DLs) and semantic technologies. Its main aim is to facilitate user-friendly access to possibly heterogeneous, distributed and incomplete data. To this end, an ontology is employed to provide (i) a convenient and uniform vocabulary for formulating queries and (ii) a conceptual model of the domain for capturing background knowledge and obtaining more complete answers. Thus, instead of querying data directly by means of convoluted database queries, one can use ontology-mediated queries (OMQs, for short) of the form q=(O,φ), where O is an ontology and φ a query formulated in the vocabulary of O. Under the standard certain answer semantics for OMQs, the answers to q over a data instance A are exactly those tuples of individual names from A that satisfy φ in every model of O and A. Because of this open-world semantics, answering OMQs can be computationally much harder than evaluating standard database queries. For example, answering an atomic query A(x) using an ontology in the standard description logic ALC can be coNP-hard for data complexity—the complexity measure (adopted in this paper) that regards the OMQ as fixed and the data instance as the only input to the OMQ answering problem. For this reason, weaker description logics (DLs) have been developed to enable not only tractable OMQ answering but even a reduction of OMQ answering to evaluation of standard relational database queries directly over the data, which is in

for data complexity. In fact, the popular and very successful DL-Lite family of DLs was designed so as to ensure rewritability of OMQs with conjunctive queries into first-order logic (FO) queries, and so to SQL. DL-Lite underpins the W3C standard ontology language OWL 2 QL [1], [2]. For applications of OMQ answering with OWL 2 QL, the reader is referred to [3], [4], [5], [6], [7], [8], [9], [10]; for a recent survey, consult [11].

DL-Lite and OWL 2 QL were designed to represent knowledge about static domains and are not suitable when the data and the vocabulary the user is interested in are essentially temporal. To extend OMQ answering to temporal domains, the ontology language needs to be extended by various temporal constructs studied in the context of temporal representation and reasoning [12], [13], [14]. In fact, combinations of DLs with temporal formalisms have been widely investigated since the pioneering work of Schmiedel [15] and Schild [16] in the early 1990s; we refer the reader to [13], [17], [18], [19] for surveys and [20], [21], [22], [23], [24], [25] for more recent developments. However, the main reasoning task targeted in this line of research has been knowledge base satisfiability rather than OMQ answering, with the general aim of probing various combinations of temporal and DL constructs that ensure decidability of satisfiability with acceptable combined complexity (which is the complexity measure that regards both the ontology and data instance as input).

Motivated by the success of DL-Lite and the paradigm of FO-rewritability in OMQ answering over static domains, our ultimate aim is the study of FO-rewritability of OMQs with temporal constructs in both ontologies and queries over temporal databases. To lay the foundations for this project, in this article we consider the basic scenario of querying timestamped ‘propositional’ data in a synchronous system with a centralised clock. We thus do not yet consider general temporal relational data but focus on ‘non-relational’ pure temporal data. We use the standard discrete time model with the (positive and negative) integers Z and the order < as precedence relation. The most basic and fundamental temporal language for the discrete time model is the linear temporal logic LTL with the temporal operators

(at the next moment of time), F (eventually), F (always in the future), U (until), and their past-time counterparts
(at the previous moment), P (some time in the past), P (always in the past) and S (since); see [26], [12], [14] and references therein. LTL and its fragments are particularly natural for our study of FO-rewritability as, by the celebrated Kamp's Theorem, LTL is expressively complete in the sense that anything that can be said in MFO(<), monadic first-order logic with the precedence relation < over the discrete (in fact, any Dedekind complete) model of time, and with reference to a single time point can also be expressed in LTL [27], [28].

Thus, in this article, we conduct an in-depth study of FO-rewritability and data complexity of OMQs with ontologies formulated in fragments of (propositional) LTL and queries given as LTL- or MFO(<)-formulas, assuming that (i) ontology axioms hold at all times and (ii) data instances are finite sets of facts of the form A(a,) saying that A is true of the individual a at the time instant Z. To illustrate, suppose that data instances contain facts about the status of a research article submitted to a journal using predicates for the events Submission, Notification, Accept, Reject, Revise and Publication, and that temporal domain knowledge about these events is formulated in an ontology O as follows:NotificationRejectAcceptRevise states that, at any moment of time, every notification is either a reject, accept or revision notification, and that it can only be one of them:RejectAccept,ReviseAccept,RejectRevise. The ontology O says that any event P above, except Notification and Revise, can happen only once for any article:P¬PP¬FP. It contains obvious necessary preconditions for publication and notification:PublicationPAccept,NotificationPSubmission, and also the post-conditions (eventual consequences) of acceptance, submission and a revision notification (for simplicity, we assume that after a revision notification the authors always eventually receive a notification regarding a revised version):AcceptFPublication,SubmissionFNotification,ReviseFNotification. Finally, the ontology O states that acceptance and rejection notifications are final:AcceptReject¬FNotification. Consider now the following set A of timestamped facts:Notification(a,Oct2017),Revise(a,Oct2019),Publication(a,Dec2019). Thus, according to A, the authors received a notification about their article a in October 2017, they received a revise notification about a in October 2019, and article a was published in December 2019. In the context of this example, it is natural to identify months in consecutive years with moments of time in the discrete time model (Z,<): for example, October 2017 is 0, October 2019 is 24, etc.

To illustrate OMQ answering, consider first the (atomic) LTL-formula φ1=Revise. By (1) and (6), the pairs (a,Oct2017) and (a,Oct2019) are the certain answers to the OMQ q1=(O,φ1); see Fig. 1. Now, consider the LTL-formula φ2=PSubmission, which we understand as a query asking for months when the article had been previously submitted. Despite the fact that A contains no facts about predicate Submission, the axioms (4) in O imply that φ2 is true for a at all points of the infinite interval [Oct2017,+) in every model of O and A, and so all pairs (a,n) with n[Oct2017,+) might be regarded as certain answers to the OMQ q2=(O,φ2). However, as usual in database theory, we are only interested in finitely many answers from the active domain, which can be defined as the smallest convex subset of Z containing all the timestamps from the data instance. Thus, the certain answers to q2 over A are the pairs (a,n) with n in the closed interval [Oct2017,Dec2019], which is shown in Fig. 1 by shading.

First-order rewritability makes it possible to find certain answers to such OMQs without ontology reasoning, simply by evaluating their FO-rewritings directly over the data instance (with built-in predicates such as < interpreted over the active domain). For the two OMQs above, FO-rewritings are as follows: the FO-formulaQ1(x,t)=Revise(x,t)(Notification(x,t)s((t<s)N(x,s))), whereN(x,s)=Notification(x,s)Accept(x,s)Reject(x,s)Revise(x,s), is an FO-rewriting of q1 in the sense that, for any given data instance A, the pair (a,n) with an article a in A and a moment of time n from the active domain of A is a certain answer to q1 over A iff Q1(a,n) holds true in the finite FO-structure given by A. Similarly,Q2(x,t)=s((s<t)Submission(x,s))s((st)N(x,s))s([(st)(s=t+1)]Publication(x,s)), where st abbreviates ¬(t<s), s=(t+1) stands for (t<s)¬s((t<s)(s<s)) and N(x,s) is given again by (7), is an FO-rewriting of q2. (Note that we use the ‘strict’ semantics for P and other temporal operators, which does not include the current point.) Observe that, in addition to the symbols from the OMQs, these rewritings use the precedence relation <, but no arithmetic operations. Also note that we always use a single variable, x, as the answer variable for individuals, and that we do not quantify over individuals. Thus, we can (and will) drop x from all rewritings and identify this target language for rewritings with FO(<), first-order logic with a built-in linear order.

We identify expressive fragments of LTL together with query languages for which every OMQ is rewritable into FO(<). To illustrate one of our main results, let Prior-LTL denote the fragment of LTL containing all formulas constructed using arbitrary Boolean connectives and temporal operators P, P, F and F. This language was one of the first temporal logics developed and studied in philosophical logic, going back to Prior [29], [30], [31], [32]. The ontology O above is given in Prior-LTL. We obtain the following rewritability result:

Theorem A

All OMQs with ontologies and queries in Prior-LTL are FO(<)-rewritable.

It follows that evaluating any such OMQ is in

for data complexity, and that evaluating them can be delegated to standard relational database management systems. Not all OMQs are FO(<)-rewritable. In particular, even very simple Horn ontologies with operators
and
give rise to OMQs that fall outside the scope of FO(<). Consider, for example, the ontology O2 with two axioms saying, that every ‘even’ time point is always followed by an ‘odd’ one, and the other way round. Using the fact that the set of even numbers cannot be defined in FO(<) [33], [34], one can show that the OMQ (O2,Even) has no rewriting in FO(<). The even numbers can, however, be defined in the extension FO(<,) of FO(<) with the standard numeric predicates t0(modn), for any fixed n>1. We identify fragments of LTL and query languages for which every OMQ is rewritable in FO(<,). As a main example, let Krom-LTL be the fragment of LTL with the unary temporal operators
,
, F, P, F and P, in which all axioms are binary, that is, contain at most two predicates (as in
or
). We show the following:

Theorem B

All OMQs with Krom-LTL ontologies and atomic queries are FO(<,)-rewritable.

Note that any such OMQ is still in

for data complexity and that, because of the standard support for basic arithmetic, evaluating them can be delegated to relational database management systems. Not all OMQs are FO(<,)-rewritable, however. Non-binary Horn ontologies with axioms such as
can express parity (the number of time points n with A(n) in the active domain is even), which cannot be defined in FO(<) extended with arbitrary arithmetic predicates [35].

Thus, our fine-grained classification of rewritability of LTL OMQs distinguishes between the different temporal operators that can occur in ontology axioms and also takes account of the Boolean (non-temporal) structure of the axioms by distinguishing between the core, Krom, Horn and full Boolean fragments1 of LTL. To provide a systematic analysis, it is useful to work with fragments of LTL given in the clausal normal formC1CkCk+1Ck+m, where the Ci are predicate names, possibly prefixed with operators

,
, F and P. Suppose that
and c{bool,horn,krom,core}. We denote by LTLco the temporal logic with clauses of the form (8), where the Ci can only use the (future and past) operators indicated in o, and m1 if c=horn; k+m2 if c=krom; k+m2 and m1 if c=core; and arbitrary k, m if c=bool. It follows from [36] that every LTL-ontology can be converted (possibly with a linear blowup and by introducing fresh predicates) in a canonical way into clausal normal form giving the same answers to queries as the original one. Observe that Prior-LTL and Krom-LTL ontologies as introduced above can be converted into LTLbool and, respectively,
ontologies.

We consider the following hierarchy of queries in our OMQs. Atomic OMQs (OMAQs, for short) use queries of the form A(t) with A a predicate.2 OMQs using arbitrary LTL formulas as queries are called ontology-mediated instance queries (or OMIQs), and OMQs using only positive LTL formulas as queries are called ontology-mediated positive instance queries (or OMPIQs). The queries introduced so far have exactly one (implicit) answer variable. To generalise our results to queries of arbitrary arity, we introduce the language of OMQs with any MFO(<)-formulas playing the role of queries, for exampleψ(t,t)=Revise(t)Accept(t)s((t<s<t)¬Revise(s)), asking for all pairs (t,t) such that t is the last revision date before the acceptance date t. We also consider OMQs with quasi-positive MFO(<)-formulas as queries that are constructed using ∧, ∨, ∀, ∃, as well as guarded ∀ such as, for example, in s((t<s<t)φ). We show that quasi-positive MFO(<)-formulas capture exactly the monotone MFO(<)-formulas (that are preserved under adding time points to the extension of predicates). We also show that OMQs with quasi-positive MFO(<)-formulas as queries behave in exactly the same way as OMPIQs. Our main result about these expressive queries is as follows:

Theorem C

All OMQs with arbitrary MFO(<)-queries are FO(RPR)-rewritable. All OMQs with LTLhorn or

ontologies and quasi-positive MFO(<)-queries are FO(<)-rewritable or FO(<,)-rewritable, respectively.

We summarise our rewritability results in Table 1. It is to be noted that the FO(<)-rewritability result for OMQs with Prior-LTL-ontologies and queries stated in Theorem A follows from the FO(<)-rewritability of all OMAQs using LTLbool ontologies as answering a Prior-LTL query C can be reduced to answering an atomic query A by adding the axiom CA to the ontology. Using similar reductions, one can also extend other query languages given in Table 1 in the obvious way.

As Table 1 shows, all of our OMQs are rewritable into the extension FO(RPR) of FO(<) with relational primitive recursion [37]. This implies that answering them is in

for data complexity (and thus can be performed by an efficient parallel algorithm [38]); it also means that answering OMQs can be done using finite automata [34]. In terms of circuit complexity, both FO(<)- and FO(<,)-rewritability of a given OMQ mean that answering this OMQ is in LogTime-uniform
for data complexity [39]. Note that the SQL:1999 ISO standard contains a with recursive construct that can represent various FO-queries with relational primitive recursion such as the query in Example 5 below, which cannot be expressed in FO without recursion.

It is known that under the open-world semantics of OMQs, answers to queries containing negation are often rather uninformative. For example, if one uses the query ReviseP¬Notification mediated by the publication ontology O above to retrieve the date of the first revise notification for an article, then one will only receive an answer if the submission date is just one time instant before the first revision notification. In classical OMQ answering, a way to obtain more meaningful answers to FO-queries is to interpret negation under the epistemic semantics as proposed by Calvanese et al. [40], [40]. Under this semantics, we regard ¬A(t) as true if A(t) is not entailed. (The same semantics is used in the standard query language SPARQL for RDF datasets when interpreted with OWL ontologies under the entailment regimes [41].) To illustrate, the query φ3=Revise(t)P¬Notification(t) will now return the time instant of the first revise notification in the database. It is well known that extending the expressive power of a query language in this way typically does not lead to an increase in data complexity. We confirm that this is the case for the query languages considered in this article too.

The plan of the article is as follows. In Section 2, we introduce the syntax and semantics of our ontology and query languages and define the basic notions that are required in the sequel. In Section 3, we show that OMQs with arbitrary LTL ontologies and queries are FO(RPR)-rewritable (and so also rewritable to monadic second-order logic MSO(<)) and in

for data complexity. We also establish
-hardness results. The next five sections are devoted to the proofs of Theorem A, Theorem B, Theorem C formulated above. In Section 4, we use partially ordered automata [42] to prove Theorem A. In Sections 5 and 6, we use unary automata [43] to prove Theorem B. In Sections 7 and 8, we use canonical models to prove Theorem C for OMPIQs. We lift our results for LTL-queries to MFO(<)-queries in Section 9. This completes the proof of Theorem C. We also show an analogue of Kamp's Theorem for monotone formulas. Finally, in Section 10, we briefly discuss the epistemic semantics for temporal queries. We conclude with a summary of the obtained results and a discussion of future work.

As mentioned above, our approach to ontology-mediated query answering over temporal data is motivated by the success of the ontology-based data management paradigm for atemporal data using description logics or rule-based languages [1], [44], [45], [46]. We first discuss the relationship between our results for ‘propositional’ temporal data and the results obtained over the past 15 years for the rewritability and data complexity of ontology-mediated querying using ‘atemporal’ description logics.

For standard DLs such as ALCHI, one can prove the following dichotomy for the data complexity of answering an OMQ with an atomic query: evaluating such an OMQ is either in

or LogSpace-hard [47]. Thus, research has focused on either the combined or parameterised complexity of OMQs that are in
in data complexity [48], [49], [50] or on classifying further the data complexity of OMQs that are known to be LogSpace-hard [47], [51]. For propositional temporal data, the situation is rather different. Indeed, as
[33], [38], the complexity class of many of our OMQs does not play any role in standard atemporal ontology-mediated query answering.

We remind the reader that, in DL-Lite and standard extensions such as ALCHI, there is no need to distinguish between different target languages for FO-rewritings. In fact, it is known that an OMQ with an ALCHI ontology and a union of conjunctive queries (UCQ) is FO-rewritable iff it is UCQ-rewritable [47], [52]. In contrast, for the temporal data considered in this article and for LTL ontologies, we show that there is a difference between rewritability into the first-order languages FO(<) and FO(<,).

Finally, we remind the reader that, in DL-Lite and other DLs, negation in queries results in non-tractable (often undecidable) query evaluation [53], [54]. This is in contrast to the temporal case, where even OMQs with arbitrary FO(<)-queries are in

for data complexity.

Our article is closely related to the large body of work in temporal logic and automata for finite and infinite words, in particular to the Büchi–Elgot–Trakhtenbrot Theorem [55], [56], [57], according to which monadic second-order sentences over finite strict linear orders define exactly the class of regular languages. Our data complexity results rely on the investigation of regular languages in terms of circuit and descriptive complexity [58], [37], [33], [39]. We also use a few more recent results on partially ordered and unary finite automata [43], [42], [59]. To study OMQs with MFO(<)-queries, we employ Kamp's Theorem [27], [28], according to which FO(<)-formulas with one free variable have the same expressive power as LTL formulas over the integers (or any other Dedekind-complete linear order).

As discussed above, combinations of ontology languages with temporal formalisms have been widely investigated since the beginning of the 1990s. We are not aware, however, of any previous work that focuses on the temporal dimension only without assuming the presence of a non-propositional, relational, domain as well. Indeed, the focus of existing work has been on adding a temporal dimension to an existing ontology language rather than on investigating an existing temporal logic from the viewpoint of ontology-mediated querying. It is the latter what we do in this article. We believe that this is worthwhile because (i) the single-dimensional temporal languages are of interest by themselves and (ii) investigating them first allows one to investigate combined languages based on a good understanding of the computational complexity and rewritability properties of their temporal components.

As the work on combining ontology and temporal languages is closely related to our research project, we give a brief overview. Until the early 2010s, the main reasoning tasks investigated for the resulting logics were concept subsumption (is an inclusion between concepts entailed by a temporal ontology?) and knowledge base satisfiability (does a knowledge base consisting of a temporal data instance and a temporal ontology have a model?). Query answering and its complexity were not on the research agenda yet. Discussing this work is beyond the scope of this article, and so in the following we concentrate on briefly summarising recent research on combining ontology languages and temporal formalisms with the aim of ontology-mediated query answering over temporal data. We focus on the discrete-time point-based approach as this is the approach we consider in this article and as it is fundamental for any other temporal data models. One can distinguish between formalisms in which temporal constructs are added to both ontology and query languages (as in this article) and formalisms in which only the query language is temporalised while the ontology language is a standard atemporal language. We call the latter approach query-centric as no temporal connectives are added to the ontology language. The advantage of keeping the ontology language atemporal is that increases in the complexity of query answering compared to the atemporal case can only be caused by the new temporal constructs in the queries. OMQ answering in this framework has been investigated in depth, in particular, for the query language consisting of all LTL-CQs that are obtained from LTL formulas by replacing occurrences of propositional variables by arbitrary conjunctive queries (CQs). Baader et al. [60], [60], [61] analyse the data and combined complexity of answering LTL-CQs with respect to ALC and SHQ ontologies with and without rigid concept and role names (whose interpretation does not change over time). Borgwardt and Thost [62], [62], [63] and Baader et al. [64], [64] investigate the complexity of answering LTL-CQs with respect to weaker ontology languages such as EL and members of the DL-Lite family. In this context, Borgwardt et al. [65], [65], [66] study the rewritability properties of LTL-CQs. Bourgaux et al. [67], [67] investigate the problem of querying inconsistent data, and Koopmann [68], [68] proposes an extension to probabilistic data.

As far as OMQ answering with temporal ontologies is concerned, related work has been done on querying temporal data with respect to temporalised EL ontologies. In this case, since OMQ answering with atemporal EL ontologies is already P-complete, a more expressive target language than FO(<) is required. Gutiérrez-Basulto et al. [69], [69] consider a temporal extension TEL of EL and investigate the complexity and rewritability of atomic queries. It is not known whether query answering in the full language with rigid roles is decidable. However, it is P-complete for data and PSpace-complete for combined complexity in its fragment without rigid roles, and PSpace-complete in data and in ExpTime for combined complexity in the fragment where rigid roles can only occur on the left-hand side of concept inclusions. It is also shown that, for acyclic ontologies, one obtains rewritability into the extension of FO(<) with +, and that query answering is in P for combined complexity. Recent work of Borgwardt et al. [70], [70] investigates temporal ontology-mediated querying over sparse temporal data. A temporal extension of ELH is able to express different types of rigid concepts, with OMQ answering for rooted CQs with guarded negation and metric temporal operators under the minimal-world semantics being P-complete for data and ExpSpace-complete for combined complexity.

Extensions of datalog by constraints over an ordered domain representing time provide an alternative and well investigated approach to querying temporal data [71], [72], [73]. In this approach, (possibly infinite) database relations are represented using constraints, and datalog programs with constraints play the role of both the ontology and the database query. A fundamental difference between datalog with constraints and our formalism is the arity of the relation symbols: our formalism is essentially monadic in the sense that the temporal precedence relation is the only non-unary relation symbol used, whereas datalog alone admits already arbitrary many relation symbols of arbitrary arity. A systematic comparison of the expressive power of the respective datalog and LTL-based formalisms is beyond the scope of this article, but would be of great interest. It would also be of interest to see in how far datalog with constraints can be used as a target language for rewriting ontology-mediated temporal queries.

Our main target languages of query rewriting in this article are FO(<) and its extensions FO(<,) and FO(RPR). An alternative approach that could be of interest when studying the succinctness of rewritings is to consider as target languages LTL and its second-order extensions such as ETL (LTL with regular expressions) [74] and μLTL (LTL with fixpoints) [75], [76].

Section snippets

Ontologies and ontology-mediated queries in linear temporal logic LTL

We begin by defining our temporal ontology and query languages as fragments of the classical linear temporal logic LTL (aka propositional temporal logic PTL or PLTL); see [12], [13], [14] and references therein.

Rewriting
OMIQs into FO(RPR)

It follows from Example 5 that the languages FO(<) and FO(<,) are not sufficiently expressive as target languages for rewritings of arbitrary OMIQs. In the next theorem, we show, however, that all of them can be rewritten into FO(RPR). As follows from [37, Proposition 4.3], this means that we can also rewrite OMIQs into the language MSO(<) of monadic second-order formulas that are built from atoms of the form A(t) and t<t using the Booleans, first-order quantifiers ∀t and ∃t, and second-order

LTLbool OMAQs: partially ordered automata

Our first rewriting technique for OMAQs is based on the NFA construction by Vardi and Wolper [83]. Consider an

ontology O. We define an NFA AO that recognises data instances A such that (O,A) is consistent. The data instances are represented as words of the form XminA,XminA+1,,XmaxA, whereXi={B|B(i)A and B occurs in O}, for item(A). Thus, the alphabet of AO comprises all the subsets of atomic concepts B that occur in O. To define its states, denote by subO the set of subconcepts

OMAQs: unary automata and arithmetic progressions

We use unary NFAs, that is, automata with a single-letter alphabet, to construct rewritings for

OMAQs.

Theorem 14

All

OMAQs are FO(<,)-rewritable.

Proof

Suppose q=(O,A) is an

OMAQ such that A occurs in O. As observed in Section 2.3, without loss of generality, we can assume that O does not contain nested
and
. A simple literal, L, for O is an atomic concept from O or its negation; we set ¬¬L=L. We also use
to abbreviate
if n>0, L if n=0, and

OMAQs: unary automata with stutter-free sequences of types

We now combine the ideas of the two previous sections to obtain an FO(<,)-rewritability result for

OMAQs: we separate reasoning with □-operators (as in Theorem 11) from reasoning with
-operators (as in Theorem 14); see also a similar separation idea in the proof of [21, Theorem 5.1].

Theorem 16

All

OMAQs are FO(<,)-rewritable.

Proof

Let q=(O,A) be an

OMAQ such that A occurs in O, the ontology O has no nested occurrences of temporal operators and contains the axioms

Canonical models for OMPIQs with Horn ontologies

We next use Theorem 11, Theorem 14 to construct FO(<)-rewritings for LTLhorn OMPIQs and FO(<,)-rewritings for

OMPIQs, thereby completing Table 1 for OMPIQs. First, for any
ontology O and any data instance A consistent with O, we define an interpretation CO,A, called the canonical model of O and A, that gives the certain answers to all OMPIQs of the form (O,ϰ).

The canonical model is defined by transfinite recursion [85], [86] (examples illustrating why infinite ordinals are

From OMAQs to OMPIQs with Horn ontologies: phantoms and rewritings

It remains to put together the results on the periodic structure of canonical models CO,A with the FO-rewritings for LTLhorn and

OMAQs constructed in Theorem 11, Theorem 16. As follows from Lemma 22, when constructing rewritings for OMPIQs, for example, of the form (O,FA), we have to consider time instants beyond the active temporal domain tem(A). For this purpose, we require the following definition.

Definition 23

Let L be one of FO(<), FO(<,) or FO(RPR). Given an OMAQ q=(O,A), L-phantoms of q

OMQs with MFO(<)-queries

So far we have considered temporal queries given entirely in the language of LTL and having one implicit ‘answer variable’. It follows that, in this language, one cannot formulate Boolean queries (queries without any answer variables) nor queries with multiple answer variables. For example, in the article submission scenario from the introduction, we might want to ask whether the article is accepted at all rather than when it is accepted, or we might want to retrieve all pairs of time points

OMQs with FO(<)-queries under the epistemic semantics

Instead of generalising LTL-queries in OMQs to MFO(<)-queries using the standard open-world semantics for ontology-mediated query answering, one can increase the expressive power of OMQs by using LTL-queries as building blocks for first-order queries under a closed-world semantics. We sketch an implementation of this idea following the approach of Calvanese et al. [40], [40] and inspired by the SPARQL 1.1 entailment regimes [41]. An epistemic temporal ontology-mediated query (EOMQ, for short)

Conclusions and future work

The main contributions of this article are as follows. Aiming to extend the well-developed theory of ontology-based data access (OBDA) to temporal data, we introduced, motivated and systematically investigated the problem of FO-rewritability for temporal ontology-mediated queries based on linear temporal logic LTL. We classified the OMQs by the shape of their ontology axioms (core, horn, krom or bool) and also by the temporal operators that can occur in the ontology axioms. We then identified

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

This research was supported by the EPSRC U.K. grants EP/S032282/1 and EP/S032207/1 for the joint project ‘quantMD: Ontology-Based Management for Many-Dimensional Quantitative Data’. The authors are grateful to the anonymous referees for their careful reading, valuable comments and constructive suggestions.

References (91)

  • P.C. Kanellakis et al.

    Constraint query languages

    J. Comput. Syst. Sci.

    (1995)
  • D. Toman et al.

    Datalog with integer periodicity constraints

    J. Log. Program.

    (1998)
  • P. Wolper

    Temporal logic can be more expressive

    Inf. Control

    (1983)
  • C.-C. Chen et al.

    The computational complexity of the satisfiability of modal Horn clauses for modal propositional logics

    Theor. Comput. Sci.

    (1994)
  • E. Kharlamov et al.

    Semantically-enhanced rule-based diagnostics for industrial Internet of things: the SDRL language and case study for Siemens trains and turbines

    J. Web Semant.

    (2019)
  • D. Calvanese et al.

    Tractable reasoning and efficient query answering in description logics: the DL-lite family

    J. Autom. Reason.

    (2007)
  • A. Artale et al.

    The DL-Lite family and relations

    J. Artif. Intell. Res.

    (2009)
  • N. Antonioli et al.

    Ontology-based data management for the Italian public debt

  • S. Bail et al.

    Fishmark: a linked data application benchmark

  • M. Giese et al.

    Optique: zooming in on big data

    IEEE Comput.

    (2015)
  • D. Calvanese et al.

    The MASTRO system for ontology-based data access

    Semant. Web

    (2011)
  • M. Rodriguez-Muro et al.

    Ontology-based data access: ontop of databases

  • J.F. Sequeda et al.

    A pay-as-you-go methodology for ontology-based data access

    IEEE Internet Comput.

    (2017)
  • D. Hovland et al.

    Ontology-based data access to Slegge

  • G. Xiao et al.

    Ontology-based data access: a survey

  • D. Gabbay et al.

    Temporal Logic: Mathematical Foundations and Computational Aspects, Vol. 1

    (1994)
  • D. Gabbay et al.

    Many-Dimensional Modal Logics: Theory and Applications

    (2003)
  • S. Demri et al.
    (2016)
  • A. Schmiedel

    Temporal terminological logic

  • K. Schild

    Combining terminological logics with tense logic

  • F. Baader et al.

    Extensions to description logics

  • A. Artale et al.

    Temporal description logics

  • C. Lutz et al.

    Temporal description logics: a survey

  • F. Pagliarecci et al.

    Reasoning with temporal ABoxes: combining DL-Litecore with CTL

  • A. Artale et al.

    A cookbook for temporal conceptual data modelling with description logics

    ACM Trans. Comput. Log.

    (2014)
  • V. Gutiérrez-Basulto et al.

    Lightweight description logics and branching time: a troublesome marriage

  • V. Gutiérrez-Basulto et al.

    Lightweight temporal description logics with rigid roles and restricted TBoxes

  • V. Gutiérrez-Basulto et al.

    On metric temporal description logics

  • F. Baader et al.

    Metric temporal description logics with interval-rigid names (extended abstract)

  • Z. Manna et al.

    The Temporal Logic of Reactive and Concurrent Systems - Specification

    (1992)
  • H.W. Kamp

    Tense Logic and the Theory of Linear Order

    (1968)
  • A. Rabinovich

    A proof of Kamp's theorem

    Log. Methods Comput. Sci.

    (2014)
  • A. Prior

    Time and Modality

    (1956)
  • H. Ono et al.

    On the size of refutation Kripke models for some linear modal and tense logics

    Stud. Log.

    (1980)
  • J.P. Burgess

    Basic tense logic

  • Cited by (16)

    View full text