Abstract
The need to integrate several versions of a base program into a common one arises frequently, but it is a tedious and time consuming task to integrate programs by hand. To date, the only available tools for assisting with program integration are variants of text-based differential file comparators; these are of limited utility because one has no guarantees about how the program that is the product of an integration behaves compared to the programs that were integrated.
Our recent work addresses the problem of building a semantics-based tool for program integration; this paper describes the techniques we have developed, which provide the foundation for creating such a tool. Semantics-based integration is based on the assumption that a difference in the behavior of one of the variant programs from that of the base program, rather than a difference in the text, is significant and must be preserved in the merged program. Although it is undecidable to determine whether a program modification actually leads to such a difference, it is possible to determine a safe approximation by comparing each of the variants with the base program. To determine this information, the integration algorithm employs a program representation that is similar (although not identical) to the program dependence graphs that have been used previously in vectorizing compilers. The algorithm also makes use of the notion of a program slice to find just those statements of a program that determine the values of potentially affected variables.
Portions of this paper are excerpted from [10] and [12].
This work was supported in part by the National Science Foundation under grants DCR-8552602 and DCR-8603356 as well as by grants from IBM, DEC, Siemens, and Xerox.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aho, A.V., Sethi, R., and Ullman, J.D., Compilers: Principles, Techniques, and Tools, Addison-Wesley, Reading, MA (1986).
Allen, J.R., “Dependence analysis for subscripted variables and its application to program transformations,” Ph.D. dissertation, Dept. of Math. Sciences, Rice Univ., Houston, TX (April 1983).
Allen, R., Baumgartner, D., Kennedy, K., and Porterfield, A., “PTOOL: A semi-automatic parallel programming assistant,” Tech Rep. COMP TR86-31, Dept. of Computer Science, Rice Univ., Houston, TX (January 1986).
Bannerjee, U., “Speedup of ordinary programs,” Ph.D. dissertation and Tech. Rep. R-79-989, Dept. of Computer Science, University of Illinois, Urbana, IL (October 1979).
Banning, J.P., “An efficient way to find the side effects of procedure calls and the aliases of variables,” pp. 29–41 in Conference Record of the Sixth ACM Symposium on Principles of Programming Languages, (San Antonio, TX, Jan. 29–31, 1979), ACM, New York (1979).
Cooper, K.D. and Kennedy, K., “Interprocedural side-effect analysis in linear time,” Tech. Rep. COMP TR87-62, Dept. of Computer Science, Rice Univ., Houston, TX (October 1987).
Ferrante, J., Ottenstein, K., and Warren, J., “The program dependence graph and its use in optimization,” ACM Transactions on Programming Languages and Systems 9(3) pp. 319–349 (July 1987).
Horwitz, S., Prins, J., and Reps, T., “Integrating non-interfering versions of programs,” TR-690, Computer Sciences Department, University of Wisconsin, Madison, WI (March 1987).
Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs,” Extended abstract, Computer Sciences Department, University of Wisconsin, Madison, WI (November 1987).
Horwitz, S., Prins, J., and Reps, T., “Integrating non-interfering versions of programs,” in Conference Record of the Fifteenth ACM Symposium on Principles of Programming Languages, (San Diego, CA, January 13–15, 1988), ACM, New York (1988).
Horwitz, S., Prins, J., and Reps, T., “On the adequacy of program dependence graphs for representing programs,” in Conference Record of the Fifteenth ACM Symposium on Principles of Programming Languages, (San Diego, CA, January 13–15, 1988), ACM, New York (1988).
Horwitz, S., Prins, J., and Reps, T., “Support for integrating program variants in an environment for programming in the large,” in Proceedings of the International Workshop on Software Version and Configuration Control 88, (Grassau, W. Germany, Jan. 28–29, 1988), (1988).
Jones, N.D. and Muchnick, S.S., “Flow analysis and optimization of Lisp-like structures,” in Program Flow Analysis: Theory and Applications, ed. S.S. Muchnick and N.D. Jones,Prentice-Hall, Englewood Cliffs, NJ (1981).
Kennedy, K., “A survey of data flow analysis techniques,” in Program Flow Analysis: Theory and Applications, ed. S.S. Muchnick and N.D. Jones,Prentice-Hall, Englewood Cliffs, NJ (1981).
Kuck, D.J., Muraoka, Y., and Chen, S.C., “On the number of operations simultaneously executable in FORTRAN-like programs and their resulting speed-up,” IEEE Trans. on Computers C-21(12) pp. 1293–1310 (December 1972).
Kuck, D.J., 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 (1981).
Reps, T. and Teitelbaum, T., “The Synthesizer Generator,” Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, (Pittsburgh, PA, Apr. 23–25, 1984), ACM SIGPLAN Notices 19(5) pp. 42–48 (May 1984).
Reps, T. and Teitelbaum, T., The Synthesizer Generator: Reference Manual, Dept. of Computer Science, Cornell Univ., Ithaca, NY (August 1985, Second Edition: July 1987).
Reps, T. and Yang, W., “The semantics of program slicing,” Tech. Rep. in preparation, Computer Sciences Department, University of Wisconsin, Madison, WI ().
Tichy, W.F., “RCS: A system for version control,” Software — Practice & Experience 15(7) pp. 637–654 (July 1985).
Weiser, M., “Program slicing,” IEEE Transactions on Software Engineering SE-10(4) pp. 352–357 (July 1984).
Wolfe, M.J., “Optimizing supercompilers for supercomputers,” Ph.D. dissertation and Tech. Rep. R-821105, Dept. of Computer Science, University of Illinois, Urbana, IL (October 1982).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Reps, T., Horwitz, S. (1988). Semantics-based program integration. In: Ganzinger, H. (eds) ESOP '88. ESOP 1988. Lecture Notes in Computer Science, vol 300. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19027-9_1
Download citation
DOI: https://doi.org/10.1007/3-540-19027-9_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-19027-1
Online ISBN: 978-3-540-38941-5
eBook Packages: Springer Book Archive