Type-Directed Diffing of Structured Data

Publication date

2017-09-03

Authors

Cacciari Miraldo, V.ISNI 0000000506342834
Dagand, Pierre Evariste
Swierstra, W.S.ORCID 0000-0002-0295-7944ISNI 0000000426852359

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

Abstract

The Unix diff utility that compares lines of text is used pervasively by version control systems. Yet certain changes to a program may be dicult to describe accurately in terms of modications to individual lines of code. As a result, observing changes at such a xed granularity may lead to unnecessary conicts between dierent 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 modications made to algebraic data structures – and the abstract syntax trees of computer programs in particular – as opposed to only considering modications between their textual representations.

Keywords

Datatype Generic Programming, Version Control, Dependently typed programming, Agda

Citation

Miraldo, V C, Dagand, P E & Swierstra, W 2017, Type-Directed Diffing of Structured Data. in TyDe 2017 : Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development. Association for Computing Machinery, pp. 2–15. https://doi.org/10.1145/3122975.3122976