Reference. Retentive Lenses
Based on Foster et al.‘s lenses, various bidirectional programming languages and systems have been developed for helping the user to write correct data synchronisers. The two well-behavedness laws of lenses, namely Correctness and Hippocraticness, are usually adopted as the guarantee of these systems. While lenses are designed to retain information in the source when the view is modified, well-behavedness says very little about the retaining of information: Hippocraticness only requires that the source be unchanged if the view is not modified, and nothing about information retention is guaranteed when the view is changed. To address the problem, we propose an extension of the original lenses, called retentive lenses, which satisfy a new Retentiveness law guaranteeing that if parts of the view are unchanged, then the corresponding parts of the source are retained as well. As a concrete example of retentive lenses, we present a domain-specific language for writing tree transformations; we prove that the pair of get and put functions generated from a program in our DSL forms a retentive lens. We demonstrate the practical use of retentive lenses and the DSL by presenting case studies on code refactoring, Pombrio and Krishnamurthi’s resugaring, and XML synchronisation.
Cite
Cites 23 works (0 here)
External (23)
- Hygienic resugaring of compositional desugaring (2015)
- BiFluX: A Bidirectional Functional Update Language for XML (2014)
- Resugaring: lifting evaluation sequences through syntactic sugar (2014)
- The Java Language Specification, Java SE 8 Edition (2013)
- Pandoc: a Universal Document Converter (2013)
- Edit lenses (2012)
- Delta lenses over inductive types (2012)
- From state- to delta-based bidirectional model transformations: the symmetric case (2011)
- Incremental updates for efficient bidirectional transformations (2011)
- An Algorithm for Layout Preservation in Refactoring Transformations (2011)
- From State- to Delta-Based Bidirectional Model Transformations: the Asymmetric Case (2011)
- Provenance As Dependency Analysis (2011)
- Invertible syntax descriptions: unifying parsing and pretty printing (2010)
- Matching lenses: alignment and view update (2010)
- Provenance in Databases: Why, How, and Where (2009)
- Quotient lenses (2008)
- Boomerang: resourceful lenses for string data (2008)
- Bidirectional model transformations in QVT: semantic issues and open questions (2007)
- Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-Update Problem (2007)
- Containers: Constructing strictly positive types (2005)
- Refactoring: Improving the Design of Existing Code (1999)
- Origin Tracking (1993)
- Update semantics of relational views (1981)