{"id":{"repo_id":"trento","oai_identifier":"oai:iris.unitn.it:11572/465293"},"canonical_url":"https://search.dev.ndltd.org/etd/trento/oai:iris.unitn.it:11572/465293","repository":{"repo_id":"trento","name":"Università degli Studi di Trento","base_url":"https://iris.unitn.it/oai/request"},"display":{"title":"Practical Rewriting Techniques for Warded Ontology-Mediated Queries","abstract":"Existential rules, a.k.a. tuple-generating dependencies (TGDs), form a well-established formalism for specifying ontologies, i.e., logical descriptions of a domain of interest. One of the main tasks in this context is Ontology-Mediated Query (OMQ) Answering. That is, given an Ontology-Mediated Query O = (q, Σ), comprising a TGD-based on&#x2;tology Σ and a query q (usually a conjunctive query), find all the answers to q that can be entailed from the logical theory D ∧ Σ, where D is a given database encoded as a conjunction of facts. It is well-known that even checking if a tuple is an answer to an OMQ O is undecidable, due to the high expressiveness of TGDs. Hence, different classes of TGD-based ontologies have been introduced in the literature with the goal of restoring decidability. Such classes can be categorized in two main groups, depending on the strategy employed to obtain decidability. The first group comprises ontologies Σ for which an explicit and finite materialization of the facts that can be derived using the database and the TGDs in Σ can be constructed; such a materialization is usually achieved by means of the well-known chase procedure. The second group comprises on&#x2;tologies Σ guaranteeing that any OMQ O = (q, Σ) can be rewritten to a query q′ in some other (decidable) query language such that for every database D, the answers of O over D coincide with the answers of q′ over D. From the second such a group, warded ontologies recently emerged as a well-behavedclass of TGD-based ontologies, striking a good balance between expressive power and computational complexity of Ontology-Mediated Query Answering. The theoretical foun&#x2;dations of OMQ Answering over warded ontologies are by now well-understood, where the problem is known to be solvable in polynomial time, in data complexity, i.e., when only the database is considered as part of the input. In particular, it is well-known that OMQ Answering under warded ontologies is Datalog-rewritable, i.e., given an OMQ over a warded ontology, it is possible to construct a query written in Datalog, a well known database query language introduced in the 80’s, such that for every database, the answers to the OMQ over the database coincide with the answers of the Datalog query over the database alone. Unfortunately, very few efforts exist in the literature that ex&#x2;ploit such a rich theory for building practical query answering algorithms under warded ontologies. The main contribution of this thesis is to fill the above gap by designing a novel rewriting algorithm for OMQs over warded ontologies which is more amenable to practical implementations, as well as providing an implementation and an experimental evaluation, with the aim of understanding which key input parameters affect the perfor&#x2;mance of this approach, and what are its limits. Furthermore, the thesis will show how to use the above analysis to draw key insights on the practical applicability of a rewriting&#x2;based approach for query answering under warded ontologies, when using off-the-shelf Datalog-based engines.","abstract_html":"Existential rules, a.k.a. tuple-generating dependencies (TGDs), form a well-established formalism for specifying ontologies, i.e., logical descriptions of a domain of interest. One of the main tasks in this context is Ontology-Mediated Query (OMQ) Answering. That is, given an Ontology-Mediated Query O = (q, Σ), comprising a TGD-based on&amp;#x2;tology Σ and a query q (usually a conjunctive query), find all the answers to q that can be entailed from the logical theory D ∧ Σ, where D is a given database encoded as a conjunction of facts. It is well-known that even checking if a tuple is an answer to an OMQ O is undecidable, due to the high expressiveness of TGDs. Hence, different classes of TGD-based ontologies have been introduced in the literature with the goal of restoring decidability. Such classes can be categorized in two main groups, depending on the strategy employed to obtain decidability. The first group comprises ontologies Σ for which an explicit and finite materialization of the facts that can be derived using the database and the TGDs in Σ can be constructed; such a materialization is usually achieved by means of the well-known chase procedure. The second group comprises on&amp;#x2;tologies Σ guaranteeing that any OMQ O = (q, Σ) can be rewritten to a query q′ in some other (decidable) query language such that for every database D, the answers of O over D coincide with the answers of q′ over D. From the second such a group, warded ontologies recently emerged as a well-behavedclass of TGD-based ontologies, striking a good balance between expressive power and computational complexity of Ontology-Mediated Query Answering. The theoretical foun&amp;#x2;dations of OMQ Answering over warded ontologies are by now well-understood, where the problem is known to be solvable in polynomial time, in data complexity, i.e., when only the database is considered as part of the input. In particular, it is well-known that OMQ Answering under warded ontologies is Datalog-rewritable, i.e., given an OMQ over a warded ontology, it is possible to construct a query written in Datalog, a well known database query language introduced in the 80’s, such that for every database, the answers to the OMQ over the database coincide with the answers of the Datalog query over the database alone. Unfortunately, very few efforts exist in the literature that ex&amp;#x2;ploit such a rich theory for building practical query answering algorithms under warded ontologies. The main contribution of this thesis is to fill the above gap by designing a novel rewriting algorithm for OMQs over warded ontologies which is more amenable to practical implementations, as well as providing an implementation and an experimental evaluation, with the aim of understanding which key input parameters affect the perfor&amp;#x2;mance of this approach, and what are its limits. Furthermore, the thesis will show how to use the above analysis to draw key insights on the practical applicability of a rewriting&amp;#x2;based approach for query answering under warded ontologies, when using off-the-shelf Datalog-based engines.","abstract_has_math":false,"creators":["Hammad, Hebatalla Mohamed Wagih Abdelgawad Mohamed"],"institution":"Università degli studi di Trento","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":["Calautti, Marco"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-10-29","date_published":"2025-10-29","updated_at":"2026-07-24T05:04:28Z","subjects":[],"languages":["eng"],"rights":["info:eu-repo/semantics/openAccess","license:Tutti i diritti riservati (All rights reserved)","license uri:iris.PRI01"],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier","label":"Identifier","values":["http://dx.doi.org/10.15168/11572_465293","10.15168/11572_465293"],"render_values":[{"text":"http://dx.doi.org/10.15168/11572_465293","href":"http://dx.doi.org/10.15168/11572_465293","code":true},{"text":"10.15168/11572_465293","href":"https://doi.org/10.15168/11572_465293","code":true}]}]},"links":{"outbound_url":"https://hdl.handle.net/11572/465293","outbound_label":"Handle","outbound_source":"dc:identifier"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Hammad, Hebatalla Mohamed Wagih Abdelgawad Mohamed","Calautti, Marco"]},{"key":"dc:creator","label":"Author","values":["Hammad, Hebatalla Mohamed Wagih Abdelgawad Mohamed"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2025-10-29"]},{"key":"dc:publisher","label":"Institution","values":["Università degli studi di Trento","place:TRENTO"]},{"key":"dc:relation","label":"Dc Relation","values":["firstpage:1","lastpage:103","numberofpages:103"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/doctoralThesis"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess","license:Tutti i diritti riservati (All rights reserved)","license uri:iris.PRI01"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://hdl.handle.net/11572/465293","http://dx.doi.org/10.15168/11572_465293","10.15168/11572_465293"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Existential rules, a.k.a. tuple-generating dependencies (TGDs), form a well-established formalism for specifying ontologies, i.e., logical descriptions of a domain of interest. One of the main tasks in this context is Ontology-Mediated Query (OMQ) Answering. That is, given an Ontology-Mediated Query O = (q, Σ), comprising a TGD-based on&#x2;tology Σ and a query q (usually a conjunctive query), find all the answers to q that can be entailed from the logical theory D ∧ Σ, where D is a given database encoded as a conjunction of facts. It is well-known that even checking if a tuple is an answer to an OMQ O is undecidable, due to the high expressiveness of TGDs. Hence, different classes of TGD-based ontologies have been introduced in the literature with the goal of restoring decidability. Such classes can be categorized in two main groups, depending on the strategy employed to obtain decidability. The first group comprises ontologies Σ for which an explicit and finite materialization of the facts that can be derived using the database and the TGDs in Σ can be constructed; such a materialization is usually achieved by means of the well-known chase procedure. The second group comprises on&#x2;tologies Σ guaranteeing that any OMQ O = (q, Σ) can be rewritten to a query q′ in some other (decidable) query language such that for every database D, the answers of O over D coincide with the answers of q′ over D. From the second such a group, warded ontologies recently emerged as a well-behavedclass of TGD-based ontologies, striking a good balance between expressive power and computational complexity of Ontology-Mediated Query Answering. The theoretical foun&#x2;dations of OMQ Answering over warded ontologies are by now well-understood, where the problem is known to be solvable in polynomial time, in data complexity, i.e., when only the database is considered as part of the input. In particular, it is well-known that OMQ Answering under warded ontologies is Datalog-rewritable, i.e., given an OMQ over a warded ontology, it is possible to construct a query written in Datalog, a well known database query language introduced in the 80’s, such that for every database, the answers to the OMQ over the database coincide with the answers of the Datalog query over the database alone. Unfortunately, very few efforts exist in the literature that ex&#x2;ploit such a rich theory for building practical query answering algorithms under warded ontologies. The main contribution of this thesis is to fill the above gap by designing a novel rewriting algorithm for OMQs over warded ontologies which is more amenable to practical implementations, as well as providing an implementation and an experimental evaluation, with the aim of understanding which key input parameters affect the perfor&#x2;mance of this approach, and what are its limits. Furthermore, the thesis will show how to use the above analysis to draw key insights on the practical applicability of a rewriting&#x2;based approach for query answering under warded ontologies, when using off-the-shelf Datalog-based engines."]},{"key":"dc:title","label":"Title","values":["Practical Rewriting Techniques for Warded Ontology-Mediated Queries"]}]}],"canonical_facts":{"dc:contributor":["Hammad, Hebatalla Mohamed Wagih Abdelgawad Mohamed","Calautti, Marco"],"dc:creator":["Hammad, Hebatalla Mohamed Wagih Abdelgawad Mohamed"],"dc:date":["2025-10-29"],"dc:description":["Existential rules, a.k.a. tuple-generating dependencies (TGDs), form a well-established formalism for specifying ontologies, i.e., logical descriptions of a domain of interest. One of the main tasks in this context is Ontology-Mediated Query (OMQ) Answering. That is, given an Ontology-Mediated Query O = (q, Σ), comprising a TGD-based on&#x2;tology Σ and a query q (usually a conjunctive query), find all the answers to q that can be entailed from the logical theory D ∧ Σ, where D is a given database encoded as a conjunction of facts. It is well-known that even checking if a tuple is an answer to an OMQ O is undecidable, due to the high expressiveness of TGDs. Hence, different classes of TGD-based ontologies have been introduced in the literature with the goal of restoring decidability. Such classes can be categorized in two main groups, depending on the strategy employed to obtain decidability. The first group comprises ontologies Σ for which an explicit and finite materialization of the facts that can be derived using the database and the TGDs in Σ can be constructed; such a materialization is usually achieved by means of the well-known chase procedure. The second group comprises on&#x2;tologies Σ guaranteeing that any OMQ O = (q, Σ) can be rewritten to a query q′ in some other (decidable) query language such that for every database D, the answers of O over D coincide with the answers of q′ over D. From the second such a group, warded ontologies recently emerged as a well-behavedclass of TGD-based ontologies, striking a good balance between expressive power and computational complexity of Ontology-Mediated Query Answering. The theoretical foun&#x2;dations of OMQ Answering over warded ontologies are by now well-understood, where the problem is known to be solvable in polynomial time, in data complexity, i.e., when only the database is considered as part of the input. In particular, it is well-known that OMQ Answering under warded ontologies is Datalog-rewritable, i.e., given an OMQ over a warded ontology, it is possible to construct a query written in Datalog, a well known database query language introduced in the 80’s, such that for every database, the answers to the OMQ over the database coincide with the answers of the Datalog query over the database alone. Unfortunately, very few efforts exist in the literature that ex&#x2;ploit such a rich theory for building practical query answering algorithms under warded ontologies. The main contribution of this thesis is to fill the above gap by designing a novel rewriting algorithm for OMQs over warded ontologies which is more amenable to practical implementations, as well as providing an implementation and an experimental evaluation, with the aim of understanding which key input parameters affect the perfor&#x2;mance of this approach, and what are its limits. Furthermore, the thesis will show how to use the above analysis to draw key insights on the practical applicability of a rewriting&#x2;based approach for query answering under warded ontologies, when using off-the-shelf Datalog-based engines."],"dc:identifier":["https://hdl.handle.net/11572/465293","http://dx.doi.org/10.15168/11572_465293","10.15168/11572_465293"],"dc:language":["eng"],"dc:publisher":["Università degli studi di Trento","place:TRENTO"],"dc:relation":["firstpage:1","lastpage:103","numberofpages:103"],"dc:rights":["info:eu-repo/semantics/openAccess","license:Tutti i diritti riservati (All rights reserved)","license uri:iris.PRI01"],"dc:title":["Practical Rewriting Techniques for Warded Ontology-Mediated Queries"],"dc:type":["info:eu-repo/semantics/doctoralThesis"]},"updated_at":"2026-07-24T05:04:28Z"}