Affiliation:
1. Utrecht University, Netherlands
Abstract
Effectively computing the difference between two version of a source file has become an indispensable part of software development. The
de facto
standard tool used by most version control systems is the UNIX diff utility, that compares two files on a line-by-line basis without any regard for the
structure
of the data stored in these files.
This paper presents an alternative
datatype generic
algorithm for computing the difference between two values of
any
algebraic datatype. This algorithm maximizes sharing between the source and target trees, while still running in linear time.
Finally, this paper demonstrates that by instantiating this algorithm to the Lua abstract syntax tree and mining the commit history of repositories found on GitHub, the resulting patches can often be merged automatically, even when existing technology has failed.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Learning Proof Transformations and Its Applications in Interactive Theorem Proving;Frontiers of Combining Systems;2023
2. Concise, type-safe, and efficient structural diffing;Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2021-06-18