Vol-3194/paper61
Jump to navigation
Jump to search
Paper
Paper | |
---|---|
edit | |
description | |
id | Vol-3194/paper61 |
wikidataid | Q117344931โQ117344931 |
title | Investigating Monotone Abstractions |
pdfUrl | https://ceur-ws.org/Vol-3194/paper61.pdf |
dblpUrl | https://dblp.org/rec/conf/sebd/CimaCLP22 |
volume | Vol-3194โVol-3194 |
session | โ |
Investigating Monotone Abstractions
Investigating Monotone Abstractions Gianluca Cima2 , Marco Console1 , Maurizio Lenzerini1 and Antonella Poggi1 1 Sapienza Universitร di Roma 2 CNRS & University of Bordeaux Abstract In Ontology-based Data Management (OBDM), an abstraction of a source query q is a query over the ontology capturing the semantics of q in terms of the concepts and the relations available in the ontology. Since a perfect characterisation of a source query may not exist, the notions of best sound and complete approximations of an abstraction have been introduced and studied in the typical OBDM context, i.e., in the case where the ontology is expressed in DL-Lite, and source queries are expressed as unions of conjunctive queries (UCQs). Interestingly, if we restrict our attention to abstractions expressed as UCQs, even best approximations of abstractions are not guaranteed to exist. Thus, a natural question to ask is whether such limitations affect even larger classes of queries. In this paper, we answer this fundamental question for an essential class of queries, namely the class of monotone queries. We define a monotone query language based on disjunctive Datalog enriched with an epistemic operator, and show that its expressive power suffices for expressing the best approximations of monotone abstractions of UCQs. Keywords Abstraction, Disjunctive Datalog, Monotone queries, Epistemic queries 1. Introduction In Ontology-based Data Management (OBDM) [1], an ontology, i.e., a formal, logic-based repre- sentation of a domain of interest, is used to provide a high-level conceptual tool for accessing and managing the data sources of an information system. Suitable mappings declaratively specify the relationship between the data at the sources and the elements in the ontology, and this enables the user to carry out many relevant tasks on data through the lens of the ontology [2, 3]. Recent papers [4, 5, 6, 7, 8] address a novel issue in OBDM: starting from a query ๐๐ฎ expressed over the sources, the goal is to find a so-called abstraction of ๐๐ฎ [9], i.e., an ontology-based characterization of ๐๐ฎ expressed in terms of the ontology elements, and whose answers coincide with the answer to the original query, modulo the ontology and the mapping. We encountered the need of abstraction during a joint project with a public statistical research institute. The instituteโs departments must publish subsets of the data they gather in the form of semantically described linked open data. To compute the content of the datasets the departments execute suitable queries over the data sources mapped to a shared ontology. Notably, when the dataset is published, it must be documented through a SPARQL query expressed in terms of the ontology. SEBD 2022: The 30th Italian Symposium on Advanced Database Systems, June 19-22, 2022, Tirrenia (PI), Italy " gianluca.cima@u-bordeaux.fr (G. Cima); console@diag.uniroma1.it (M. Console); lenzerini@diag.uniroma1.it (M. Lenzerini); poggi@diag.uniroma1.it (A. Poggi) ยฉ 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) ๏ฟฝThis task is currently done manually. The notion of abstraction perfectly captures this scenario and provides the formal tool for automating the process: given the query over the sources computing the content of the dataset, the abstraction of such query with respect to the mapping and the ontology is exactly the SPARQL query to be associated to the open dataset. Besides the above use case, abstraction can be the appropriate tool in various scenarios. For additional insights we refer to the references mentioned above. The first investigations on abstraction appear in [4, 5]. Both papers point out that the โperfectโ abstraction of a union of conjunctive queries (UCQ) expressed over the data source not always exists, and present algorithms for computing such abstraction in the case where it both exists, and can be expressed as a UCQ over the ontology. In [4, 6] the notion of (sound and complete) approximations of the perfect abstraction is introduced, exactly to cope with situations in which perfectness cannot be achieved. Moreover, both papers make it clear that, for a given class of queries ๐ถ, one is probably interested in two specific forms of approximations, called ๐ถ- minimally complete and ๐ถ-maximally sound abstractions. Based on these notions, [6] presents a thorough analysis of the verification problem (check whether a given query is a complete or sound abstraction) and the computation problem of UCQ-minimally complete and UCQ- maximally sound abstractions of UCQ source queries in OBDM systems based on DL-Lite. In [7] the computation problem is studied in the context of a specific class of non-monotone queries for expressing abstractions, and it is shown that this class can provide abstractions that are better than the one in the UCQ class. Thus, with the exception of [7], all the results on abstractions have been obtained under the assumptions that abstractions are expressed as UCQs over the ontology, and many of them originate from the observations that best approximations in the UCQ class are not guaranteed to exist. Thus, a natural issue to investigate is whether such limitations affect even larger classes of queries for expressing abstractions. The main goal of this paper is to address the following question: do approximations of perfect abstraction that are best in a fundamental class of queries, namely the class of monotone queries, always exist? Obviously, a related goal is to derive algorithms for computing approximations of abstractions that are best in the class of monotone queries, if they exist. Note that the class of monotone queries includes queries expressible in First-Order Logic and is therefore extremely important. In this paper we answer positively to the above-mentioned fundamental question. More specifically, the contributions of the paper can be summarized as follows. We present a general framework for abstraction in OBDM, based on the definition of queries as functions from the logical models of OBDM systems to sets of tuples. The framework includes a new monotone query language, called Datalogโจ K , based on disjunctive Datalog enriched with inequalities and an epistemic operator (Section 2). We consider a scenario where the OBDM specification ๐ฝ is based on DL-LiteRDFS (i.e., the fragment of RDFS expressible in Description Logic), and show that, in the considered scenario, for any source UCQ ๐๐ฎ , the best (sound or complete) approximations of the ๐ฝ-abstraction of ๐๐ฎ in the class of monotone queries always exists and can be expressed in Datalogโจ K (Section 3). As a consequence, if the perfect abstraction exists and is in the class of monotone queries, then it can be expressed in Datalogโจ K (Section 4). This paper is an extended abstract of [10]. Hence, while we assume basic knowledge about databases [11] and Description Logics (DL) [12], for specific concepts and notations, we refer to the Preliminaries section of [10]. ๏ฟฝ2. Framework In what follows, we implicitly refer to an OBDM specification ๐ฝ = โจ๐ช, ๐ฎ, โณโฉ, and when we denote a query by ๐๐ช (resp., ๐๐ฎ ) we mean that the query is a query for ๐ฝ (resp., a source query), i.e., is over the signature of the ontology ๐ช (resp., the schema ๐ฎ). We follow [6] for the basic definitions related to abstraction. ๐ฝ,๐ท We say that ๐๐ช is a perfect ๐ฝ-abstraction of ๐๐ฎ if ๐๐ช = ๐๐ฎ๐ท , for each ๐ฎ-database ๐ท consistent with ๐ฝ. As the condition for an ontology query to be a perfect abstraction of a source query is a strong one, it might be very well the case that a perfect abstraction of a source query does not exist. It is then reasonable to consider weaker notions, such as sound or complete approximations, of perfectness. ๐ฝ,๐ท ๐ฝ,๐ท We say that ๐๐ช is a complete (resp. sound) ๐ฝ-abstraction of ๐๐ฎ if ๐๐ฎ๐ท โ ๐๐ช (resp. ๐๐ช โ ๐๐ฎ๐ท ), for each ๐ฎ-database ๐ท consistent with ๐ฝ. Obviously, we might be interested in complete or sound abstractions that approximate ๐๐ฎ at best, at least in the context of a specific class of queries. If โ๐ช is a class of queries, we say that a query ๐๐ช โ โ๐ช is an โ๐ช -minimally complete (resp., โ๐ช -maximally sound) ๐ฝ-abstraction of ๐๐ฎ if ๐๐ช is a complete (resp., sound) ๐ฝ-abstraction of ๐๐ฎ and there is no query ๐๐ช โฒ โ โ such that ๐ช ๐๐ชโฒ is a complete (resp., sound) ๐ฝ-abstraction of ๐ and ๐ โฒ โ ๐ (resp., ๐ โ ๐ โฒ ). ๐ฎ ๐ช ๐ฝ ๐ช ๐ช ๐ฝ ๐ช We now introduce a new language, called Datalogโจ K , for expressing queries over OBDM specifications. The language is based on disjunctive Datalog, and is used in this paper for expressing abstractions. The basic component of a Datalogโจ K query is a rule. Assume two disjoint and countably infinite sets of predicates โฐ and ๐ซ, called extensional and intensional, respectively. A Datalogโจ K rule has one of the following forms: โข The typical form of disjunctive Datalog, i.e., ยฏ ) โ ๐ผ1 (๐ฅ ๐พ(๐ฅ ยฏ 1 ) โจ . . . โจ ๐ผ๐ (๐ฅ ยฏ๐) (1) where ๐พ(๐ฅ ยฏ ) is a conjunction of relational atoms on the predicates of ๐ซ with โ๐ฅ as variables, ยฏ ๐ ) is a single relational atom whose predicate is in ๐ซ such that and for ๐ = 1, . . . , ๐, ๐ผ๐ (๐ฅ ยฏ๐ โ ๐ฅ ๐ฅ ยฏ, โข A new form specified as follows ยฏ , ๐งยฏ) โง ๐(๐ฅ K(โ๐งยฏ.๐(๐ฅ ยฏ )) โ ๐1 (๐ฅ ยฏ 1 ) โจ . . . โจ ๐๐ (๐ฅ ยฏ๐) (2) where ๐ is a conjunction of relational atoms over โฐ, ๐(๐ฅ ยฏ ) is a conjunction of inequality atoms involving only variables from ๐ฅ ยฏ and for ๐ = 1, . . . , ๐, ๐๐ = โ๐ฆยฏ๐ .๐พ๐ (๐ฅ ยฏ ๐ , ๐ฆยฏ๐ ), where ๐พ๐ is a conjunction of relational atoms on ๐ซ. When ๐ฅ ยฏ ๐ contains only variables ๐ฅ ยฏ occurring in ๐(๐ฅยฏ , ๐งยฏ), for ๐ = 1, . . . , ๐, we say that the rule is safe. An ๐-ary Datalogโจ โจ K query ๐๐ช over an OBDM specification ๐ฝ is a finite set of DatalogK rules whose extensional predicates coincide with the alphabet of ๐ช, and whose intensional predicates include a special ๐-ary predicate ๐ด๐๐ . We say that ๐๐ช is safe if all of its rules are safe. The semantics of ๐๐ช is provided relative to an OBDM system. Given an OBDM system โจ๐ฝ, ๐ทโฉ, an interpretation for ๐๐ช is a pair ๐ผ = (๐๐๐(โจ๐ฝ, ๐ทโฉ), ๐ ), where ๐ is a first-order interpretation ๏ฟฝ(with domain Const) for the predicates in ๐ซ. As usual, we may also see ๐ as the set of facts {๐(๐ยฏ) | ยฏ๐ โ ๐๐ }. We now define when ๐ผ satisfies a Datalogโจ K rule. โข ๐ผ satisfies a rule of the form (1) if the first-order formula โ๐ฅ ยฏ ) โ ๐ผ1 (๐ฅ ยฏ .๐พ(๐ฅ ยฏ 1 )โจ. . .โจ๐ผ๐ (๐ฅ ยฏ๐) is true in ๐ , โข ๐ผ satisfies a rule of the form (2) if for all tuples ยฏ๐ of constants in Const, the fact that the first-order formula โ๐งยฏ.๐(๐ยฏ, ๐งยฏ) โง ๐(๐ยฏ) is satisfied by every model in mod (โจ๐ฝ, ๐ทโฉ) implies that ๐ satisfies the first-order formula โ๐ฆยฏ๐ .๐พ๐ (๐ยฏ๐ , ๐ฆยฏ๐ ), for some ๐ = 1, . . . , ๐. Observe that, if the rule is unsafe, ยฏ๐๐ may contain constants of Const that do not occur in ยฏ๐. An interpretation ๐ผ for ๐๐ช is called a model of ๐๐ช if all the rules of ๐๐ช are satisfied by ๐ผ. Finally, we define the notion of answers to an ๐-ary Datalogโจ K query ๐๐ช w.r.t. an OBDM system โจ๐ฝ, ๐ทโฉ, ๐ฝ,๐ท denoted by ๐๐ช , as follows: {๐ยฏ โ Dom(๐ฝ, ๐ท, ๐๐ช )๐ | ยฏ๐ โ ๐ด๐๐ ๐ for each model (๐๐๐(โจ๐ฝ, ๐ทโฉ), ๐ ) of ๐๐ช }. Let ๐ฝ = โจ๐ช, ๐ฎ, โณโฉ be an OBDM specification such that ๐ช = โ , ๐ฎ = {๐ 1 /2, ๐ 2 /1, ๐ 3 /1} and โณ = {m1 , m2 , m3 , m4 }, where: m1 : โ๐ฅ1 , ๐ฅ2 .๐ 1 (๐ฅ1 , ๐ฅ2 ) โ E(๐ฅ1 , ๐ฅ2 ) m2 : โ๐ฅ.๐ 1 (๐ฅ, ๐ฅ) โ SN(๐ฅ) m3 : โ๐ฅ.๐ 2 (๐ฅ) โ โ๐ง.E(๐ฅ, ๐ง) m4 : โ๐ฅ.๐ 3 (๐ฅ) โ E(๐ฅ, ๐ฅ) The mapping โณ of ๐ฝ establishes how predicates in the schema ๐ฎ relate to the ontology predicates E (which stands for edge) and SN (which stands for special node). Let us now consider the following safe Datalogโจ K query ๐๐ช over ๐ฝ. ๐๐ช returns all the pairs (๐ฃ1 , ๐ฃ2 ) of special nodes that are known to be distinct and such that there is a path from ๐ฃ1 to ๐ฃ2 passing only for nodes known to be special: K(E(๐ฅ1 , ๐ฅ2 ) โง SN(๐ฅ1 ) โง SN(๐ฅ2 )) โ ๐1 (๐ฅ1 , ๐ฅ2 ) K(SN(๐ฅ1 ) โง SN(๐ฅ2 ) โง ๐ฅ1 ฬธ= ๐ฅ2 ) โ ๐2 (๐ฅ1 , ๐ฅ2 ) ๐1 (๐ฅ1 , ๐ฆ) โง ๐1 (๐ฆ, ๐ฅ2 ) โ ๐1 (๐ฅ1 , ๐ฅ2 ) ๐1 (๐ฅ1 , ๐ฅ2 ) โง ๐2 (๐ฅ1 , ๐ฅ2 ) โ Ans(๐ฅ1 , ๐ฅ2 ) The following proposition shows that Datalogโจ K is a monotone query language. Every Datalogโจ K query over ๐ฝ is in M ๐ฝ , for every OBDM specification ๐ฝ. The semantics should make it clear that K is the knowledge operator in the S5 epistemic logic: the formula K๐ด should be read as โ๐ด is known (i.e., logically implied) by the systemโ [13]. Therefore, when accessing the information modeled by โจ๐ฝ, ๐ทโฉ, a Datalogโจ K query extracts what is known by the system, and this characteristic is crucial for not falling into undecidability resulting from using Datalog rules jointly with Description Logics (see [14, 15]), as stated in the following proposition. Let ฮฃ be an OBDM system. Answering safe Datalogโจ K queries w.r.t. ฮฃ is decidable if and only if answering CQs w.r.t. ฮฃ is decidable . 1 Although our framework is general enough to consider any DL for expressing ontologies and any query language for expressing source queries, in the rest of this paper we will carry out our investigation in the following setting: (๐) ontologies are expressed in DL-LiteRDFS , and (๐๐) source queries are expressed as UCQs. 1 With answering we implicitly refer to the associated recognition problem, i.e., check whether a tuple is in the answer to a query. ๏ฟฝ At this point, one may wonder whether Datalogโจ K is the right language to express monotone abstractions in this setting. While a thorough analysis of the language is outside the scope of the present paper, the following proposition provides a positive answer to this question, at least from the computational point of view. In our setting, (๐) answering safe DatalogโจK queries is in coNP in data complexity, and (๐๐) there exists an OBDM specification ๐ฝ and a CQ ๐๐ฎ such that, given an ๐ฎ-database ๐ท, answering the M-maximally sound ๐ฝ-abstraction of ๐๐ฎ is coNP-hard in data complexity. To ease the presentation, from now on we assume that mappings and source queries do not mention constants. However, all our results can be straightforwardly adapted to the case where constants are allowed. 3. Monotone approximations of abstractions In this section we investigate the problem of the existence of M-minimally complete and M- maximally sound abstractions, in the restricted setting specified at the end of the previous section. In particular, we start by showing that M-minimally complete abstractions of UCQ source queries always exist and can be expressed in Datalogโจ K . Then, because of the lack of space, we will just mention the corresponding result on M-maximally sound abstractions. Given a CQ ๐๐ฎ = {๐ฅ ยฏ , ๐ฆยฏ)}, the subroutine SaturateQ(๐๐ฎ ) computes a UCQฬธ= in the ยฏ | โ๐ฆยฏ.๐(๐ฅ following way: for each possible unifier ๐ on the variables in ๐ฅ ยฏ โช ๐ฆยฏ such that ๐(๐ฅ) โ ๐ฅ ยฏ for each ๐ฅโ๐ฅ ยฏ , SaturateQ(๐๐ฎ ) contains a query obtained from ๐(๐๐ฎ ) by adding the inequality atom ๐ก1 ฬธ= ๐ก2 for each pair of distinct variables ๐ก1 , ๐ก2 occurring in ๐(๐๐ฎ ). For a UCQ ๐๐ฎ , we denote by SaturateQ(๐๐ฎ ) the UCQฬธ= obtained by applying SaturateQ(๐) to each disjunct ๐ of ๐๐ฎ . We write each CQฬธ= ๐ generated by SaturateQ(๐๐ฎ ) as ๐ = {๐ฅ ยฏ | โ๐ฆยฏ.๐(๐ฅยฏ , ๐ฆยฏ) โง ๐(๐ฅ ยฏ , ๐ฆยฏ)}, where ๐(๐ฅ ยฏ , ๐ฆยฏ) and ๐(๐ฅ ยฏ , ๐ฆยฏ) are the conjunctions of the relational atoms over ๐ฎ and of the inequality atoms, respectively, occurring in the body of ๐. Moreover, for an OBDM specification ๐ฝ = โจ๐ช, ๐ฎ, โณโฉ and a CQฬธ= ๐ = {๐ฅ ยฏ | โ๐ฆยฏ.๐(๐ฅ ยฏ , ๐ฆยฏ) โง โจ ยฏ , ๐ฆยฏ)} over ๐ฎ, we denote by ๐๐ the following DatalogK rule of form (2): ๐(๐ฅ ยฏ , ๐ดยฏ )) โ Ans(๐ฅ ๐๐ = K(โ๐งยฏ.โณ(๐) โง ๐(๐ฅ ยฏ ), where (i) โณ(๐) is computed by simply ignoring the inequality atoms and chasing the set of relational atoms occurring in the body of ๐; (ii) ๐ดยฏ โ ๐ฆยฏ is the subset of the existential variables of ๐ occurring in โณ(๐); (iii) ๐งยฏ are the fresh variables introduced when computing โณ(๐); and (iv) ๐(๐ฅยฏ , ๐ดยฏ ) is the conjunction of the inequality atoms obtained from ๐(๐ฅ ยฏ , ๐ฆยฏ) by removing all those atoms of the form ๐ฆ ฬธ= ๐ก and ๐ก ฬธ= ๐ฆ in which ๐ฆ is an existential variable occurring in ๐ฆยฏ but not in ยฏ (i.e., not in โณ(๐)) and ๐ก is any other possible variable. Observe that the epistemic operator ๐ด is exploited to bind the existential variables coming from ๐. This is achieved by pushing the subset ๐ดยฏ of the existential variables ๐ฆยฏ of ๐ occurring in โณ(๐) inside the K operator. We are now ready to present the algorithm M-MinComplete for computing the M-minimally complete ๐ฝ-abstractions. Given an OBDM specification ๐ฝ = โจ๐ช, ๐ฎ, โณโฉ and a UCQ ๐๐ฎ over ๐ฎ such that SaturateQ(๐๐ฎ ) = ๐1 โช . . . โช ๐๐ , M-MinComplete(๐ฝ, ๐๐ฎ ) outputs the Datalogโจ K query ๐๐ช = {๐๐1 , . . . , ๐๐๐ } over ๐ฝ. ๏ฟฝ Consider the OBDM specification ๐ฝ illustrated in Example 2 and the CQ ๐๐ฎ = {(๐ฅ) | โ๐ฆ.๐ 1 (๐ฅ, ๐ฆ)} over ๐ฎ. One can verify that M-MinComplete(๐ฝ, ๐๐ฎ ) returns the following safe Datalogโจ K query ๐๐ช over ๐ฝ asking for all those nodes ๐ฃ such that either ๐ฃ is connected to a node ๐ฃ โฒ known to be different from ๐ฃ or ๐ฃ is a special node with a self-loop: K(E(๐ฅ, ๐ฆ) โง ๐ฅ ฬธ= ๐ฆ) โ Ans(๐ฅ) K(E(๐ฅ, ๐ฅ) โง SN(๐ฅ)) โ Ans(๐ฅ) Note that ๐๐ช is a better complete approximation than the query {(๐ฅ) | โ๐ฆ.E(๐ฅ, ๐ฆ)}, which is the UCQ-minimally complete ๐ฝ-abstraction of ๐๐ฎ [6]. M-MinComplete(๐ฝ, ๐๐ฎ ) terminates and returns the unique (up to ๐ฝ-equivalence) M-minimally complete ๐ฝ-abstraction of ๐๐ฎ . Furthermore, we observe that the result of M-MinComplete(๐ฝ, ๐๐ฎ ) is independent from the assertions occurring in the ontology of the OBDM specification ๐ฝ. Similar results can be obtained for OBDM specifications based on more expressive Horn DL ontologies. Before concluding this section, we observe that M-MinComplete(๐ฝ, ๐๐ฎ ) may return unsafe Datalogโจ K queries. Nevertheless, these queries enjoy nice computational properties in our setting. Let ๐๐ช be a Datalogโจ K query with only rules of the form K(โ๐ง ยฏ , ๐งยฏ) โง ๐(๐ฅ ยฏ.๐(๐ฅ ยฏ )) โ Ans(๐ฅ ยฏ ๐ ). In our setting, (i) answering ๐๐ช is in PTime in data complexity, and (ii) if ๐๐ช is safe, then it is ๐ฝ,๐ท possible to compute a UCQฬธ= ๐๐ over ๐ฎ such that ๐๐ช = ๐๐๐ท , for each ๐ฎ-database ๐ท. As for best sound approximations of abstractions, it can be shown (cf. details in [10]) that, similarly to the case of best complete abstractions, an algorithm exists that, given a UCQ ๐๐ฎ , terminates and computes the unique (up to ๐ฝ-equivalence) M-maximally sound ๐ฝ-abstraction of ๐๐ฎ , expressed as a Datalogโจ K query. Thus, we have the following: Given a UCQ ๐๐ฎ , both the unique (up to ๐ฝ-equivalence) M-minimally complete and the M-maximally sound ๐ฝ-abstraction of ๐๐ฎ always exist and can be expressed as Datalogโจ K queries. Consider the OBDM specification ๐ฝ illustrated in Example 2. One can verify that the following set โ of safe Datalogโจ K rules is the unique (up to ๐ฝ-equivalence) M-maximally sound ๐ฝ-abstraction of ๐๐ฎ : K(E(๐ฅ1 , ๐ฅ2 ) โง ๐ฅ1 ฬธ= ๐ฅ2 ) โ ๐ 1 (๐ฅ1 , ๐ฅ2 ) K(E(๐ฅ, ๐ฅ)) โ ๐ 3 (๐ฅ) โจ ๐ 1 (๐ฅ, ๐ฅ) K(โ๐ง.E(๐ฅ, ๐ง)) โ ๐ 2 (๐ฅ) โจ โ๐ฆ.๐ 1 (๐ฅ, ๐ฆ) โจ ๐ 3 (๐ฅ) K(SN(๐ฅ)) โ ๐ 1 (๐ฅ, ๐ฅ) 4. Perfect Abstractions It follows from Theorem 3 that either the perfect abstraction of a source UCQ can be expressed in Datalogโจ K , or it cannot be expressed as a monotone query (if it exists at all). We now present an algorithm that, given an OBDM specification ๐ฝ and a source UCQ ๐๐ฎ , returns the perfect ๐ฝ-abstraction of ๐๐ฎ , if and only if it exists and is in M. To this aim, we make use of Proposition 3, and refer to the ๐๐ defined in that proposition as the rewriting of ๐๐ช w.r.t. ๐ฝ. Our algorithm, that we call M-Perfect, goes as follows. Given an OBDM specification ๐ฝ = โจ๐ช, ๐ฎ, โณโฉ and a UCQ ๐๐ฎ over ๐ฎ as input: if (i) ๐๐ช = M-MinComplete(๐ฝ, ๐๐ฎ ) is safe and ๏ฟฝ(ii) ๐๐ โ๐ฎ ๐๐ฎ ; then return ๐๐ช ; otherwise, report โno perfect ๐ฝ-abstraction of ๐๐ฎ is in Mโ. In Example 3, M-Perfect(๐ฝ, ๐๐ฎ ) returns ๐๐ช , which is the perfect ๐ฝ-abstraction of ๐๐ฎ . We conclude this section by establishing termination and correctness of the M-Perfect algorithm. M-Perfect(๐ฝ, ๐๐ฎ ) terminates and returns the unique (up to ๐ฝ-equivalence) perfect ๐ฝ-abstraction of ๐๐ฎ if and only if such an abstraction can be expressed in M. 5. Conclusion We presented a thorough study of monotone abstractions of UCQs in OBDM systems. We proved that best approximations of such abstractions always exist and introduced a query language, Datalogโจ K , that captures them. Directions for future work are many. In the context of monotone abstractions, we would like to investigate the case of more expressive ontology languages, e.g., DL-Liteโ , as well as more expressive source query languages, e.g., unions of conjunctive queries with inequalities and disjunctive Datalog. Finally, the problem of checking whether given best approximations are expressible in simpler and more user friendly languages remains open. Acknowledgements This work has been partially supported by the ANR AI Chair INTENDED (ANR-19-CHIA-0014), by MIUR under the PRIN 2017 project โHOPEโ (prot. 2017MMJJRE), and by the EU under the H2020-EU.2.1.1 project TAILOR, grant id. 952215. References [1] A. Poggi, D. Lembo, D. Calvanese, G. De Giacomo, M. Lenzerini, R. Rosati, Link- ing data to ontologies, Journal on Data Semantics X (2008) 133โ173. doi:10.1007/ 978-3-540-77688-8\_5. [2] M. Lenzerini, Managing data through the lens of an ontology, AI Magazine 39 (2018) 65โ74. [3] G. De Giacomo, D. Lembo, M. Lenzerini, A. Poggi, R. Rosati, Using ontologies for semantic data integration, in: A Comprehensive Guide Through the Italian Database Research Over the Last 25 Years, 2018, pp. 187โ202. [4] G. Cima, Preliminary results on ontology-based open data publishing, in: Proceedings of the Thirtieth International Workshop on Description Logics (DL 2017), volume 1879 of CEUR Electronic Workshop Proceedings, 2017. [5] C. Lutz, J. Marti, L. Sabellek, Query expressibility and verification in ontology-based data access, in: Proceedings of the Sixteenth International Conference on the Principles of Knowledge Representation and Reasoning (KR 2018), 2018, pp. 389โ398. [6] G. Cima, M. Lenzerini, A. Poggi, Semantic characterization of data services through ontologies, in: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI 2019), 2019, pp. 1647โ1653. ๏ฟฝ [7] G. Cima, M. Lenzerini, A. Poggi, Non-monotonic ontology-based abstractions of data services, in: Proceedings of the Seventeenth International Conference on Principles of Knowledge Representation and Reasoning (KR 2020), 2020, pp. 243โ252. [8] G. Cima, M. Console, M. Lenzerini, A. Poggi, Abstraction in Data Integration, in: Proceed- ings of the Thirty-Sixth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2021), 2021, pp. 1โ11. [9] G. Cima, Abstraction in Ontology-based Data Management, Ph.D. thesis, Sapienza Univer- sity of Rome, 2020. [10] G. Cima, M. Console, M. Lenzerini, A. Poggi, Monotone abstractions in ontology-based data management, in: Proceedings of the Thirty-Sixth AAAI Conference on Artificial Intelligence (AAAI 2022), 2022. [11] S. Abiteboul, R. Hull, V. Vianu, Foundations of Databases, Addison Wesley Publ. Co., 1995. [12] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, P. F. Patel-Schneider (Eds.), The Descrip- tion Logic Handbook: Theory, Implementation and Applications, Cambridge University Press, 2003. [13] H. J. Levesque, G. Lakemeyer, The Logic of Knowledge Bases, The MIT Press, 2001. [14] A. Y. Levy, M.-C. Rousset, Combining Horn rules and description logics in CARIN, Artificial Intelligence 104 (1998) 165โ209. [15] D. Calvanese, R. Rosati, Answering recursive queries under keys and foreign keys is unde- cidable, in: Proceedings of the Tenth International Workshop on Knowledge Representation meets Databases (KRDB 2003), volume 79 of CEUR Electronic Workshop Proceedings, 2003. ๏ฟฝ