Ontology-Based Data Access with Closed Predicates is Inherently Intractable(Sometimes)
Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence. Pages 1024-1029.
© 2013 International Joint Conferences on Artificial Intelligence
Abstract
When answering queries in the presence of ontologies, adopting the closed world assumption for some predicates easily results in intractability. We analyze this situation on the level of individual ontologies formulated in the description logics DL-Lite and EL and show that in all cases where answering CQs with (open and) closed predicates is tractable, it coincides with answering CQs with all predicates assumed open. In this sense, CQ answering with closed predicates in inherently intractable. Our analysis also yields a dichotomy between AC0 and coNP for CQ answering in DL-Lite and a dichotomy between PTime and coNP for EL. Interestingly, the situation is less dramatic in the more expressive description logic ELI, where we find ontologies for which CQ answering is in PTime, but does not coincide with CQ answering where all predicates are open.
- [Abiteboul et al., 1995] Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995.
- [Artale et al., 2009] Alessandro Artale, Diego Calvanese, Roman Kontchakov, and Michael Zakharyaschev. The DL-Lite family and relations. Journal of Artificial Intel- ligence Research, 36:1-69, 2009.
- [Baader et al., 2003] F. Baader, D. Calvanese, D. McGui- ness, D. Nardi, and P. Patel-Schneider. The Description Logic Handbook: Theory, implementation and applica- tions. Cambridge University Press, 2003.
- [Baader et al., 2005] Franz Baader, Sebastian Brandt, and Carsten Lutz. Pushing the EL envelope. In IJCAI, 2005.
- [Calì et al., 2012] Andrea Calì, Georg Gottlob, and Thomas Lukasiewicz. A general datalog-based framework for tractable query answering over ontologies. Journal of Web Semantics, 14:57-83, 2012.
- [Calvanese et al., 2007a] Diego Calvanese, Giuseppe De Gi- acomo, Domenico Lembo, Maurizio Lenzerini, and Ric- cardo Rosati. Tractable reasoning and efficient query an- swering in description logics: The DL-Lite family. Journal of Automated Reasoning, 39(3):385-429, 2007.
- [Calvanese et al., 2007b] Diego Calvanese, Giuseppe De Gi- acomo, Domenico Lembo, Maurizio Lenzerini, and Ric- cardo Rosati. EQL-Lite: Effective first-order query pro- cessing in description logics. In IJCAI, 2007. IJCAI
- [Codescu et al., 2011] Mihai Codescu, Gregor Horsinka, Oliver Kutz, Till Mossakowski, and Rafaela Rau. DO- ROAM: Activity-oriented search and navigation with OpenStreetMap. In GeoSpatial Semantics, 2011.
- [Donini et al., 2002] Francesco M. Donini, Daniele Nardi, and Riccardo Rosati. Description logics of minimal knowledge and negation as failure. ACM Transactions on Computational Logic, 3(2):177-225, 2002.
- [Eiter et al., 2008] Thomas Eiter, Georg Gottlob, Magdalena Ortiz, and Mantas Simkus. Query answering in the de- scription logic Horn-SHIQ. In JELIA, 2008.
- [Franconi et al., 2011] Enrico Franconi, Yazmin Angélica Ibáñez-García, and Inanc ¸Seylan. Query answering with DBoxes is hard. Electronic Notes in Theoretical Computer Science, 278:71-84, 2011.
- [Grimm and Motik, 2005] Stephan Grimm and Boris Motik. Closed world reasoning in the semantic web through epis- temic operators. In OWLED, 2005.
- [Hübner et al., 2004] Sebastian Hübner, Rainer Spittel, Ubbo Visser, and Thomas J. Vögele. Ontology-based search for interactive digital maps. IEEE Intelligent Systems, 19(3):80-86, 2004.
- [Hustadt et al., 2007] Ullrich Hustadt, Boris Motik, and Ul- rike Sattler. Reasoning in description logics by a reduction to disjunctive datalog. Journal of Automated Reasoning, 39(3):351-384, 2007.
- [Lutz and Wolter, 2012] Carsten Lutz and Frank Wolter. Non-uniform data complexity of query answering in de- scription logics. In KR, 2012.
- [Lutz et al., 2009] Carsten Lutz, David Toman, and Frank Wolter. Conjunctive query answering in the description logic EL using a relational database system. In IJCAI, 2009. IJCAI
- [Mehdi et al., 2011] Anees Mehdi, Sebastian Rudolph, and Stephan Grimm. Epistemic querying of OWL knowledge bases. In ESWC, 2011.
- [Motik and Rosati, 2010] Boris Motik and Riccardo Rosati. Reconciling description logics and rules. Journal of the ACM, 57(5):1-62, 2010.
- [Motik et al., 2009] Boris Motik, Ian Horrocks, and Ulrike Sattler. Bridging the gap between OWL and relational databases. Journal of Web Semantics, 7(2):74-89, 2009.
- [Reiter, 1992] Raymond Reiter. What should a database know? Journal of Logic Programming, 14(1&2):127-153, 1992.
- [Schaerf, 1993] Andrea Schaerf. On the complexity of the instance checking problem in concept languages with ex- istential quantification. Journal of Intelligent Information Systems, 2:265-278, 1993.
- [Sengupta et al., 2011] Kunal Sengupta, Adila Alfa Kris- nadhi, and Pascal Hitzler. Local closed world semantics: Grounded circumscription for OWL. In ISWC, 2011.
- [Seylan et al., 2009] Inanc ¸Seylan, Enrico Franconi, and Jos de Bruijn. Effective query rewriting with ontologies over DBoxes. In IJCAI, 2009. IJCAI
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Description logics (DLs) increasingly find application in ontology-based data access (OBDA), where an ontology is used to enrich instance data and a chief problem is to provide efficient query answering services. In this context, it is common to make the open world assumption (OWA). Indeed, there are applications where the data is inherently incomplete and the OWA is semantically adequate, such as when the data is extracted from the web. In other applications, however, it is more reasonable to make a closed world assumption (CWA) for some predicates in the data. In particular, when the data is taken from a relational database, then the CWA can be appropriate for some of the data predicates. As a concrete example, consider a geographical database such as OpenStreetMap which contains pure geographical data as well as rich annotations, stating for example that a certain spatial area is the location of a 'popular Thai restaurant'. As argued in [H¨ubner et al., 2004; Codescu et al., 2011], it is useful to pursue an OBDA approach to take full advantage of the annotations, where one would naturally interpret the geographical data as closed and the annotations as open.
Frank Wolter
Department of Computer Science University of Liverpool, UK
In the DL literature, there are a variety of approaches to imposing a partial CWA, often based on epistemic operators or rules [Calvanese et al., 2007b; Donini et al., 2002; Grimm and Motik, 2005; Motik and Rosati, 2010; Sengupta et al., 2011]. In this paper, we adopt the standard semantics from relational databases, which is both natural and straightforward: CWA predicates have to be interpreted exactly as described in the data, making the standard names assumption for data constants; for example, when A is a closed concept name and A an ABox, then in any model I of A we must have AI = {a | A(a) ∈ A}. Note that this semantics is also used in the recently proposed DBoxes [Seylan et al., 2009]. In fact, the setup considered in this paper generalizes both standard OBDA (only open predicates permitted) and DBoxes (only closed predicates permitted in data) by allowing to freely mix open and closed predicates both in the ontology and in the data.
A major problem in admitting closed predicates in OBDA is that query answering easily becomes intractable regarding data complexity, where the ontology and query are assumed to be fixed and thus of constant size. In fact, answering conjunctive queries (CQs) is CONP-hard already when ontologies are formulated in inexpressive DLs such as DL-Lite and EL [Franconi et al., 2011]. While this is an interesting first step, it was recently demonstrated in [Lutz and Wolter, 2012] in the context of OBDA with more expressive DLs that a 'non-uniform' analysis of data complexity, which considers individual ontologies instead of entire logics, can reveal a much more detailed and subtle picture. In our context, we work with ontologies of the form (T ,Σ), where T is a DL TBox and Σ a set of predicates (concept and role names) declared to be closed. We say that CQ answering w.r.t. (T , Σ) is in PTIME if for every CQ q(⃗x), there exists a polytime algorithm that computes for a given ABox A the certain answers to q in A given (T , Σ); CQ answering w.r.t. (T , Σ) is CONPhard if there is a Boolean CQ q such that, given an ABox A, it is CONP-hard to decide whether q is entailed by A given T . Other complexity classes are defined analogously.
The aim of this paper is to carry out a non-uniform analysis of the data complexity of query answering with closed predicates, when TBoxes are formulated in the DLs DL-LiteR and EL, underpinning the OWL 2 profiles OWL 2 QL and OWL 2 EL, respectively [Calvanese et al., 2007a; Artale et al., 2009; Baader et al., 2005]. Our main results are (i) characterizations that separate the tractable cases from the intractable ones and map out the frontier of tractability in a transparent way; (ii) a proof that, for every tractable case (T ,Σ), CQ answering w.r.t. (T , Σ) coincides with CQ answering w.r.t. the ontology (T , ∅) that treats all predicates as open, for ABoxes that are satisfiable w.r.t. (T ,Σ); (iii) a dichotomy for the data complexity of CQ answering between AC0 and CONP for TBoxes formulated in DL-LiteR, and between PTIME and CONP for EL; and (iv) algorithms for deciding in PTIME whether a given (T , Σ) admits tractable CQ-answering or not.
Point (ii) can be interpreted as showing that OBDA with closed predicates is inherently intractable since, in all tractable cases, the declaration of closed predicates does not have an impact on query answers (it only results in imposing integrity constraints on the ABox). This rather negative result is relativized by the observation made at the end of the paper that inherent intractability does not transfer to more expressive description logics such as ELI, which is essentially the union of DL-Lite and EL: there are TBoxes with closed predicates (T , Σ) with T formulated in ELI such that CQ answering w.r.t. (T ,Σ) is tractable, but does not coincide with CQ answering w.r.t. (T , ∅). Further exploring this encouraging observation is left as future work. We also note that, even in cases where no additional answers to CQs are obtained, there is a certain benefit of closed predicates: we can go beyond CQs and admit full first-order expressive power for the 'closed part' of queries without increasing the data complexity. We propose a concrete query language that implements this idea and show that AC0 data complexity is preserved for DL-LiteR TBoxes and PTIME data complexity is preserved for EL-TBoxes.
Point (iii) is interesting when contrasted with CQ answering w.r.t. TBoxes that are formulated in the expressive DLs ALC and ALCI, without closed predicates. There, the data complexity is also between AC0 and CONP, but the existence of a dichotomy between PTIME and CONP is a deep open question that is equivalent to the Feder-Vardi conjecture for the existence of a dichotomy between PTIME and NP in constraint satisfaction problems [Lutz and Wolter, 2012]. In this sense, the space of ontologies (T ,Σ) studied in this paper is more well-behaved than the space of all ALC-ontologies.
Some proof details are deferred to the appendix of the long version, http://cgi.csc.liv.ac.uk/∼frank/publ/publ.html.
2 Preliminaries
We use standard notation from description logic [Baader et al., 2003]. Let NC and NR be countably infinite sets of concept and role names. A DL-Lite concept is either a concept name from NC or a concept of the form ∃r.⊤ or ∃r-.⊤, where r ∈ NR. We call r- an inverse role and set s- = r if s = r- and r ∈ NR. A role is of the form r or r-, with r ∈ NR. A DL-Lite concept inclusion is an expression of the form B1 ⊑ B2 or B1 ⊑ ¬B2, where B1,B2 are DL-Lite concepts. A role inclusion is an expression of the form r ⊑ s, where r, s are roles. A DL-Litecore TBox is a finite set of DLLite concept inclusions and a DL-LiteR TBox is a finite set of DL-Lite concept inclusions and role inclusions.
EL concepts are constructed according to the rule C, D :=
⊤ | A | C ⊓ D | ∃r.C, where A ∈ NC and r ∈ NR. An EL concept inclusion is an expression of the form C ⊑ D, where C,D are EL concepts. An EL TBox is a finite set of EL concept inclusions. ELI is the extension of EL with existential restrictions ∃r-.C, where r- is an inverse role.
An ABox is a finite set of concept assertions A(a) and role assertions r(a, b) with A ∈ NC, r ∈ NR, and a, b individual names from a countably infinite set NI. We use Ind(A) to denote the set of individual names used in the ABox A and take the freedom to write r-(a, b) ∈ A instead of r(b, a) ∈ A.
An interpretation I is a pair (∆I , ·I ) where ∆I is a nonempty set called the domain of I and ·I maps each concept name A to a subset AI ⊆ ∆I and each role name r to a binary relation rI ⊆ ∆I × ∆I . The function ·I is extended to compound concepts in the usual way. An interpretation I satisfies a concept inclusion C ⊑ D if C I ⊆ DI , a role inclusion r ⊑ s if rI ⊆ sI , a concept assertion A(a) if a ∈ AI and a role assertion r(a, b) if (a, b) ∈ rI . Note that this interpretation of ABox assertions corresponds to making the standard names assumption (SNA), which stipulates that every ABox individual is interpreted as itself; the SNA implies the unique name assumption (UNA). An interpretation is a model of a TBox T if it satisfies all inclusions in T and a model of an ABox A if it satisfies all assertions in A. A concept C (ABox A) is satisfiable w.r.t. a TBox T if there exists a model I of T with C I ̸= ∅ (and of A).
A predicate is a concept or role name. A signature Σ is a finite set of predicates. The signature sig(C) of a concept C, sig(r) of a role r, and sig(T ) of a TBox T , is the set of predicates that occur in C, r, and T , respectively.
For being able to declare predicates as closed, we add an additional component to TBoxes. A pair (T ,Σ) with T a TBox and Σ a signature is a TBox with closed predicates. For any ABox A, a model I of (T ,Σ) and A is an interpretation I with Ind(A) ⊆ ∆I that satisfies T and A and such that the extension of all closed predicates agrees with what is explicitly stated in the ABox, that is,
An ABox A is satisfiable w.r.t. (T ,Σ) if there is a model of (T , Σ) and A.
Example 2.1. In a geographical database, complete information is typically available for predicates that are tied closely to geographical location and do not change frequently, such as the concept name ScandinavianCountry used to identify regions that describe the spatial extension of a scandinavian country and the role name neighbor used to relate regions that describe neighboring countries. These predicates should therefore be treated as closed. For other predicates, especially those that are less intimately linked to geographical location, complete information is often not available. Examples include concept names such as OilExportingCountry or roles such as tradingPartner.
Fix a countably infinite set of variables V. A first-order query (FOQ) q(⃗x) is a first-order formula constructed from atoms A(x), r(x, y), and x = y, where x, y range over V and ⃗x = x1, . . . , xk contains all free variables of q. We call ⃗x the answer variables of q(⃗x) and say that q(⃗x) is Boolean if it has no answer variables. A conjunctive query (CQ) q(⃗x) is a FOQ using conjunction and existential quantification, only. A tuple ⃗a = a1, . . . , ak ⊆ Ind(A) is a certain answer to q(⃗x) in A given (T , Σ), in symbols T ,A |=c(Σ) q(⃗a), if I |= q[a1, . . . , ak] for all models I of (T ,Σ) and A. If Σ = ∅, then we simply omit Σ, speak of certain answers to q(⃗x) in A given T , and write T ,A |= q[⃗a]. A CQ q(x) with one answer variable x is a directed tree CQ if it is tree-shaped with root x when viewed as a directed graph and a tree CQ if the same is true when q is viewed as an undirected graph.
The following example shows that closing predicates can result in more complete query answers.
Example 2.2. The TBox T consists of the inclusion
where ScandComp and ScandCountry are short for ScandinavianCompany and ScandinavianCountry. The ABox A consists of the assertions
ScandComp(cp), ScandCountry(denmark), ScandCountry(norway), ScandCountry(sweden), TimberExporter(denmark), TimberExporter(norway) TimberExporter(sweden).
Note that there is no information in A about the concrete scandinavian country in which the company cp is based. For
q = ∃y based in(x, y) ∧ TimberExporter(y),
cp is not a certain answer to q(x) in A given T . In contrast, when closing ScandCountry by setting Σ = {ScandCountry}, we have T , A |=c(Σ) q[cp].
As illustrated by Example 2.2, we are interested in reasoning with a mix of closed predicates and open predicates. Note that TBox statements which only involve closed predicates act as integrity constraints in the standard database sense [Abiteboul et al., 1995]. As an example, consider T = {A ⊑ B} and Σ = {A,B}. Then (T ,Σ) imposes the integrity constraint that if A(a) is contained in an ABox, then so must be B(a). In particular, an ABox A is satisfiable w.r.t. (T ,Σ) iff A satisfies this integrity constraint. For ABoxes A that are satisfiable w.r.t. T , (T ,Σ) has no further effect on query answers. In a DL context, integrity constraints are discussed in [Calvanese et al., 2007b; Donini et al., 2002; Mehdi et al., 2011; Motik et al., 2009; Motik and Rosati, 2010]. We now fix the relevant notions of complexity, inspired by [Lutz and Wolter, 2012]. When speaking of complexity, we always mean data complexity.
Definition 2.3. For (T , Σ) a TBox with closed predicates,
- CQ answering w.r.t. (T ,Σ) is in PTIME if for every CQ q(⃗x) there is a polytime algorithm that computes, for a given ABox A, all ⃗a ⊆ Ind(A) with T , A |=c(Σ) q(⃗a);
- CQ answering w.r.t. (T ,Σ) is CONP-hard if there is a Boolean CQ q such that it is CONP-hard to decide, given an ABox A, whether T , A |=c(Σ) q.
For other classes of queries such as tree-shaped CQs, analogous notions can be defined. It is shown in [Franconi et al., 2011] that there are DL-Litecore TBoxes with closed predicates (T ,Σ) such that CQ answering w.r.t. (T ,Σ) is CONPhard. The proof is easily strengthened to directed tree CQs and adapted to EL. CQ answering w.r.t. both DL-LiteR and EL-TBoxes is known to be in CONP. Without closed predicates (that is, when Σ = ∅), CQ answering is in PTIME for EL TBoxes [Calvanese et al., 2007a; Lutz et al., 2009] and in AC0 for DL-LiteR TBoxes [Calvanese et al., 2007a; Artale et al., 2009].
The following property plays a central role in our complexity analysis as it turns out to identify the borderline between tractability and CONP-hardness of CQ answering. It is also studied intensively in [Lutz and Wolter, 2012], where convexity is called the ABox disjunction property.
Definition 2.4. A TBox with closed predicates (T ,Σ) is convex if for all ABoxes A and tree CQs q1(x), q2(x), T ,A |=c(Σ) q1 ∨ q2[a] implies T ,A |=c(Σ) qi[a] for some i ∈ {1, 2}.
It is well-known that, without closed predicates, every TBox formulated in DL-LiteR or EL is convex [Lutz and Wolter, 2012]. On the other hand, it can be shown that the TBox (T , Σ) from Example 2.2 is not convex.
Example 2.5. Let A′ be the extension of the ABox A from Example 2.2 with the assertions MilkExporter(sweden), MilkExporter(denmark), and OilExporter(norway). Set Σ = {ScandCountry} and take the tree CQs
Then T ,A′ |=c(Σ) q1∨q2[cp], but T ,A′ ̸|=c(Σ) qi[cp] for any i ∈ {1, 2}. The former is a consequence of the fact that, in any model I of (T , Σ) and A′ , at least one of (cp, denmark), (cp, sweden), (cp, norway) must be in based inI . To see that T ,A′ ̸|=c(Σ) q1[cp], note that it is possible to obtain a model of (T ,Σ) and A′ by viewing A′ as an interpretation and adding (cp, norway) to the extension of based in. For T ,A′ ̸|=c(Σ) q2[cp], add (cp, denmark).
We use tree CQs in Definition 2.4 as this allows us to derive stronger lower bounds, which refer to this more restricted class of queries. Note that tree CQs are also known as ELI instance queries and directed tree CQs as EL instance queries, both common in OBDA. All our results remain true when tree CQs are replaced with CQs in Definition 2.4.
3 Results for DL-Lite
We start with an example of a DL-Litecore TBox that is not convex, essentially by recasting Example 2.5, which is based on an EL TBox, in this language.
Example 3.1. Let
- A = {A(a),B(b1),A1(b1),B(b2),A2(b2)}
- qi = ∃y r(x, y) ∧Ai(y) for i ∈ {1, 2}.
Then (T ,Σ) is not convex because T ,A |=c(Σ) q1 ∨ q2[a], whereas T , A ̸|=c(Σ) qi[a] for any i ∈ {1, 2}.
The failure of convexity for the TBox (T ,Σ) in Example 3.1 results in a choice which can be used to prove that CQ answering w.r.t. (T ,Σ) is coNP-hard. Specifically, the proof is by reduction of 2+2-SAT, a variant of propositional satisfiability where each clause contains precisely two positive literals and two negative literals [Schaerf, 1993]. The queries q1 and q2 from the example are used as subqueries of the query constructed in the reduction, where they serve the purpose of distinguishing truth values of propositional variables. The CQ used in the reduction is actually a tree CQ.
It turns out that this proof of CONP-hardness can be adapted to any non-convex DL-LiteR TBox. Conversely, we will show that convex DL-LiteR TBoxes admit CQ answering in AC0 , thus identifying convexity as the borderline between tractability and intractability of CQ answering, and establishing a dichotomy between AC0 and CONP for CQ answering w.r.t. DL-LiteR TBoxes with closed predicates.
Since analyzing DL-LiteR TBoxes turns out to be somewhat more technical than analyzing DL-Litecore TBoxes, we start with the latter as a warmup. The following definition introduces a property of DL-Litecore TBoxes with closed predicates that we will prove to coincide with convexity, but which is much more concrete.
Definition 3.2 (Safe DL-Litecore TBox). A DL-Litecore TBox with closed predicates (T ,Σ) is safe if there are no DL-Lite concepts B1, B2 and role r such that the following conditions are satisfied:
- B1 is satisfiable w.r.t. T ;
- T |= B1 ⊑ ∃r.⊤ and T |= ∃r-.⊤ ⊑ B2;
- B1 ̸= ∃r.⊤;
- sig(B2) ⊆ Σ and sig(r) ∩Σ = ∅.
Note that Definition 3.2 is essentially a slight generalization of Example 3.1. In particular, the pattern in Point 2 of Definition 3.2 can be found in Example 3.1 (where it is crucial that r /∈ Σ and B ∈ Σ). The following theorem summarizes our results for DL-Litecore.
Theorem 3.3 (Results for DL-Litecore). Let (T , Σ) be a DLLitecore TBox with closed predicates. Then
- If (T ,Σ) is not safe, then (T ,Σ) is not convex and answering tree CQs w.r.t. (T , Σ) is CONP-hard.
- If (T ,Σ) is safe, then
- (a) CQ answering w.r.t. (T , Σ) coincides with CQ answering w.r.t. (T , ∅) for all ABoxes that are satisfiable w.r.t. (T , Σ), and (T , Σ) is convex;
- (b) CQ answering w.r.t. (T ,Σ) is in AC0 .
In a sense, Theorem 3.3 shows that CQ answering in DLLitecore with closed predicates is inherently intractable: in all cases where closing predicates results in additional answers to queries (on satisfiable ABoxes), CQ answering is CONPhard. In all tractable cases, the only effect that closing predicates can thus have is to act as integrity constraints on the ABox (but see Section 5 for another virtue of closing predicates). Note that all TBoxes that refer only to closed predicates (thus express only integrity constaints) are safe.
It is also interesting to note that Theorem 3.3 establishes a dichotomy between AC0 and CONP for CQ answering w.r.t. DL-Litecore TBoxes with closed predicates, that is, there is no such TBox whose complexity is truely between AC0 and CONP. As noted in the introduction, this is in stark contrast to results recently established in [Lutz and Wolter, 2012] in the context of more expressive DLs without closed predicates.
To prove Point 1 of Theorem 3.3, one shows that nonsafeness implies non-convexity by constructing an appropriate ABox. CONP-hardness can then be proved by reduction from 2+2-SAT, generalizing the CONP-hardness proof for Example 3.1. The proof of Point 2(a) relies on canonical models for DL-Litecore TBoxes T without closed predicates. Specifically, for every ABox A that is satsfiable w.r.t. T , there is a model I of A and T such that for all CQs q and potential answers ⃗a, we have T ,A |= q[⃗a] iff I |= q[⃗a]. To establish Point 2(a), it suffices to show that, when (T ,Σ) is safe, then I is also a model of (T ,Σ) and A. Consequently and since closing predicates can only result in additional answers, but not in invalidating answers, CQ answering w.r.t. (T ,Σ) coincides with CQ answering w.r.t. (T , ∅) and it remains to recall that DL-Litecore TBoxes without closed predicates are convex. For Point 2(b), it suffices to show that satisfiability of ABoxes w.r.t. (T ,Σ) is in AC0 when (T ,Σ) is safe, which is a consequence of the fact that ABox satisfiability and CQ answering in DL-Litecore without closed predicates are in AC0 . Specifically, we observe that whenever an ABox A is satisfiable w.r.t. T , then A is satisfiable w.r.t. (T ,Σ) iff T ,A |= B(a) implies B(a) ∈ A for all DL-Lite concepts B with sig(B) ⊆ Σ and T , A |= r(a, b) implies r(a, b) ∈ A for all role names r from Σ. Proof details for Theorem 3.3 are skipped as we provide them for the strictly stronger DL-LiteR version of this theorem, which is given below.
We now extend Definition 3.2 to DL-LiteR.
Definition 3.4 (Safe DL-LiteR TBox). A DL-LiteR TBox with closed predicates (T ,Σ) is safe if there are no DL-Lite concepts B1, B2 and role r such that the following conditions are satisfied:
- B1 is satisfiable w.r.t. T ;
- T |= B1 ⊑ ∃r.⊤ and T |= ∃r-.⊤ ⊑ B2;
- B1 ̸= ∃r′ .⊤ for any role r′ such that T |= r′ ⊑ r;
- sig(B2) ⊆ Σ and sig(r′ ) ∩ Σ = ∅ for any role r′ such that T |= B1 ⊑ ∃r′ .⊤ and T |= r′ ⊑ r.
Note that the conditions in Definition 3.4 generalize the corresponding ones in Definition 3.2 and in this sense, the addition of role hierarchies does not introduce unexpected ways to cause non-convexity and CONP-hardness.
Example 3.5. Let T = {A ⊑ ∃r.⊤, r ⊑ s} and Σ = {s}. Then (T ,Σ) is not safe, which is witnessed by the concepts B1 = A, B2 = ∃s-.⊤, and the role r. Indeed, (T ,Σ) is not convex, witnessed for example by the ABox {A(a), s(a, b1),A1(b1), s(a, b2),A2(b2)} and the queries qi = ∃y.r(x, y) ∧ Ai(y) for i ∈ {1, 2}.
Now, Theorem 3.3 generalizes to DL-LiteR.
Theorem 3.6 (Results for DL-LiteR). All statements in Theorem 3.3 are still true if DL-Litecore is replaced with DLLiteR.
The proof strategy for Theorem 3.3 is exactly the one described above for DL-Litecore.
Note that it is easy to check in PTIME whether a given DL-LiteR TBox with closed predicates (T , Σ) is safe (consequently: whether CQ answering w.r.t. (T , Σ) is in AC0 ) since it suffices to consider DL-Lite concepts B1,B2 and roles r from the signature of T (of which there are only polynomially many) and subsumption in DL-Lite can be decided in AC0 [Calvanese et al., 2007a].
4 Results for EL
As illustrated by Example 2.5, the effect that causes nonconvexity and thus CONP-hardness of DL-Lite TBoxes with closed predicates can also be observed in EL. In the simplest form, this is shown by the TBox with closed predicates (T ,Σ) with T = {A ⊑ ∃r.B} and Σ = {B}, which is not convex. However, in EL there is an additional (and more subtle) cause for non-tractability. The simplest illustrating example uses exactly the same TBox T , but swaps the Σmemberships of r and B.
Example 4.1. Let
Then (T ,Σ) is not convex because T ,A |=c(Σ) q1 ∨ q2[a], whereas T , A ̸|=c(Σ) qi[a] for any i ∈ {1, 2}.
We now give a definition of safeness of EL-TBoxes with closed predicates that captures both causes of non-convexity and, as in the DL-Lite case, coincides both with convexity and with tractability of CQ-answering. We call a concept E a top-level conjunct (tlc) of an EL concept C if C is of the form D1 ⊓ · · · ⊓ Dn and E = Di for some i.
Definition 4.2 (Safe EL TBox). An EL TBox with closed predicates (T , Σ) is safe if there exists no EL inclusion C ⊑ ∃r.D such that
- T |= C ⊑ ∃r.D;
- there does not exist a tlc ∃r.C ′ of C with T |= C ′ ⊑D;
- one of the following is true:
- (s1) r ̸∈ Σ and sig(D) ∩Σ ̸= ∅;
- (s2) r ∈ Σ, sig(D) ̸⊆ Σ and there is no Σ-concept E with T |= C ⊑ ∃r.E and T |= E ⊑D.
Conditions 3(s1) and 3(s2) reflect the two causes of nonconvexity in EL with closed predicates. The following example illustrates the requirement in Condition 3(s2) that no "interpolating" Σ-concept E exists.
Example 4.3. Let T = {A ⊑ ∃r.E,E ⊑ B} and first assume that Σ = {r}. Then the inclusion A ⊑ ∃r.B satisfies Condition 3(s2) and thus (T ,Σ) is not safe. Now assume Σ = {r,E}. Then, the inclusion A ⊑ ∃r.B does not violate safeness because E can be used as a 'Σ-interpolant'. Note that the ABox A from Example 4.1, which we used to refute convexity in a very similar situation, is simply unsatisfiable w.r.t. (T ,Σ). Indeed, it can be shown that (T ,Σ) is safe.
The following theorem summarizes our main results for EL.
Theorem 4.4 (Main Results for EL). Let (T ,Σ) be an EL TBox with closed predicates. Then
- If (T ,Σ) is not safe, then (T ,Σ) is not convex and answering directed tree CQs w.r.t. (T , Σ) is CONP-hard.
- If (T ,Σ) is safe, then
- (a) CQ answering w.r.t. (T , Σ) coincides with CQ answering w.r.t. (T , ∅) for all ABoxes that are satisfiable w.r.t. (T , Σ), and (T , Σ) is convex;
- (b) CQ answering w.r.t. (T ,Σ) is in PTIME.
As mentioned before, directed tree CQs are also called EL instance queries in the literature. The mention of directed tree CQs in Point 1 of Theorem 4.4 thus implies that our results hold for CQs and EL instance queries alike.
Point 1 of Theorem 4.4 is proved by showing that nonsafeness implies non-convexity, which involves two separate constructions that address Cases (s1) and (s2) from Definition 4.2. The proof of Point 2(a) of Theorem 4.4 is again via canonical models, which have to be defined in a rather careful way to make the proof go through. Establishing Point 2(b) involves showing that satisfiability of ABoxes w.r.t. safe EL TBoxes with closed predicates can be decided in PTIME.
Whereas it is obvious how to check the safeness of a DLLite TBox with closed predicates, this is not the case for EL TBoxes since Definition 4.2 quantifies over all concepts C, D, and E, of which there are infinitely many. In the following, we show that, nevertheless, safeness of an EL-TBox with closed predicates (T , Σ) can be decided in PTIME. The first step is to convert T into a TBox T ∗ that is normalized in the sense that it satisfies the following properties:
- (t1) T ∗ contains no CI of the form C ⊑ D1 ⊓D2;
- (t2) if C ⊑ ∃r.D ∈ T ∗ , then there is no tlc ∃r.C ′ of C with T ∗ |= C ′ ⊑D.
Specifically, T ∗ can be produced by exhaustively replacing each CI C ⊑ D1 ⊓ D2 with the two CIs C ⊑ D1 and C ⊑ D2, and each CI C ⊓ ∃r.C ′ ⊑ ∃r.D where the TBox entails C ′ ⊑ D with the CI C ′ ⊑ D. It is easy to see that the conversion takes only polynomial time (since subsumption in EL can be decided in PTIME) and that T ∗ is equivalent to T , thus T ∗ is safe iff T is.
It thus suffices to consider EL TBoxes (T ,Σ) where T is normalized. In this case, the following, stronger version of safeness is equivalent to the original version.
Definition 4.5. An EL TBox with closed predicates (T , Σ) is strongly safe if there exists no EL inclusion C ⊑ ∃r.D ∈ T such that one of the following is true:
- (c1) r ̸∈ Σ and there is some concept E such that T |= D ⊑ E and sig(E) ∩ Σ ̸= ∅;
- (c2) r ∈ Σ, sig(D) ̸⊆ Σ, and there is no Σ-concept E with T |= C ⊑ ∃r.E and T |= E ⊑D.
Note that, in Definition 4.5, the concepts C and D are now restricted to subconcepts of T (whereas E can still be any concept). The following is proved in the long version.
Lemma 4.6. If T satisfies Conditions (t1) and (t2), then (T ,Σ) is safe iff it is strongly safe.
It thus remains to deal with the quantification over the concept E in Conditions (c1) and (c2). In the long version, we show that Condition (c1) can be checked in PTIME by carrying out a reachability test in a suitable canonical model of T , and Condition (c2) can be checked in PTIME by executing a polynomial number of subsumption tests (the correctness of the latter relies on EL having a certain interpolation property). In summary, we obtain the following result.
Theorem 4.7. Deciding safeness of EL TBoxes with closed predicates is PTIME-complete.
5 First-Order Queries over Closed Predicates
As observed in [Reiter, 1992; Calvanese et al., 2007b], closing predicates allows to use more expressive query languages without increasing the complexity of query answering. Indeed, mixing open and closed predicates seems particularly useful when large parts of the data stem from a relational database, as in the geographical database application from Section 2. In such a setup, one would typically like to use full FOQs or, in other words, SQL queries. We consider a query language that combines FOQs for closed predicates with CQs for open predicates. For safe TBoxes with closed predicates, such queries can be answered as efficiently as CQs both in the case of DL-Lite and of EL.
As in the relational database setting, we allow only FOQs that are domain-independent and thus correspond to expressions of relational algebra (and SQL queries), see [Abiteboul et al., 1995].
Definition 5.1 (CQ FO(Σ) queries). Let Σ be a signature that declares closed predicates. A conjunctive query with FO(Σ) plugins (abbreviated CQ FO(Σ) ) is of the form ∃x1 · · · ∃xn(ϕ1∧. . .∧ϕm), where n ≥ 0, m ≥ 1, and each ϕi is an atom or a domain-independent FOQ with sig(ϕi) ⊆ Σ.
The next theorem shows that, for safe TBoxes with closed predicates, switching from CQs to CQ FO(Σ) s does not increase data complexity. Thus, in addition to enforcing integrity constraints, such TBoxes have the virtue of admitting more expressive queries without an increase in complexity.
Theorem 5.2.
- For safe DL-LiteR TBoxes with closed predicates (T , Σ), CQ FO(Σ) -answering w.r.t. (T , Σ) is in AC0 .
- For safe EL TBoxes with closed predicates (T ,Σ), CQ FO(Σ) -answering w.r.t. (T ,Σ) is in PTIME.
While the proof of Theorem 5.2 is not intricate, we believe that CQ FO(Σ) can be very useful for applications. Note that the query language EQL-Lite(CQ) from [Calvanese et al., 2007b] can be viewed as a fragment of CQ FO(Σ) in which only closed predicates are admitted.
6 The Case of ELI
We consider TBoxes formulated in ELI, the extension of EL with inverse roles. ELI can be regarded as the logical core of expressive Horn DLs such as Horn-SHIQ [Hustadt et al., 2007; Eiter et al., 2008]. In contrast to the cases of DL-LiteR and EL, CQ answering with closed predicates turns out to not be inherently intractable in ELI: there are ELI TBoxes with closed predicates (T ,Σ) such that CQ answering w.r.t. (T , Σ) is in PTIME, but does not coincide with CQ answering w.r.t. (T , ∅) for all ABoxes that are satisfiable w.r.t. (T ,Σ). We use the ELI-TBox
and the signature Σ = {r,B}. It is not hard to see that CQ answering w.r.t. (T , Σ) does not coincide with CQ answering w.r.t. (T , ∅). In particular, for
one can verify that T ,A ̸|= q(), but T ,A |=c(Σ) q(); moreover, it is straightforward to construct a model which shows that A is satisfiable w.r.t. (T , Σ).
To prove our claim, it thus remains to show that CQ answering w.r.t. (T ,Σ) is in PTIME. Let A be an ABox. The interpretation I is defined as follows:
- (a) start with A viewed as an interpretation;
- (b) add a ∈ Ind(A) to AI if r(a, b) ∈ A implies B(b) ∈ A;
- (c) add a ∈ Ind(A) to AI when a ∈ (∃r.(A⊓B))I , repeat exhaustively.
Clearly, I can be constructed in polynomial time. The following lemma thus shows that CQ-answering w.r.t. (T ,Σ) is in PTIME, and so is satisfiability of ABoxes w.r.t. (T , Σ). Note that I can be viewed as a canonical model of (T , Σ) and A.
Lemma 6.1.
- A is satisfiable w.r.t. (T ,Σ) iff I is a model of (T ,Σ) and A;
- if A is satisfiable w.r.t. (T ,Σ), then for all CQs q and ⃗a ⊆ Ind(A), we have T ,A |=c(Σ) q[⃗a] iff I |= q[⃗a].
We have thus shown that ELI behaves differently from DLLiteR and EL. This raises a number of questions, dicussed in the next section.
7 FutureWork
We have observed that, for simple DLs such as DL-Litecore, DL-LiteR, and EL, CQ answering with closed predicates is inherently intractable, while this is not the case for more expressive DLs such as ELI. It would be interesting to conduct a broader study to fully understand this phenomenon, including additional TBox languages such as other extensions of DL-Lite, versions of Horn-SHIQ, and possibly even members of the Datalog± family of ontology languages [Cal`ı et al., 2012].
Concerning the concrete case of ELI, the observation presented in Section 6 raises the question whether there is a dichotomy between PTIME and CONP for CQ answering w.r.t. ELI-TBoxes with closed predicates, and how the PTIME
cases can be characterized. It also asks for a characterization of those ELI-TBoxes with closed predicates (T , Σ) for which CQ answering w.r.t. (T , Σ) coincides with CQ answering w.r.t. (T , ∅). We leave these questions as interesting future work.
Acknowledgments. Carsten Lutz and ˙Inanc¸ Seylan were supported by the DFG SFB/TR 8 "Spatial Cognition".
@inproceedings{ijcai2013p156,
title = {Ontology-Based Data Access with Closed Predicates is Inherently Intractable(Sometimes)},
author = {Lutz, Carsten and Seylan, Inanç and Wolter, Frank},
booktitle = {Proceedings of the Twenty-Third International Joint Conference on
Artificial Intelligence, {IJCAI-13}},
publisher = {AAAI Press / International Joint Conferences on Artificial Intelligence},
editor = {Francesca Rossi},
pages = {1024--1029},
year = {2013},
month = {8},
url = {https://ijcai.org/proceedings/2013/156},
}
TY - CPAPER TI - Ontology-Based Data Access with Closed Predicates is Inherently Intractable(Sometimes) AU - Lutz, Carsten AU - Seylan, Inanç AU - Wolter, Frank T2 - Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, IJCAI-13 PB - AAAI Press / International Joint Conferences on Artificial Intelligence PY - 2013 SP - 1024 EP - 1029 UR - https://ijcai.org/proceedings/2013/156 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: