Identifying the semantic and textual differences between two versions of a program

Text-based file comparators (<italic>e.g.</italic>, the Unix utility <italic>diff</italic>), are very general tools that can be applied to arbitrary files. However, using such tools to compare <italic>programs</italic> can be unsatisfactory because their <italic>only</italic> notion of change is based on program <italic>text</italic> rather than program <italic>behavior</italic>. This paper describes a technique for comparing two versions of a program, determining which program components represents changes, and classifying each changed component as representing either a <italic>semantic</italic> or a <italic>textual</italic> change.

[1]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984 .

[2]  David A. Padua,et al.  Dependence graphs and compiler optimizations , 1981, POPL '81.

[3]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[4]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[5]  Walter F. Tichy,et al.  The string-to-string correction problem with block moves , 1984, TOCS.

[6]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[7]  Stanley M. Selkow,et al.  The Tree-to-Tree Editing Problem , 1977, Inf. Process. Lett..

[8]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[9]  Michael J. Fischer,et al.  The String-to-String Correction Problem , 1974, JACM.

[10]  Wuu Yang,et al.  Detecting Program Components With Equivalent Behaviors , 1989 .

[11]  HorwitzSusan Identifying the semantic and textual differences between two versions of a program , 1990 .

[12]  John E. Hopcroft,et al.  An n log n algorithm for minimizing states in a finite automaton , 1971 .

[13]  Robert M. Shapiro,et al.  THE REPRESENTATION OF ALGORITHMS , 1969 .

[14]  Kaizhong Zhang,et al.  Simple Fast Algorithms for the Editing Distance Between Trees and Related Problems , 1989, SIAM J. Comput..

[15]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[16]  Shin-Yee Lu A Tree-to-Tree Distance and Its Application to Cluster Analysis , 1979, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[17]  Mark N. Wegman,et al.  An efficient method of computing static single assignment form , 1989, POPL '89.

[18]  D Sankoff,et al.  Matching sequences under deletion-insertion constraints. , 1972, Proceedings of the National Academy of Sciences of the United States of America.

[19]  Thomas W. Reps,et al.  Integrating noninterfering versions of programs , 1989, TOPL.

[20]  Eugene W. Myers,et al.  A file comparison program , 1985, Softw. Pract. Exp..

[21]  Kuo-Chung Tai,et al.  The Tree-to-Tree Correction Problem , 1979, JACM.

[22]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.