---
title: "A Datalog Rewriting Algorithm for Warded Ontologies"
authors:
  - "Davide Benedetto"
  - "Marco Calautti"
  - "Hebatalla Hammad"
  - "Emanuel Sallinger"
  - "Adriano Vlad-Starrabba"
doi: "10.24963/ijcai.2025/485"
url: "https://ijcai.org/proceedings/2025/485"
pdf: "https://ijcai.org/proceedings/2025/0485.pdf"
venue: "Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence"
year: 2025
pages: "4356-4364"
track: "Main Track"
keywords:
  - "Knowledge Representation and Reasoning: KRR: Knowledge representation languages"
  - "Knowledge Representation and Reasoning: KRR: Applications"
---

# A Datalog Rewriting Algorithm for Warded Ontologies

Davide Benedetto, Marco Calautti, Hebatalla Hammad, Emanuel Sallinger, Adriano Vlad-Starrabba

*Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence*, pages 4356-4364. DOI: [10.24963/ijcai.2025/485](https://doi.org/10.24963/ijcai.2025/485)

## Abstract

Existential rules, a.k.a. tuple-generating dependencies (TGDs), form a well-established formalism for specifying ontologies. In particular, the warded language is a well-behaved fragment of TGD-based ontologies, striking a good balance between expressive power and computational complexity of answering Ontology-Mediated Queries (OMQs). The theoretical foundations of answering OMQs over warded ontologies are by now well-understood, but to the best of our knowledge, very few efforts exist that exploit such a rich theory for building practical query answering algorithms. Our goal is to fill the above gap by designing a novel Datalog rewriting algorithm for OMQs over warded ontologies which is amenable to practical implementations, as well as providing an implementation and an experimental evaluation, with the aim of understanding how key input parameters affect the performance of this approach, and what are its limits when combined with off-the-shelf Datalog-based engines.
