Delta Lenses over Inductive Types

Hugo Pacheco, Alcino Cunha, Zhenjiang Hu


Existing bidirectional languages are either state-based or operation-based, depending on whether they represent updates as mere states or as sequences of edit operations.In-between both worlds are delta-based frameworks, where updates are represented using alignment relationships between states.In this paper, we formalize delta lenses over inductive types using dependent type theory and develop a point-free delta lens language with an explicit separation of shape and data.In contrast with the already known issue of data alignment, we identify the new problem of shape alignment and solve it by lifting standard recursion patterns such as folds and unfolds to delta lenses that use alignment to infer meaningful shape updates.

Full Text:




Hosted By Universit├Ątsbibliothek TU Berlin.