Type-Directed Diffing of Structured Data
Victor Cacciari Miraldo, Pierre-Évariste Dagand, and
Wouter Swierstra
(Utrecht University, Netherlands; UPMC, France)
The Unix diff utility that compares lines of text is used pervasively by version control systems. Yet certain changes to a program may be difficult to describe accurately in terms of modifications to individual lines of code. As a result, observing changes at such a fixed granularity may lead to unnecessary conflicts between different edits. This paper presents a generic representation for describing transformations between algebraic data types and a non-deterministic algorithm for computing such representations. These representations can be used to give a more accurate account of modifications made to algebraic data structures – and the abstract syntax trees of computer programs in particular – as opposed to only considering modifications between their textual representations.
@InProceedings{TyDe17p2,
author = {Victor Cacciari Miraldo and Pierre-Évariste Dagand and Wouter Swierstra},
title = {Type-Directed Diffing of Structured Data},
booktitle = {Proc.\ TyDe},
publisher = {ACM},
pages = {2--15},
doi = {},
year = {2017},
}