Advertisement

Algebraic properties of program integration

  • Thomas Reps
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 432)

Abstract

The need to integrate several versions of a program into a common one arises frequently, but it is a tedious and time consuming task to merge programs by hand. The program-integration algorithm recently proposed by Horwitz, Prins, and Reps provides a way to create a semantics-based tool for integrating a base program with two or more variants. The integration algorithm is based on the assumption that any change in the behavior, rather than the text, of a program variant is significant and must be preserved in the merged program. An integration system based on this algorithm will determine whether the variants incorporate interfering changes, and, if they do not, create an integrated program that includes all changes as well as all features of the base program that are preserved in all variants. To determine this information, the algorithm employs a program representation that is similar to the program dependence graphs that have been used previously in vectorizing and parallelizing compilers.

This paper studies the algebraic properties of the program-integration operation. To do so, we first modify the integration algorithm by recasting it as an operation on a Brouwerian algebra constructed from sets of dependence graphs. (A Brouwerian algebra is a distributive lattice with an operation ab characterized by abc iff abc.) In this algebra, the program-integration operation can be defined solely in terms of ∩, ∪, and ∸. By making use of the rich set of algebraic laws that hold in Brouwerian algebras, the paper establishes a number of the integration operation's algebraic properties.

Keywords

Boolean Algebra Dependence Graph Algebraic Property Base Program Integration Algorithm 
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.
    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
  2. 2.
    Hoare, C.A.R., “A couple of novelties in the propositional calculus,” Zeitschr. f. math. Logik und Grundlagen d. Math. 31 pp. 173–178 (1985).Google Scholar
  3. 3.
    Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs,” Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22–24, 1988), ACM SIGPLAN Notices 23(7) pp. 35–46 (July 1988).Google Scholar
  4. 4.
    Horwitz, S., Pfeiffer, P., and Reps, T., “Dependence analysis for pointer variables,” Proceedings of the ACM SIGPLAN 89 Conference on Programming Language Design and Implementation, (Portland, OR, June 21–23, 1989), ACM SIGPLAN Notices 24(7) pp. 28–40 (July 1989).Google Scholar
  5. 5.
    Horiwitz, S., Prins, J., and Reps, T., “Integrating non-interfering versions of programs,” ACM Trans. Program. Lang. Syst. 11(3) pp. 345–387 (July 1989).CrossRefGoogle Scholar
  6. 6.
    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, NY (1981).Google Scholar
  7. 7.
    McKinsey, J.C.C. and Tarski, A., “On closed elements in closure algebras,” Annals of Mathematics 47(1) pp. 122–162 (January 1946).Google Scholar
  8. 8.
    Ottenstein, K.J. and Ottenstein, L.M., “The program dependence graph in a software development environment,” 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. 177–184 (May 1984).Google Scholar
  9. 9.
    Rasiowa, H. and Sikorski, R., The Mathematics of Metamathematics, Polish Scientific Publishers, Warsaw (1963).Google Scholar
  10. 10.
    Reps, T. and Teitelbaum, T., The Synthesizer Generator: A System for Constructing Language-Based Editors, Springer-Verlag, New York, NY (1988).Google Scholar
  11. 11.
    Reps, T. and Yang, W., “The semantics of program slicing,” TR-777, Computer Sciences Department, University of Wisconsin, Madison, WI (June 1988).Google Scholar
  12. 12.
    Reps, T., “Demonstration of a prototype tool for program integration,” TR-819, Computer Sciences Department, University of Wisconsin, Madison, WI (January 1989).Google Scholar
  13. 13.
    Reps, T., “On the algebraic properties of program integration,” TR-856, Computer Sciences Department, University of Wisconsin, Madison, WI (June 1989).Google Scholar
  14. 14.
    Weiser, M., “Program slicing,” IEEE Transactions on Software Engineering SE-10(4) pp. 352–357 (July 1984).Google Scholar
  15. 15.
    Yang, W., Horwitz, S., and Reps, T., “Detecting program components with equivalent behaviors,” TR-840, Computer Sciences Department, University of Wisconsin, Madison, WI (April 1989).Google Scholar
  16. 16.
    Yang, W., Horwitz, S., and Reps, T., “A new program integration algorithm,” TR-899, Computer Sciences Department, University of Wisconsin, Madison, WI (December 1989).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1990

Authors and Affiliations

  • Thomas Reps
    • 1
  1. 1.Computer Sciences DepartmentUniversity of Wisconsin-MadisonMadisonUSA

Personalised recommendations