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 a∸b characterized by a∸b ⊂ c iff a ⊂ b ∩ c.) 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.
This work was supported in part by a David and Lucile Packard Fellowship for Science and Engineering, by the National Science Foundation under grant DCR-8552602, by the Defense Advanced Research Projects Agency, monitored by the Office of Naval Research under contract N00014-88-K-0590, as well as by grants from IBM, DEC, 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
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).
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).
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).
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).
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).
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).
McKinsey, J.C.C. and Tarski, A., “On closed elements in closure algebras,” Annals of Mathematics 47(1) pp. 122–162 (January 1946).
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).
Rasiowa, H. and Sikorski, R., The Mathematics of Metamathematics, Polish Scientific Publishers, Warsaw (1963).
Reps, T. and Teitelbaum, T., The Synthesizer Generator: A System for Constructing Language-Based Editors, Springer-Verlag, New York, NY (1988).
Reps, T. and Yang, W., “The semantics of program slicing,” TR-777, Computer Sciences Department, University of Wisconsin, Madison, WI (June 1988).
Reps, T., “Demonstration of a prototype tool for program integration,” TR-819, Computer Sciences Department, University of Wisconsin, Madison, WI (January 1989).
Reps, T., “On the algebraic properties of program integration,” TR-856, Computer Sciences Department, University of Wisconsin, Madison, WI (June 1989).
Weiser, M., “Program slicing,” IEEE Transactions on Software Engineering SE-10(4) pp. 352–357 (July 1984).
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).
Yang, W., Horwitz, S., and Reps, T., “A new program integration algorithm,” TR-899, Computer Sciences Department, University of Wisconsin, Madison, WI (December 1989).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Reps, T. (1990). Algebraic properties of program integration. In: Jones, N. (eds) ESOP '90. ESOP 1990. Lecture Notes in Computer Science, vol 432. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-52592-0_72
Download citation
DOI: https://doi.org/10.1007/3-540-52592-0_72
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-52592-9
Online ISBN: 978-3-540-47045-8
eBook Packages: Springer Book Archive