Delta Lenses over Inductive Types

Authors

  • Hugo Pacheco HASLab / INESC TEC & Universidade do Minho, Braga, Portugal
  • Alcino Cunha HASLab / INESC TEC & Universidade do Minho, Braga, Portugal
  • Zhenjiang Hu National Institute of Informatics, Tokyo, Japan

DOI:

https://doi.org/10.14279/tuj.eceasst.49.713

Abstract

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.

Downloads

Published

2012-07-12