Answering Path Queries under Linear and Guarded Existential Rules

Jean-François Baget, Meghyn Bienvenu, Marie-Laure Mugnier, Michaël Thomazo
6/22/2026
cs.AI

No confident code implementation found for this paper.

Abstract

Ontology-mediated query answering is concerned with the problem of answering queries over knowledge bases consisting of a database instance and an ontology. While most work in the area focuses on conjunctive queries (CQs), navigational queries have gained increasing attention.

Show full abstract

In this paper, we investigate the complexity of answering two-way (conjunctive) regular path queries ((C)RPQs) over knowledge bases whose ontology is given by a set of guarded existential rules. We first consider the subclass of linear existential rules and show that (C)RPQ answering is NL-complete in data complexity, which matches the data complexity of answering RPQs over plain graph databases (i.e., without an ontology). In combined complexity, both tasks are ExpTime-complete in the general case, but RPQ and CRPQ answering drop to PTime-complete and PSpace-complete respectively if there is a bound on predicate arity. For guarded rules, we provide a non-trivial reduction to the linear case, which allows us to show that the complexity of (C)RPQ answering is the same as for CQs, namely 2ExpTime-complete in combined complexity (ExpTime-complete in the bounded-arity case) and PTime-complete in data complexity.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{baget2026answering,
  title  = {Answering Path Queries under Linear and Guarded Existential Rules},
  author = {Jean-François Baget and Meghyn Bienvenu and Marie-Laure Mugnier and Michaël Thomazo},
  year   = {2026},
  eprint = {2607.22636},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.22636v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.22636.svg)](https://codeofpaper.com/paper/2607.22636)

Discussion