{'fraction_non_alphanumeric': 0.05356594175685364, 'fraction_numerical': 0.0019118500563312963, 'mean_word_length': 3.936299292214358, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Preliminary results on Ontology-based Open Data Publishing

Despite the current interest in Open Data publishing, a formal and comprehensive methodology supporting an organization in deciding which data to publish and carrying out precise procedures for publishing high-quality data, is still missing. In this paper we argue that the Ontology-based Data Management paradigm can provide a formal basis for a principled approach to publish high quality, semantically annotated Open Data. We describe two main approaches to using an ontology for this endeavor, and then we present some technical results on one of the approaches, called bottom-up, where the specification of the data to be published is given in terms of the sources, and specific techniques allow deriving suitable annotations for interpreting the published data under the light of the ontology.


Introduction
In many aspects of our society there is growing awareness and consent on the need for data-driven approaches that are resilient, transparent and fully accountable. But to achieve a data-driven society, it is necessary that the data needed for public goods are readily available. Thus, it is no surprising that in recent years, both public and private organizations have been faced with the issue of publishing Open Data, in particular with the goal of providing data consumers with suitable information to capture the semantics of the data they publish. Significant efforts have been devoted to defining guidelines concerning the management and publication of Open Data. Notably, the W3C 1 has formed a working group, whose objective is the release of a first draft on Open Data Standards 2 . The focus of the document are areas such as metadata, data formats, data licenses, data quality, etc., which are treated in very general terms, with no reference to any specifical technical methodology. More generally, although there are several works on platforms and architectures for publishing Open Data, there is still no formal and comprehensive methodology supporting an organization in (i) deciding which data to publish, and (ii) carrying out precise procedures for publishing and documenting high-quality data. One of the reasons of this lack of formal methods is that the problem of Open Data Publishing is strictly related to the problem of managing the data within an organization. Indeed, a necessary prerequisite for an organization for publishing relevant and meaningful data is to be able to manage, maintain and document its own information system. The recent paradigm of Ontology-based Data Management (OBDM) [16] (used and experimented in practice in the last years, see, e.g., [3]) is an attempt to provide the principles and the techniques for addressing this challenge. An OBDM system is constituted by an ontology, the data sources forming the information system, and the mapping between the ontology and the sources. The ontology is a formal representation of the domain underlying the information system, and the mapping is a precise specification of the relationship between the data at the sources and the concepts in the ontology.
In this paper we argue that the OBDM paradigm can provide a formal basis for a principled approach to publish high-quality, semantically annotated Open Data. The most basic task in Open Data is the extraction of the correct content for the dataset(s) to be published, where by "content" we mean both the extensional information (i.e., facts about the domain of interest) conveyed by the dataset, and the intensional knowledge relevant to document such facts (e.g., concepts that intensionally describe facts), and "correct" means that the aspect of the domain captured by the dataset is coherent with a requirement formally expressed in the organization.
Current practices for publishing Open Data focus essentially on providing extensional information (often in very simple forms, such as CSV files), and they carry out the task of documenting data mostly by using metadata expressed in natural languages, or in terms of record structures. As a consequence, the semantics of datasets is not formally expressed in a machine-readable form. Conversely, OBDM opens up the possibility of a new way of publishing data, with the idea of annotating data items with the ontology elements that describe them in terms of the concepts in the domain of the organization. When an OBDM is available in an organization, an obvious way to proceed to Open Data publication is as follows: (i) express the dataset to be published in terms of a SPARQL query over the ontology, (ii) compute the certain answers to the query, and (iii) publish the result of the certain answer computation, using the query expression and the ontology as a basis for annotating the dataset with suitable metadata expressing its semantics. We call such method top-down. Using this method, the ontology is the heart of the task: it is used for expressing the content of the dataset to be published (in terms of a query), and it is used, together with the query, for annotating the published data.
Unfortunately, in many organizations (for example, in Public Administrations) it may be the case that people are not ready yet to manage their information systems through the OBDM paradigm. In these cases, the bottom-up approach could be more appropriate. For example, in the Italian Public Administration system, it is very unlikely that local administration people are able to express their queries over the ontology using SPARQL. Typically, the ontology and the mapping have been designed by third parties, with no or little involvement with IT people responsible of the local administration information system. In other words, these people probably cannot follow the top-down approach, and they are more confident to express the specification of the dataset to be published directly in terms of the source structures (i.e., the relational tables in their databases), or, more generally, in terms of a view over the sources. But how can we au-tomatically publish both the content and the semantics of the dataset if its specification is given in terms of the data sources? We argue that we can achieve this goal by following what we call the bottom-up approach: the organization expresses its publishing requirement as a query over the sources, and, by using the ontology and the mapping, a suitable algorithm computes the corresponding query over the ontology. With such query at hand, we have reduced the problem in such a way that the top-down approach can now be followed, and the required data can be published according to the method described above. So, at the heart of the bottom-up approach there is a conceptual issue to address: "Given a query Q over the sources, which is the query over the ontology that characterizes Q at best (independently from the current source database)?" Note that the answer to this question is relevant also for other tasks related to the management of the information system, e.g., the task of explaining the semantics of the various data sources within the organization. The question implicitly refers to a sort of reverse engineering problem, which is a novel aspect in the investigation of both OBDM and data integration. Indeed, most of (if not all) the literature about managing data sources through an ontology (see, e.g., [5,18]), or more generally, about data integration [15] assume that the user query is expressed over the global schema, and the goal is to find a rewriting (i.e., a query over the source schema) that captures the original query in the best way, independently from the current source database. Here, the problem is reversed, because we start with a source query and we aim at deriving a corresponding query over the ontology, called a source-to-target rewriting.
In this paper we study the above described bottom-up approach, and provide the following contributions.
-We introduce the concept of source-to-target rewriting (see Section 3), the main technical notion underlying the bottom-up approach, and we describe two computation problems related to it, namely the recognition problem, and the finding problem. The former aims at checking whether a query over the ontology is a source-to-target rewriting of a given query over the sources, taking into account the mapping between the sources and the ontology. The latter aims at computing a suitable source-to-target rewriting of a given source query, with respect to the mapping. -We discuss two different semantics for source-to-target rewritings, one based on the logical models of the OBDM specification, and one based on certain answers. The former is somehow the natural choice, given the first-order semantics behind OBDM. The latter is a significant alternative, that may better capture the intuition of a user who is accustomed to think of query semantics in terms of certain answers. -We show that, although the ideal notion is the one of "exact" source-to-target rewriting, it is important to resort to approximations to exact rewriting when exactness cannot be achieved. For this reason, we introduce the notion of sound and complete source-to-target rewritings. -For the case of complete source-to-target rewritings, we present algorithms both for the recognition (Section 4), and for the finding (Section 5) problem, in particular for the setting where the ontology is expressed in DL-Lite A,id , and the queries involved in the specification are conjunctive queries.
We assume familiarity with classical databases [1], Description Logics [4], and the OBDM paradigm. In this section, we (i) review the most basic notions of non-ground instances, and their correlation with conjunctive queries; (ii) briefly discuss the chase of a possible non-ground instance; (iii) discuss the relevant aspects of notation we use in the following regarding the OBDM paradigm. For a possible non-ground instance D, we assume that each value in dom(D), i.e., the set of values occurring in D, comes from the union of two fixed disjoint infinite sets: the set Const of all constants, and the set Null D of all labeled nulls. We also let null (D) := dom(D) ∩ Null D . In particular, each labeled null in a non-ground instance is treated as an unknown value (and hence, an incomplete information), rather than to a non-existent value [20]. Thus, a non-ground instance represents a number of ground instances obtained by assigning constants to each labeled null. More precisely, let D be a non-ground instance, and v be a mapping v : null(D) → Const. Then, v is called a valuation of D, and we indicate, with v(D), the ground instance obtained from D by replacing elsewhere each labeled null x ∈ D with v(x). We also extend this to tuples, that is, given a tuple u = (u 1 , ..., u n ) of both constants and labeled nulls, Given an instance D it is possible to construct in linear time a boolean CQ q D that fully captures it, and vice versa. We also let q D (x) denoting the transformation of q D by removing the existential quantification of the variables x in q D . Moreover, given a non-boolean CQ q (with x as distinguished variables), we associate to it the instance D q by considering the variables in x as if they were existentially quantified. For ease of presentation, we extend CQs to allow also queries of the form {x | ⊥(x)} and {x | ⊤(x)}, with their usual meaning. We also denote with tup(q) the tuple composed by the terms in head of q.
Given a source schema S; a target schema T ; a set M of st-tgds (i.e., assertions of the form ∀x, y(φ(x, y) → ∃zϕ(x, z)), where φ is a CQ over S, and ϕ is a CQ over T); and a set Σ t of egds (i.e., assertions of the form ∀x(φ T (x) → (x 1 = x 2 )), where φ T is a CQ over T, and x 1 , x 2 are among the variables in x), the chase procedure of a possibly non-ground source instance D consists in: (i) the chase of D w.r.t. M, where, for every st-tgd φ(x, y) → ∃zϕ(x, z) in M and for every pair of tuples (a, b) such that D |= φ(a, b), there is the introduction of new facts in the instance J of the target schema T so that ϕ(a, u) holds, where u consists in a fresh tuple of distinct labeled nulls coming from an infinite set ) and for every tuple a such that J |= φ T (a) and a 1 = a 2 , we equate the two terms. Equating a 1 with a 2 means choosing one of the two so that the other is replaced elsewhere in J by the one chosen. In particular, if one is a labeled null and the other is a constant, then the chase choose the constant; if both are labeled nulls, one coming from Null D and the other from Null Σ , it always choose the one coming from Null D ; if both are constants, then the chase fail. Moreover, with ψ we denote the set of equalities applied by the chase of J w.r.t. a set of egds on variables coming from Null D . This can be done by keeping track of the substitution applied by the chase. For example, if the chase equates the variable y ∈ Null D with the variable x ∈ Null D , and then equates the variable z ∈ Null D with the variable w ∈ Null D , and then w with the constant a, given the tuple (x, y, z, w), ψ(x, y, z, w) indicates the tuple (x, x, a, a). Note that, we can compute the certain answers of a boolean union of CQs (UCQ) q with at most one inequality per disjunct by splitting q as a boolean UCQ q 1 = with exactly one inequality per disjunct, and a boolean UCQ q 0 = with no inequality per disjunct. The key idea is that the negation of q 1 = consists in a set of egds, hence, the certain answers of q can be computed by applying the chase procedure over the instance J (i.e., the instance produced by the chase of C w.r.t. M and Σ t ) w.r.t. ¬q 1 = , where, if the chase fail then the answer is true; otherwise, if the instance J ′ produced satisfy one of the conjunctive query in q 0 = , then the answer is true, else the answer is false. We refer to [10] for more details. Given an OBDM specification I = O, M, S , where O is a TBox, and M is a set of st-tgds, and given a non-ground source instance D for S, and a set of egds Σ t , we denote with A D,Σ , where Σ = M ∪ Σ t , the ABox computed as follows: (i) chase the non-ground source instance D w.r.t. Σ; (ii) freeze the instance (or equivalently, the ABox with variables) obtained, i.e., variables in this instance are now considered as constant. Note that, such ABox A D,Σ may also not exists due to the failing of the chase, in this case, we denote A D,Σ with the symbol ⊥.
For an OBDM specification I = O, M, S , and for a source database C for I (i.e., a ground instance over the schema S), we denote by sem C (I) the set of models B for I relative to C such that: (i) B |= O; (ii) (B, C) |= M. Given a query q over O, we denote by cert(q, I, C) the set of certain answers to q in I relative to C. It is defined as: cert (q, I, C) = {q B | B ∈ sem C (I)} if sem C (I) = ∅; otherwise, cert(q, I, C) = AllTup(q, C), where AllTup(q, C) is the set of all possible tuples of constants in C whose arity is the one of the query q. Furthermore, given a DL-Lite A,id [5] TBox O and a DL-Lite A,id ABox A we are able to: (i) check whether O, A is satisfiable by computing the answers of a suitable boolean query Q sat (a UCQ with at most one inequality per disjunct) over the ABox A considered as a relational database. We see Q sat as the union of Q 0 = sat (the UCQ containing every disjunct not comprising inequalities in Q sat ) and Q 1 = sat (the UCQ containing every disjunct comprising inequalities in Q sat ); (ii) compute the certain answers to a UCQ Q g over a satisfiable O, A , denoted with cert (Q g , O, A ), by producing a perfect reformulation (denoted as a function pr (·)) of such query, and then computing the answers of pr (Q g ) over the ABox A considered as a relational database. See [6] for more details.

The notion of source-to-target rewriting
In what follows, we implicitly refer to (i) an OBDM specification I = O, M, S ; (ii) a query Q s over the source schema S; (iii) a query Q g over the ontology O.
As we said in the introduction, there are at least two different ways to formally define a source-to-target rewriting (s-to-t rewriting in the following) for each of the three variants, namely "exact", "complete", and "sound". The first one is captured by the following definition. Definition 1. Q g is a complete (resp., sound, exact) s-to-t rewriting of Q s with respect to I under the model-based semantics, if for each source database C and for each model Intuitively, a complete s-to-t rewriting of Q s w.r.t. I under the model-based semantics is a query over O that, when evaluated over a model B ∈ sem C (I) for a source database C, returns all the answers of the evaluation of Q s over C. In other words, for every source database C, the query Q g over O captures all the semantics that Q s expresses over C. Similar arguments hold for the notions of sound and exact s-to-t rewriting under this semantics. Moreover, from the formal definition of source-to-target rewriting and the usual definition of target-to-source rewriting (simply called rewriting) used in data integration, it is easy to see that Q g is a complete (resp., sound) source-to-target rewriting of Q s w.r.t. I under the model-based semantics, if and only if Q s is a sound (resp., complete) rewriting of Q s w.r.t. I, implying that, Q g is an exact source-to-target rewriting of Q s w.r.t. I under the model-based semantics, if and only if Q s is an exact rewriting of Q g w.r.t. I.
The second possible way to formally define a source-to-target rewriting is as follows.
Definition 2. Q g is a complete (resp., sound, exact) s-to-t rewriting of Q s with respect to I under the certain answers-based semantics, if for each source database C such that sem C (I) = ∅, we have that Q C s ⊆ cert (Q g , I, C) (resp., cert(Q g , I, C) ⊆ Q C s , Q C s = cert (Q g , I, C)). In this new semantics, in order to capture a query Q s over S, we resort to the notion of certain answers. Indeed, a complete s-to-t rewriting of Q s w.r.t. I under the certain answers-based semantics is a query over O such that, when we compute its certain answers for a source database C, we get all the answers of the evaluation of Q s over C. As before, similar arguments hold for the notions of sound and exact s-to-t rewriting under this semantics. Note also the strong correspondence between the exact s-to-t rewriting under the certain answers-based semantics and the notion of perfect rewriting. We remind that a perfect rewriting of Q g w.r.t. I is a query Q s over S that computes cert (Q g , I, C) for every source database C such that sem C (I) = ∅ [8]. Indeed, we have that Q g is an exact s-to-t rewriting of Q s w.r.t. I under the certain answers-based semantics if and only if Q s is a perfect rewriting of Q g w.r.t. I. Note that the above observations imply that the two semantics are indeed different, since it is well-known that the two notions of exact rewriting and perfect rewriting of Q g w.r.t. I are different. The difference between the two semantics is confirmed by the following example.
It is easy to see that Q g is a sound s-to-t rewriting of Q s w.r.t. I under the certain answers-based semantics (more precisely, it is an exact s-to-t rewriting of Q s w.r.t. I under such semantics), while it is not sound under the model-based semantics. In fact, for the source database C with r C 1 = {(a, b)} and r C 2 = {(c)}, and for the model B with G B = {(a, b), (c, d)}, we have B ∈ sem C (I), and Q B g ⊆ Q C s .

⊓ ⊔
Intuitively, for the sound case, the model-based semantics is too strong, in the sense that under such semantics, a model B may contain not only facts depending on how data in the source C are linked to O through M, but additionally arbitrary facts, with the only constraint of satisfying O. One might think that, in order to address this issue, it is sufficient to resort to a sort of minimizations of the models of O. Actually, the above example shows that, even if we restrict the set of models to the set of minimal models (i.e., models B such that (i) B ∈ sem C (I) and (ii) there is no model B ′ ∈ sem C (I) such that B ′ ⊂ B), and adopt a semantics like the model-based one but restricted to the set of minimal models, Q g is still not a sound s-to-t rewriting (this can be seen considering that the target database B defined earlier is a minimal model).
Observe that the above considerations show the difference in the two semantics by referring to sound and exact s-to-t rewritings. It is interesting to ask whether the difference shows up when restricting our attention to complete rewritings. The following proposition deals with this question.

Proposition 1. Q g is a complete s-to-t rewriting of Q s with respect to I under the model-based semantics if and only if it is so under the certain answers-based semantics.
Proof (Sketch). One direction is trivial. Indeed, when Q g is a complete s-to-t rewriting of Q s with respect to I under the model-based semantics, by definition of certain answers, for each source database C such that sem C (I) = ∅ we have that Q C s ⊆ cert (Q g , I, C). For the other direction, suppose that Q g is not a complete s-to-t rewriting of Q s w.r.t. I under the model-based semantics. It follows that, there exists a source database C and a model B ∈ sem C (I) such that Q C s ⊆ Q B g , implying that, Q C s ⊆ cert(Q g , I, C), which, in turn, implies that Q g is not a complete s-to-t rewriting of Q s w.r.t. I under the certain answers-based semantics.
⊓ ⊔ Obviously, the query over the ontology which captures at best a given query q over the source schema is the exact s-to-t rewriting of q. However, the following example shows that even for very simple OBDM specifications, an exact s-to-t rewriting of even trivial queries, may not exist. It is possible to show that the only sound s-to-t rewriting of Q s w.r.t. I under both semantics is the query Q g := {(x) | ⊥(x)}, which is obviously not a complete s-to-t rewriting of Q s w.r.t. I neither under the model-based semantics, nor under the certain answers-based semantics. On the other hand, the most immediate and intuitive complete s-to-t rewriting of Q s w.r.t. I is the query Q ′ g := {(x) | Person(x)}. Furthermore, as we will see in Section 5, this query is an "optimal" complete s-to-t rewriting of Q s w.r.t. I, where the term optimal will be precisely defined.

⊓ ⊔
As we said in the introduction, in the rest of this paper we focus on complete s-to-trewritings. In particular, we will address both the recognition problem (see Section 4), and the finding problem (see Section 5) in a specific setting, characterized as follows: -The ontology O in an OBDM specification I = O, M, S is expressed as a TBox in DL-Lite A,id . -The mapping M in I is a set of GLAV mapping assertions (or, st-tgds), where each assertion expresses a correspondence between a conjunctive query over the source schema and a conjunctive query over the ontology.
-In the recognition problem, both the query over the source schema and the query over the ontology are conjunctive queries. Similarly, in the finding problem, the query over the source schema is a conjunctive query.

The recognition problem for complete s-to-t rewritings
We implicitly refer to the setting described at the end of the previous section. The recognition problem associated to the complete s-to-t rewriting is the following decision problem: Given an OBDM specification I = O, M, S , a query Q s over the source schema S, and a query Q g over the ontology O, check whether Q g is a complete s-to-t rewriting of Q s with respect to I. The next lemma is the starting point of our solution.
. It follows that, there exist a source database v(D Qs ), a model B ∈ sem v(DQ s ) (I), and a tuple v(tup(Q s )) such that v(tup(Q s )) ∈ Q B g and v(tup(Q s )) ∈ Q v(DQ s ) s . "=⇒" Suppose that Q g is not a complete s-to-t rewriting of Q s w.r.t. I, i.e., there is a source database C, a model B ∈ sem C (I), and a tuple t such that t ∈ Q C s and t ∈ Q B g . The fact that t ∈ Q C s implies the existence of a homomorphism v : D Qs → C such that v(tup(Q s )) = t. Note also, that since C is a ground instance, v is a valuation of D Qs such that v(D Qs ) ⊆ C. Obviously, B ∈ sem v(DQ s ) (I), this can be seen by considering that (i) B |= O is true from the supposition that B ∈ sem C (I); and (ii) (B, v(D Qs )) |= M is true by considering that, (B, C) |= M (which holds from the supposition that B ∈ sem C (I)), v(D Qs ) ⊆ C, and the queries in M are monotone queries. It follows that, there is a valuation v of D Qs and a model B ∈ sem v(DQ s ) (I) such that v(tup(Q s )) ∈ Q B g .

⊓ ⊔
Relying on the above lemma, we are now ready to present the algorithm CheckComplete for the recognition problem.  For the "=⇒" direction, suppose that the algorithm returns false, i.e., A D,Σ |= Q 0 = sat , and ψ(tup(Q s )) ∈ cert (Q g , O, A D,Σ ). Now, if we extend ψ(D) by considering the freezing of this instance (i.e., variables are now considered as constants), it is easy to see that we obtain a valuation v of D such that (v(D), A D,Σ ) |= M, and such that sem v(D) (I) = ∅. Moreover, the fact that ψ(tup(Q s )) ∈ cert (Q g , O, A D,Σ ), implies, by the property of certain answers, that there is at least one model B |= O, A D,Σ , and g . It follows, from Lemma 1, that Q g is not a complete s-to-t rewriting of Q s w.r.t. I.
For the "⇐=" direction, in the cases that A D,Σ = ⊥ or A D,Σ |= Q 0 = sat , it is easy to see that for every valuation v of D, either the chase of v(D) will fail, or every ABox A such that (v(D), A) |= M and A |= ¬Q 1 = sat will be such that A |= Q 0 = sat , implying that, for every valuation v of D, sem v(D) = ∅. It follows, from Lemma 1, that in this case Q g is a complete s-to-t rewriting of Q s w.r.t. I. While, in the cases that ψ(tup(Q s )) ∈ cert (Q g , O, A D,Σ ), it is easy to see that, for every valuation v of D either sem v(D) = ∅, or if we compute A v(D),Σ , we have that v(tup(Q s )) ∈ cert (Q g , O, A v(D),Σ ). More generally, every A obtained by chasing v(D) w.r.t. M and ¬Q 1 = sat , and then choosing arbitrary constants for the possible remaining variables, is such that v(tup(Q s )) ∈ cert (Q g , O, A ). Hence, for every model B such that B |= O, A , we have that v(tup(Q s )) ∈ Q B g . Also, we observe that the set of models sem v(D) coincides with the set of all models B such that B |= O, A for all the possible ABox A obtained using the above procedure. It follows that, for every possible valuation v of D and for every possible B ∈ sem v(D) (I), we have that v(tup(Q s )) ∈ Q B g , implying, from Lemma 1, that also in this case Q g is a complete s-to-t rewriting of Q s w.r.t. I. ⊓ ⊔ As for complexity issues of the algorithm, we observe: (i) it runs in PTIME in the size of Q s . Indeed, computing D (the instance associated to the query Q s ) can be done in linear time, and chasing an instance in the presence of a weakly acyclic set of tgds (as in our case) is PTIME in the size of D (M and Σ are considered fixed); (ii) it runs in PTIME in the size of O. Indeed, Q sat and the evaluation of the certain answers of Q g can be both computed in PTIME in the size of O; (iii) it runs in EXPTIME in the size of M. This can be seen from the obvious EXPTIME process of transferring data from D to A D,Σ ; (iv) the problem is NP-complete in the size of Q g because computing the certain answers of a UCQ query is NP-complete in the size of the query (query complexity).

Finding optimal complete s-to-t rewritings
In this section we study the problem of finding optimal complete s-to-t rewritings. The first question to ask is which rewriting we chose in the case where several complete rewritings exist. The obvious choice is to define the notion of "optimal" complete s-to-t rewriting: one such rewriting r is optimal if there is no complete s-to-t rewriting that is contained in r. In order to formalize this notion, we introduce the following definitions (where MOD(O) denotes the set of models of O).
Definition 4. Q g is an optimal complete s-to-t rewriting of Q s with respect to I, if Q g is a complete s-to-t rewriting of Q s with respect to I, and there exists no query Q ′ g such that Q ′ g is a complete s-to-t rewriting of Q s with respect to I and Q ′ g ⊂ O Q g .
We are ready to present an algorithm for computing an optimal complete s-to-t rewriting of a query over the source schema. For the termination and the complexity of this algo-

Conclusion
We have introduced the notion of Ontology-based Open Data Publishing, whose idea is to use an OBDM specification as a basis for carrying out the task of publishing highquality open data. In this paper, we have focused on the bottom-up approach to ontology-based open data publishing, we have introduced the notion of source-to-target rewriting, and we have developed algorithms for two problems related to complete source-to-target rewritings, namely the recognition and the finding problem. We plan to continue our work on several directions. In particular, we plan to investigate the notion of sound rewriting under different semantics. Also, we want to study the top-down approach, especially with the goal of devising techniques for deriving which intensional knowledge to associate to datasets in order to document their content in a suitable way.