Bidirectionalization for free! (Pearl)

@inproceedings{Voigtlnder2009BidirectionalizationFF,
  title={Bidirectionalization for free! (Pearl)},
  author={Janis Voigtl{\"a}nder},
  booktitle={POPL '09},
  year={2009}
}
A bidirectional transformation consists of a function get that takes a source (document or value) to a view and a function put that takes an updated view and the original source back to an updated source, governed by certain consistency conditions relating the two functions. Both the database and programming language communities have studied techniques that essentially allow a user to specify only one of get and put and have the other inferred automatically. All approaches so far to this… Expand
Formalizing Semantic Bidirectionalization with Dependent Types
TLDR
A formalization of the original bidirectionalization technique in a dependently typed programming language (turned proof assistant) yields a complete correctness proof, with no details left out, demonstrating the viability of such a completely formal approach to bid Directionalization. Expand
Semantic bidirectionalization revisited
TLDR
The idea of semantic bidirectionalization is revisited and the elegant principles behind the current state-of-the-art techniques are revealed, leading to much simpler implementations that scale easily. Expand
Characterizing Compatible View Updates in Syntactic Bidirectionalization
TLDR
The use of narrowing is introduced—an extension of rewriting that replaces matching with unification—to precisely characterize compatible (also called in-place) view updates so that the resulting bidirectional transformations are well defined. Expand
Formalizing semantic bidirectionalization and extensions with dependent types
TLDR
A formalization of semantic bidirectionalization and proof of those properties in the dependently typed programming language Agda is provided and two previously considered variations of the original technique are explored, showing that using very precise types pays off and that the well-behavedness properties are preserved as adjustments are made. Expand
Monadic combinators for "Putback" style bidirectional programming
TLDR
It is argued that controlling such ambiguity is essential for bidirectional transformations and proposed a novel language in which programmers write a (sort of) putback transformation, and get the unique get transformation for free. Expand
"Bidirectionalization for free" for monomorphic transformations
TLDR
With PackM, a type class PackM is provided, which intuitively reads "a concrete datatype γ is abstracted to a type α, and the 'observations' made by a transformation on values of type γ are recorded by a monad µ", to improve the applicability of semantic bidirectionalization. Expand
Bidirectional Transformation on Ordered Graphs
TLDR
This paper shows that (the first-order subset of) λFG can be bidirectionalized by a three-stage procedure, and adopts a classical notion of -edges to represent the unobservable short cuts between nodes, which are fully utilized in bid Directionalization to keep the original shape of the input graphs. Expand
Bidirectionalization for free with runtime recording: or, a light-weight approach to the view-update problem
TLDR
With PackM, a type class PackM is provided, which intuitively reads "a concrete datatype γ is abstracted to a type α, and the 'observations' made by a transformation on values of type γ are recorded by a monad μ", which lifts this polymorphism requirement to improve the applicability of semantic bidirectionalization. Expand
Towards Bidirectional Transformations on Ordered Graphs
TLDR
It is shown that the bulk semantics of structural recursion can be extended to ordered graphs, and that a clear bidirectional semantics of a new graph transformation language can be defined. Expand
Validity Checking of Putback Transformations in Bidirectional Programming
TLDR
This paper proposes the first safe language for supporting putback-based bidirectional programming and shows that validity of putback transformations in this language is decidable and can be automatically checked. Expand
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 24 REFERENCES
Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem
TLDR
A novel approach to the view-update problem for tree-structured data: a domain-specific programming language in which all expressions denote bidirectional transformations on trees that map a concrete tree into a simplified abstract view and a modified abstract view to a correspondingly modified concrete tree. Expand
Quotient lenses
TLDR
This work proposes a general theory of quotient lenses - bidirectional transformations that are well behaved modulo equivalence relations controlled by the programmer and presents a rich set of constructs for programming with CANONIZERS and for quotienting lenses by canonizers. Expand
Derivation of programs which traverse their input data only once
Publisher Summary The process of deriving programs from specifications can sometimes be viewed as a simplification process. However, not all program derivations are simplifications. Some otherExpand
Bidirectionalization transformation based on automatic derivation of view complement functions
TLDR
This paper proposes 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 biddirectional properties. Expand
Relational lenses: a language for updatable views
TLDR
The approach is to define a bi-directional query language, in which every expression can be read bot(from left to right) as a view definition and (from right to left) as an update policy. Expand
Fast and loose reasoning is morally correct
TLDR
It is proved that if two closed terms have the same semantics in the total language, then they have related semantics inthe partial language, and it is shown that the PER gives rise to a bicartesian closed category which can be used to reason about values in the domain of the relation. Expand
Free theorems in the presence of seq
TLDR
This work provides a parametricity theorem for the subset of Haskell corresponding to a Girard-Reynolds-style calculus with fixpoints, algebraic datatypes, and seq, and uses an asymmetric logical relation to lead to "inequational" versions of free theorems enriched by preconditions guaranteeing their validity in the described setting. Expand
Update semantics of relational views
TLDR
The main result of the paper states that, given a complete set U of view updates, U has a translator if and only if U is translatable under constant complement. Expand
Boomerang: resourceful lenses for string data
TLDR
The essential property of resourcefulness is formalized-the correct use of keys to associate chunks in the input and output-by defining a refined semantic space of quasi-oblivious lenses, which several previously studied properties of lenses turn out to have compact characterizations in this space. Expand
The essence of functional programming (Invited talk)
TLDR
This paper explores the use monads to structure functional programs and describes the relation bet ween monads and cent inuationpassing style, and sketches how monads are used in a compiler for Haskell that is written in Haskell. Expand
...
1
2
3
...