Matching lenses
Authors:
Open Access
- 27 September 2010
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 45 (9) , 193-204
Abstract
Bidirectional programming languages are a practical approach to the view update problem. Programs in these languages, called lenses , define both a view and an update policy - i.e., every program can be read as a function mapping sources to views as well as one mapping updated views back to updated sources. One thorny issue that has not received sufficient attention in the design of bidirectional languages is alignment . In general, to correctly propagate an update to a view, a lens needs to match up the pieces of the view with the corresponding pieces of the underlying source, even after data has been inserted, deleted, or reordered. However, existing bidirectional languages either support only simple strategies that fail on many examples of practical interest, or else propose specific strategies that are baked deeply into the underlying theory. We propose a general framework of matching lenses that parameterizes lenses over arbitrary heuristics for calculating alignments. We enrich the types of lenses with "chunks" identifying reorderable pieces of the source and view that should be re-aligned after an update, and we formulate behavioral laws that capture essential constraints on the handling of chunks. We develop a core language of matching lenses for strings, together with a set of "alignment combinators" that implement a variety of alignment strategies.Keywords
This publication has 20 references indexed in Scilit:
- From State- to Delta-Based Bidirectional Model Transformations2010
- Bidirectional Transformations: A Cross-Discipline Perspective2009
- Algebraic Models for Bidirectional Model Synchronization2008
- A programmable editor for developing structured documents based on bidirectional transformationsHigher-Order and Symbolic Computation, 2008
- Exploiting schemas in data synchronizationJournal of Computer and System Sciences, 2007
- Combinators for bidirectional tree transformationsACM Transactions on Programming Languages and Systems, 2007
- An Algebraic Approach to Bi-directional UpdatingLecture Notes in Computer Science, 2004
- Properties and update semantics of consistent viewsACM Transactions on Database Systems, 1988
- On the correct translation of update operations on relational viewsACM Transactions on Database Systems, 1982
- Update semantics of relational viewsACM Transactions on Database Systems, 1981