Advertisement

Semantics-based program integration

  • Thomas Reps
  • Susan Horwitz
1. Invited Speakers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 300)

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.

Keywords

Base Program Integration Algorithm Procedure Call Execution Path Program Integration 
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

  1. 1.
    Aho, A.V., Sethi, R., and Ullman, J.D., Compilers: Principles, Techniques, and Tools, Addison-Wesley, Reading, MA (1986).Google Scholar
  2. 2.
    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).Google Scholar
  3. 3.
    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).Google Scholar
  4. 4.
    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).Google Scholar
  5. 5.
    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).Google Scholar
  6. 6.
    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).Google Scholar
  7. 7.
    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).CrossRefGoogle Scholar
  8. 8.
    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).Google Scholar
  9. 9.
    Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs,” Extended abstract, Computer Sciences Department, University of Wisconsin, Madison, WI (November 1987).Google Scholar
  10. 10.
    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).Google Scholar
  11. 11.
    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).Google Scholar
  12. 12.
    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).Google Scholar
  13. 13.
    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).Google Scholar
  14. 14.
    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).Google Scholar
  15. 15.
    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).Google Scholar
  16. 16.
    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).Google Scholar
  17. 17.
    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).Google Scholar
  18. 18.
    Reps, T. and Teitelbaum, T., The Synthesizer Generator: Reference Manual, Dept. of Computer Science, Cornell Univ., Ithaca, NY (August 1985, Second Edition: July 1987).Google Scholar
  19. 19.
    Reps, T. and Yang, W., “The semantics of program slicing,” Tech. Rep. in preparation, Computer Sciences Department, University of Wisconsin, Madison, WI ().Google Scholar
  20. 20.
    Tichy, W.F., “RCS: A system for version control,” Software — Practice & Experience 15(7) pp. 637–654 (July 1985).Google Scholar
  21. 21.
    Weiser, M., “Program slicing,” IEEE Transactions on Software Engineering SE-10(4) pp. 352–357 (July 1984).Google Scholar
  22. 22.
    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).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Thomas Reps
    • 1
  • Susan Horwitz
    • 1
  1. 1.Computer Sciences Dept.Univ. of WisconsinMadison

Personalised recommendations