Results 1  10
of
27
Combinators for bidirectional tree transformations: A linguistic approach to the view update problem
 In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL
, 2005
"... We propose a novel approach to the view update problem for treestructured data: a domainspecific programming language in which all expressions denote bidirectional transformations on trees. In one direction, these transformations—dubbed lenses—map a “concrete ” tree into a simplified “abstract vie ..."
Abstract

Cited by 134 (15 self)
 Add to MetaCart
We propose a novel approach to the view update problem for treestructured data: a domainspecific programming language in which all expressions denote bidirectional transformations on trees. In one direction, these transformations—dubbed lenses—map a “concrete ” tree into a simplified “abstract view”; in the other, they map a modified abstract view, together with the original concrete tree, to a correspondingly modified concrete tree. Our design emphasizes both robustness and ease of use, guaranteeing strong wellbehavedness and totality properties for welltyped lenses. We identify a natural mathematical space of wellbehaved bidirectional transformations over arbitrary structures, study definedness and continuity in this setting, and state a precise connection with the classical theory of “update translation under a constant complement ” from databases. We then instantiate this semantic framework in the form of a collection of lens combinators that can be assembled to describe transformations on trees. These combinators include familiar constructs from functional programming (composition, mapping, projection, conditionals, recursion) together with some novel primitives for manipulating trees (splitting, pruning, copying, merging, etc.). We illustrate the expressiveness of these combinators by developing a number of bidirectional listprocessing transformations as derived forms. An extended example shows how our combinators can be used to define a lens that translates between a native HTML representation of browser bookmarks and a generic abstract bookmark format.
Relational Lenses: A Language for Updatable Views
 Principles of Database Systems
, 2006
"... We propose a novel approach to the classical view update problem. The view update problem arises from the fact that modifications to a database view may not correspond uniquely to modifications on the underlying database; we need a means of determining an “update policy ” that guides how view update ..."
Abstract

Cited by 65 (12 self)
 Add to MetaCart
(Show Context)
We propose a novel approach to the classical view update problem. The view update problem arises from the fact that modifications to a database view may not correspond uniquely to modifications on the underlying database; we need a means of determining an “update policy ” that guides how view updates are reflected in the database. Our approach is to define a bidirectional query language, in which every expression can be read both (from left to right) as a view definition and (from right to left) as an update policy. The primitives of this language are based on standard relational operators. Its type system, which includes recordlevel predicates and functional dependencies, plays a crucial role in guaranteeing that update policies are wellbehaved, in a precise sense, and that they are total—i.e., able to handle arbitrary changes to the view.
Bidirectionalization Transformation Based on Automatic Derivation of View Complement Functions
, 2007
"... Bidirectional transformation is a pair of transformations: a view function and a backward transformation. A view function maps one data structure called source onto another called view. The corresponding backward transformation reflects changes in the view to the source. Its practically useful appli ..."
Abstract

Cited by 24 (11 self)
 Add to MetaCart
Bidirectional transformation is a pair of transformations: a view function and a backward transformation. A view function maps one data structure called source onto another called view. The corresponding backward transformation reflects changes in the view to the source. Its practically useful applications include replicated data synchronization, presentationoriented editor development, tracing software development, and view updating in the database community. However, developing a bidirectional transformation is hard, because one has to give two mappings that satisfy the bidirectional properties for system consistency. In this paper, we propose a new framework for bidirectionalization that can automatically generate a useful backward transformation from a view function while guaranteeing that the two transformations satisfy the bidirectional properties. Our framework is based on two known approaches to bidirectionalization, namely the
Quotient lenses
, 2008
"... There are now a number of bidirectional programming languages, where every program can be read both as a forward transformation mapping one data structure to another and as a reverse transformation mapping an edited output back to a correspondingly edited input. Besides parsimony—the two related tra ..."
Abstract

Cited by 20 (4 self)
 Add to MetaCart
There are now a number of bidirectional programming languages, where every program can be read both as a forward transformation mapping one data structure to another and as a reverse transformation mapping an edited output back to a correspondingly edited input. Besides parsimony—the two related transformations are described by just one expression—such languages are attractive because they promise strong behavioral laws about how the two transformations fit together—e.g., their composition is the identity function. It has repeatedly been observed, however, that such laws are actually a bit too strong: in practice, we do not want them “on the nose, ” but only up to some equivalence, allowing inessential details, such as whitespace, to be modified after a round trip. Some bidirectional languages loosen their laws in this way, but only for specific, bakedin equivalences. In this work, we propose a general theory of quotient lenses— bidirectional transformations that are well behaved modulo equivalence relations controlled by the programmer. Semantically, quotient lenses are a natural refinement of lenses, which we have studied in previous work. At the level of syntax, we present a rich set of constructs for programming with canonizers and for quotienting lenses by canonizers. We track equivalences explicitly, with the type of every quotient lens specifying the equivalences it respects. We have implemented quotient lenses as a refinement of the bidirectional string processing language Boomerang. We present a number of useful primitive canonizers for strings, and give a simple extension of Boomerang’s regularexpressionbased type system to statically typecheck quotient lenses. The resulting language is an expressive tool for transforming realworld, adhoc data formats. We demonstrate the power of our notation by developing an extended example based on the UniProt genome database format and illustrate the generality of our approach by showing how uses of quotienting in other bidirectional languages can be translated into our notation.
An orderbased theory of updates for closed database views
 Summary in /emphFoundations of Information and Knowledge Systems, Second International Symposium, 2002
, 2004
"... The fundamental problem in the design of update strategies for views of database schemata is that of selecting how the view update is to be reflected back to the base schema. This work presents a solution to this problem, based upon the dual philosophies of closed update strategies and orderbased d ..."
Abstract

Cited by 18 (9 self)
 Add to MetaCart
(Show Context)
The fundamental problem in the design of update strategies for views of database schemata is that of selecting how the view update is to be reflected back to the base schema. This work presents a solution to this problem, based upon the dual philosophies of closed update strategies and orderbased database mappings. A closed update strategy is one in which the entire set of updates exhibit natural closure properties, including transitivity and reversibility. The orderbased paradigm is a natural one; most database formalisms endow the database states with a natural order structure, under which update by insertion is an increasing operation, and update by deletion is decreasing. Upon augmenting the original constantcomplement strategy of Bancilhon and Spyratos – which is an early version of a closed update strategy – with compatible orderbased notions, the reflection to the base schema of any update to the view schema which is an insertion, a deletion, or a modification which is realizable as a sequence of insertions and deletions is shown to be unique and independent of the choice of complement. In addition to this uniqueness characterization, the paper also develops a theory which identifies conditions under which a natural, maximal, update strategy exists for a view. This theory is then applied to a ubiquitous example – singlerelational schemata constrained by equalitygenerating dependencies. Within this framework it is shown that for a view defined as a projection of the main relation, the only possibility is that the complement defining the update process is also a projection, and that the reconstruction is based upon functional dependencies. † A preliminary version of parts of this paper appeared as reference [16]. 1 1.
Unique complements and decompositions of database schemata
 Journal of Computer and System Sciences
, 1994
"... In earlier work, Bancilhon and Spyratos introduced the concept of a complement to a database schema, and showed how this notion could be used in theories of decomposition and update semantics. However, they also showed that, except in trivial cases, even minimal complements are never unique, so that ..."
Abstract

Cited by 16 (8 self)
 Add to MetaCart
(Show Context)
In earlier work, Bancilhon and Spyratos introduced the concept of a complement to a database schema, and showed how this notion could be used in theories of decomposition and update semantics. However, they also showed that, except in trivial cases, even minimal complements are never unique, so that many desirable results, such as canonical decompositions, cannot be realized. Their work dealt with database schemata which are sets and database mappings which are functions, without further structure. In this work, we show that by adding a modest amount of additional structure, many important uniqueness results may be obtained. Specifically, we work with database schemata whose legal states form partially ordered sets (posets) with least elements, and with database mappings which are isotonic and which preserve this least element. This is a natural algebraic structure which is inherent in many important examples, including relational schemata constrained by data dependencies, with views constructed by composition of projection, restriction, and selection. Other examples include deductive database schemata in which views are defined by rules, and general firstorder logic databases.
Characterization of desirable properties of general database decompositions
 Ann. Math. Art. Intell
, 1993
"... This paper appears in a special issue on database theory of the Annals of Mathematics ..."
Abstract

Cited by 11 (6 self)
 Add to MetaCart
(Show Context)
This paper appears in a special issue on database theory of the Annals of Mathematics
The complexity of embedded axiomatization for a class of closed database views
"... It is well known that the complexity of testing the correctness of an arbitrary update to a database view can be far greater than the complexity of testing a corresponding update to the main schema. However, views are generally managed according to some protocol which limits the admissible updates t ..."
Abstract

Cited by 11 (9 self)
 Add to MetaCart
(Show Context)
It is well known that the complexity of testing the correctness of an arbitrary update to a database view can be far greater than the complexity of testing a corresponding update to the main schema. However, views are generally managed according to some protocol which limits the admissible updates to a subset of all possible changes. The question thus arises as to whether there is a more tractable relationship between these two complexities in the presence of such a protocol. In this paper, this question is addressed for closed update strategies, which are based upon the constantcomplement approach of Bancilhon and Spyratos. The approach is to address a more general question — that of characterizing the complexity of axiomatization of views, relative to the complexity of axiomatization of the main schema. For schemata constrained by denial or consistency constraints, that is, statements which rule out certain situations, such as the equalitygenerating dependencies (EGDs) or, more specifically, the functional dependencies (FDs) of the relational model, a broad and comprehensive result is obtained in a very general framework which is not tied to the relational model in any way. It states that every such schema is governed by an equivalent set of constraints which embed into the component views, and which are no more
Bidirectionalizing Graph Transformations
 SUBMITTED TO ICFP
, 2010
"... Bidirectional transformations provide a novel mechanism for synchronizing and maintaining the consistency of information between input and output. Despite many promising results on bidirectional transformations, they are limited to the context of relational or XML (treelike) databases. In this pape ..."
Abstract

Cited by 10 (7 self)
 Add to MetaCart
(Show Context)
Bidirectional transformations provide a novel mechanism for synchronizing and maintaining the consistency of information between input and output. Despite many promising results on bidirectional transformations, they are limited to the context of relational or XML (treelike) databases. In this paper, we challenge the problem of bidirectional transformations in the context of graphs, by proposing a formal definition of a wellbehaved bidirectional semantics for UnCAL, a graph algebra for the known UnQL graph query language. The key to our successful formalization is full utilization of both recursive and bulk semantics of the structural recursion on graphs. We carefully refine the existing forward evaluation of structural recursion so that it can produce sufficient trace information for later backward evaluation. For the backward evaluation, we use the trace information to reflect inplace update and deletion on the view to the source, and adopt the universal resolving algorithm for inverse computation and the narrowing technique to tackle the difficult insertion problem. We prove the wellbehavedness of our bidirectional evaluation. Our current implementation, being available online, confirms usefulness of our approach with nontrivial applications.
Pairwisedefinable subdirect decomposition of general database schemata
 In 3rd Symp.MFDBS'91, Springer LNCS'495
, 1991
"... One of the most important results in the theory of decomposition of universal relational schemata is the equivalence of acyclicity of the hypergraph of the schema to numerous desirable properties regarding simplicity of constraints, correctness of query evaluation algorithms, and complexity of integ ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
One of the most important results in the theory of decomposition of universal relational schemata is the equivalence of acyclicity of the hypergraph of the schema to numerous desirable properties regarding simplicity of constraints, correctness of query evaluation algorithms, and complexity of integrity maintenance. In this paper, we show that the thrust of these results is not specific to the relational model, but rather applies in a much more general context in which schemata are just sets and views are defined by surjective functions. This is accomplished by replacing the notion of hypergraph of a schema (which is specific to the relational model) with the much more general notion of pairwise definability, which is meaningful in the context of any decomposition into a set of views. † Much of the research reported herein was performed while the author was visiting the Mathematics Department of the University of Oslo, Norway. He wishes to thank in particular the members of the Computational Linguistics Group for their kind hospitality during his stay there. A cornerstone of the theory of universal relational database schemata is that of acyclic decompositions.