Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/93542.93574acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

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

Published: 01 June 1990 Publication History

Abstract

Text-based file comparators (e.g., the Unix utility diff), are very general tools that can be applied to arbitrary files. However, using such tools to compare programs can be unsatisfactory because their only notion of change is based on program text rather than program behavior. 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 semantic or a textual change.

References

[1]
Aho, A., E:opcroft, J.E., and Ullman, J., The Design and Analysis of ffompater Algorithms, Addison-Wesley, Reading, MA (1974).
[2]
Aho, A., Sethi, R., and Ullman, J., Compilers: Principles, Techniques and Tools, Addison-Wesley, Reading, MA (1986).
[3]
Alpem, B., Wegman, M3q., and Zadeck, F.K., "Detecting equality of variables in programs," pp. 1-11 in Conference Record of the Fifteenth ACM Symposium on Principles of Programming Languages, (San Diego, CA, Januaxy 13-15, 1988), AC/v{, New York (1988).
[4]
Cytron, R., Ferrante, j., Rosen, B.K., Wegman, M.N., and Zadeck, K., "An efficient method of computing static single assignment form," pp. 25-35 in Conference Record of the Sixteenth ACM Symposium on Principles of Programming Languages, (Austin, TX, Jan. l 1-13, 1989), ACM, New York, NY (1989).
[5]
Ferrante, I., Ottenstem, K., and Warren, J., "The program dependence graph and its use in optimization," ACM Transactions on Progranunmg Languages and Systems, (1987).
[6]
Hopcroft, J.E., "An n log n algorithm for minimizing the states of a finite automaton," The Theory of Machines and C omputat/ons, pp. 189-196 ( 1971).
[7]
Horwitz, S., "Identifying the semantic and textual differences between two versions of a program," Technical Report 895, Department of Computer Sciences, University of Wisconsin---Madison (November, 1989).
[8]
Horwitz, S., Prim, l., and Reps, T., "Integrating noninterfering versions of programs," ACM Transactions on Programming Languages and Systems 11(3)pp. 345-387 (July, 1989).
[9]
Horwitz, S. and Reps, T., "Efficient comparison of program slices," Report in preparation. (1990).
[10]
Kuck, DJ., Kuhn, R.H., Leasure, B., Padua, D.A., and Wolfe, M., "Dependence graphs and compiler optimizations," pp. 207-218 in Conference Record of the Eighth ACM Symposium on Principles of Programming Languages, (Williamsburg, VA, January 26-28, 1981), ACM, New York (198D.
[11]
Lu, S.Y., "A tree-to-tree distance and its application to cluster analysis," IEEE Transactions on Pattern Analysis and Machine Intelligence PAMI-i(2) pp. 219-224 (April, 1979).
[12]
Miller, W. and Myers, E.W., "A file comparison program," Software- Practice and Experience 15(ll)pp. 1025-1040 (November, 1985).
[13]
Nakatsu, N., Kambayashi, Y., and Yajima, S., "A longest common subsequence algorithm suitable for similar text strings," Acta lnformatica 18 pp. 171-179 (1982). (as cited in {Miller85})
[14]
Ottenstein, KJ. and Ottenstein, L.M., "rhe program dependence graph in a software development environment," Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, (Pittsburgh, PA, April 23-25, 1984), ACM SIGPLAN Notices 19(5) pp. 177-184 (May, 1984).
[15]
Rosen, B., Wcgman, M.N., and Zadeck, F.K., "Global value numbers and redundant computations," pp. 12-27 in Confer. ence Record of the Fifteenth ACM Symposium on Principles of Progranvning languages, (San Diego, CA, January 13-15, 1988), ACM, New York (1988).
[16]
Sankoff, D., "Matching sequences under deletionfmsertion constraints," Proc. Nat. Acad. Sci. 69(1)pp. 4-6 (January, 1972).
[17]
Selkow, S.M., "The tree-to-tree editing problem," Information Processing Letters 6(6) pp. 184-186 (December, 1977).
[18]
Shapiro, R. M. and Saint, H., "Ttte representation of algo. rithms," Technical Reprot CA-7002-1432, Massachusetts Computer Associates (February, 1970). (as cited in {Alpem88, Roson88})
[19]
Tai, K.C., "The tree-to-tree correction problem," JACM 260) pp. 422-433 (July, 1979).
[20]
Tichy, W., 'Whe string-to-string correction problem with block moves," ACM Trtmsactions on Computer Systems 2(4) pp. 309-321 (November, 1984).
[21]
Wagner, R.A. and Fischer, M.J., "The string-to-string correction problem," JACM 21(1)pp. 168-173 (January, 1974).
[22]
Weiser, M., "Program slicing," IEEE Transactions on Software Engineering SE-10(4) pp. 352-357 (July, 1984).
[23]
Yang, W., Horwitz, S., and Reps, T., "Detecting program components with equivalent behaviors," Technical Report 840, Department of Computer Sciences, University of Wisconsin, Madison, WI (April, 1989).
[24]
Zhang, K. and Shasha, D., "Simple fast algorithms for the editing distance between trees and related problems," to appear in SIAM J. of Computing, (1989).

Cited By

View all
  • (2024)Comparing semantic graph representations of source code: The case of automatic feedback on programming assignmentsComputer Science and Information Systems10.2298/CSIS230615004P21:1(117-142)Online publication date: 2024
  • (2024)Evaluating the Effectiveness of Deep Learning Models for Foundational Program Analysis TasksProceedings of the ACM on Programming Languages10.1145/36498298:OOPSLA1(500-528)Online publication date: 29-Apr-2024
  • (2024)PPT4J: Patch Presence Test for Java BinariesProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639231(1-12)Online publication date: 20-May-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation
June 1990
351 pages
ISBN:0897913647
DOI:10.1145/93542
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1990

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)59
  • Downloads (Last 6 weeks)10
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Comparing semantic graph representations of source code: The case of automatic feedback on programming assignmentsComputer Science and Information Systems10.2298/CSIS230615004P21:1(117-142)Online publication date: 2024
  • (2024)Evaluating the Effectiveness of Deep Learning Models for Foundational Program Analysis TasksProceedings of the ACM on Programming Languages10.1145/36498298:OOPSLA1(500-528)Online publication date: 29-Apr-2024
  • (2024)PPT4J: Patch Presence Test for Java BinariesProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639231(1-12)Online publication date: 20-May-2024
  • (2023)Aardvark: Comparative Visualization of Data Analysis Scripts2023 IEEE Visualization in Data Science (VDS)10.1109/VDS60365.2023.00009(30-38)Online publication date: 15-Oct-2023
  • (2023)Detecting Malicious JavaScript Using Structure-Based Analysis of Graph RepresentationIEEE Access10.1109/ACCESS.2023.331726611(102727-102745)Online publication date: 2023
  • (2022)Modeling Functional Similarity in Source Code With Graph-Based Siamese NetworksIEEE Transactions on Software Engineering10.1109/TSE.2021.310555648:10(3771-3789)Online publication date: 1-Oct-2022
  • (2022)An Experimental Comparison of Clone Detection Techniques using Java Bytecode2022 29th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC57359.2022.00026(139-148)Online publication date: Dec-2022
  • (2022)VulSlicerJournal of Systems and Software10.1016/j.jss.2022.111450193:COnline publication date: 1-Nov-2022
  • (2020)Semantic code search via equational reasoningProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386001(1066-1082)Online publication date: 11-Jun-2020
  • (2020)Towards Semantic Clone Detection via Probabilistic Software Modeling2020 IEEE 14th International Workshop on Software Clones (IWSC)10.1109/IWSC50091.2020.9047635(64-69)Online publication date: Feb-2020
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media