A formal investigation of Diff3

  • Authors:
  • Sanjeev Khanna;Keshav Kunal;Benjamin C. Pierce

  • Affiliations:
  • University of Pennsylvania;Yahoo;University of Pennsylvania

  • Venue:
  • FSTTCS'07 Proceedings of the 27th international conference on Foundations of software technology and theoretical computer science
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The diff3 algorithm is widely considered the gold standard formerging uncoordinated changes to list-structured data such as text files. Surprisingly, its fundamental properties have never been studied in depth. We offer a simple, abstract presentation of the diff3 algorithm and investigate its behavior. Despite abundant anecdotal evidence that people find diff3's behavior intuitive and predictable in practice, characterizing its good properties turns out to be rather delicate: a number of seemingly natural intuitions are incorrect in general. Our main result is a careful analysis of the intuition that edits to "well-separated" regions of the same document are guaranteed never to conflict.