Identifying syntactic differences between two programs
Wuu Yang · Software Practice and Experience · 1991
Abstract Programmers frequently face the need to identify the differences between two programs, usually two different versions of a program. Text‐based tools such as the UNIXr̀ utility diff often produce unsatisfactory comparisons because they cannot accurately pinpoint the differences and because they sometimes produce irrelevant differences. Since programs have a rigid syntactic structure as described by the grammar of the programming language in which they are written, we develop a comparison algorithm that exploits knowledge of the grammar. The algorithm, which is based on a dynamic programming scheme, can point out the differences between two programs more accurately than previous text comparison tools. Finally, the two programs are pretty‐printed ‘synchronously’ with the differences highlighted so that the differences are easily identified.
Cited by 346 works. doi:10.1002/spe.4380210706
Authors
References
- Compilers: Principles, Techniques, and Tools
- The String-to-String Correction Problem
- Matching Sequences under Deletion/Insertion Constraints
- The C++ Programming Language
- The C Programming Language
- An algorithm for the distance between two finite sequences
- The C programming language
- A linear space algorithm for computing maximal common subsequences
- Simple Fast Algorithms for the Editing Distance between Trees and Related Problems
- Algorithms for the Longest Common Subsequence Problem