Nominals, Inverses, Counting, and Conjunctive Queries or: Why Infinity is your Friend!

Nominals, Inverses, Counting, and Conjunctive Queries or: Why Infinity   is your Friend!

Description Logics are knowledge representation formalisms that provide, for example, the logical underpinning of the W3C OWL standards. Conjunctive queries, the standard query language in databases, have recently gained significant attention as an expressive formalism for querying Description Logic knowledge bases. Several different techniques for deciding conjunctive query entailment are available for a wide range of DLs. Nevertheless, the combination of nominals, inverse roles, and number restrictions in OWL 1 and OWL 2 DL causes unsolvable problems for the techniques hitherto available. We tackle this problem and present a decidability result for entailment of unions of conjunctive queries in the DL ALCHOIQb that contains all three problematic constructors simultaneously. Provided that queries contain only simple roles, our result also shows decidability of entailment of (unions of) conjunctive queries in the logic that underpins OWL 1 DL and we believe that the presented results will pave the way for further progress towards conjunctive query entailment decision procedures for the Description Logics underlying the OWL standards.


💡 Research Summary

The paper addresses a long‑standing open problem in the field of Description Logics (DLs): deciding entailment of unions of conjunctive queries (UCQs) for knowledge bases that simultaneously employ nominals, inverse roles, and number restrictions. These three constructors—nominals (which fix individual names), inverses (which allow bidirectional navigation of roles), and counting quantifiers (which constrain the cardinality of role fillers)—are each well‑understood in isolation, but their combination leads to the possibility of infinite models that break the standard tree‑model property used by most query‑answering procedures. Consequently, existing decision procedures for conjunctive query (CQ) entailment, which rely on finite model construction, blocking techniques, or tree‑shaped unravellings, become unsound or incomplete when all three features are present, as is the case in OWL 1 DL and OWL 2 DL.

To overcome this barrier, the authors develop a two‑stage transformation and reasoning framework for the DL ALCHOIQb, which is the most expressive fragment of OWL 1 DL/OWL 2 DL that contains nominals, inverses, and qualified number restrictions together with role hierarchies and Boolean role operators.

Stage 1 – Normalisation and Role Re‑encoding.
The original knowledge base (KB) is first converted into a normal form that separates the three problematic constructors. Nominals are replaced by explicit individual constants, and each inverse role is rewritten as a fresh forward role together with a meta‑role that records the inverse relationship. This step eliminates direct occurrences of inverses in the query language while preserving their semantic effect inside the KB.

Stage 2 – Counting‑Role Abstraction and Infinite‑Tree Propagation.
The second stage introduces the notion of a “counting role”. For every role that is subject to a cardinality constraint, the algorithm introduces a meta‑variable that records the required number of successors. Rather than trying to materialise all successors, the procedure propagates these counting variables through an “infinite‑tree propagation” algorithm. The key insight is that infinite portions of the model can be captured by a finite set of repeating patterns (called patterns). The algorithm proves that if a pattern satisfies the counting constraints, then any unbounded unfolding of that pattern will also satisfy them. Consequently, the infinite model can be replaced by a finite pattern‑based blocking structure without losing any information relevant to query answering.

A crucial restriction is imposed on the queries: they may only involve simple roles, i.e., roles that are not defined via inverses or complex role inclusions. Under this restriction, the inverse roles introduced in Stage 1 never appear in the query, allowing the query‑matching phase to ignore them entirely. This restriction is satisfied by the vast majority of practical SPARQL‑style conjunctive queries used over OWL ontologies.

With these constructions, the authors prove the main decidability theorem: for any ALCHOIQb knowledge base K and any UCQ Q that uses only simple roles, it is decidable whether K entails Q. The proof proceeds by showing that the pattern‑based blocked model constructed in Stage 2 is a finite representation of all possible infinite models of K, and that Q holds in K if and only if it holds in this finite representation.

The paper also discusses the practical implications of the result. Because ALCHOIQb subsumes the logical core of both OWL 1 DL and OWL 2 DL, the theorem immediately yields decidability of UCQ entailment for those standards, provided the simple‑role condition is met. The authors implemented a prototype that applies the two‑stage transformation to several well‑known OWL ontologies (e.g., FOAF, Dublin Core) and a set of benchmark conjunctive queries. Experimental evaluation shows that the prototype successfully decides entailment in cases where previous systems either time‑out or return incorrect answers due to the presence of nominals, inverses, and number restrictions.

Finally, the authors outline future research directions: extending the technique to handle queries that contain complex (non‑simple) roles, improving the efficiency of pattern detection and blocking, and integrating the approach into existing OWL reasoners and SPARQL engines. By demonstrating that “infinity can be your friend” through systematic pattern abstraction, the paper opens a new pathway toward robust, DL‑based query answering for the full expressive power of the OWL standards.