Thursday, July 11, 2013

Edit Lenses

Edit Lenses
M. Hofmann, B. Pierce, and D. Wagner
Proceedings of POPL 2012, p. 495-508.


I previously wrote about Diskin et al.'s delta lenses.  That paper explores one approach to bidirectional transformations that takes into account information about the update process changing one state to another.

In this paper, Pierce et al. explore what they call edit lenses.  A delta lens considers a state space as a category, with the arrows of the category being updates describing how to get from one state to another.  An edit lens, by contrast, considers a state space acted upon by a monoid (this idea appears in previous work on algebraic foundations of bidirectional transformations by Stevens, and was mentioned in Pierce et al.'s Symmetric Lenses paper as a natural next step). 

Read more »

Labels: , ,

Friday, April 26, 2013

From State- to Delta-Based Bidirectional Model Transformations: the Asymmetric Case

From State- to Delta-Based Bidirectional Model Transformations: the Asymmetric Case
Zinovy Diskin, Yingfei Xiong, and Krzysztof Czarnecki
Journal of Object Technology 10(6):1-25, 2011

This paper is the journal version of an ICMT 2010 paper, which I had read a few years ago.  The journal version is sufficiently different to make it worthwhile to read if you'd already read the conference version; I had particular trouble with the small figures/examples in the conference version, and this one is much better in that respect.

The idea is to revisit the notion of "lens" or (asymmetric) bidirectional transformation, introduced in now-classic work by Foster et al. (POPL 2005, TOPLAS 2007).  Basically, a lens is a pair of functions
$\newcommand{\AA}{\mathbf{A}}$
$\newcommand{\BB}{\mathbf{B}}$

\[
\begin{eqnarray*}
get &:& \AA \to \BB\\
put &:& \AA\times \BB \to \AA
\end{eqnarray*}
 \]

where the idea is, $get$ maps some source data $A \in \AA$ to a "view" $B \in \BB$, and $put$ takes a (possibly updated) $B' \in \BB$ and the original $A \in \AA$ and produces a corresponding $A' \in \AA$.  These are expected to satisfy some basic consistency laws.


Read more »

Labels: ,