Abstract
Constant propagation — the replacement of program terms which represent a unique value at run time by their values — is a classical program optimization method. In spite of being treated for years, constant propagation still has been in the unsatisfactory phase of heuristics. We enhance the known constant propagation techniques to obtain an algorithm which is optimal for programs without loops. Fundamental is the introduction of a new decidable set of constants, the finite constants. This set has two different characterizations: a denotational one, which directly specifies our iterative algorithm and an operational one, which delivers the completeness or optimality of this algorithm for programs without loops. The algorithm is implemented in a commercial compiler project.
The author is supported by the Science and Engineering Research Council grant GC/D69464
The author is supported by the Deutsche Forschungsgemeinschaft (DFG) grant La 426/9-1
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. V. Aho and J. D. Ullman. Principles of Compiler Design. Addison-Wesley, 1977.
F. E. Allen. Control flow analysis. ACM Sigplan Notices, July 1970.
B. Alpern, M. N. Wegman, and F. K. Zadeck. Detecting equality of variables in programs. In 15th POPL, pages 1–11, San Diego, 1988.
J. Cocke and J. T. Schwartz. Programming languages and their compilers. Preliminary notes, Courant Institute of Mathematical Sciences, New York University, April 1970.
V. Donzeau-Gouge. Denotational definition of properties of program computations. In St. S. Muchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications. Prentice Hall, New Jersey, 1981.
J. Ferrante and K. J. Ottenstein. A program form based on data dependency in predicate regions. In 10th POPL, pages 217–236, Austin, Texas, 1983.
J. B. Kam and J. D. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7:309–317, 1975.
J. B. Kam and J. D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158–171, January 1976.
K. W. Kennedy. Variable subsumption with constant folding. SETL Newsletter 112, Courant Institute of Mathematical Sciences, New York University, August 1973.
G. A. Kildall. Global expression optimization during compilation. Technical Report 72-06-02, University of Washington, Computer Science Group, Seattle, Washington, 1972.
G. A. Kildall. A unified approach to global program optimization. In 1st POPL, pages 194–206, Boston, Massachusetts, 1973.
F. Nielson. A bibliography on abstract interpretations. ACM Sigplan Notices, 21:31–38, 1986.
J. H. Reif and R. Lewis. Symbolic evaluation and the global value graph. In 4th POPL, pages 104–118, Los Angeles, California, 1977.
J. H. Reif and R. Lewis. Efficient symbolic analysis of programs. Technical Report 37–82, Harvard University, Aiken Computation Laboratory, 1982.
B. Steffen. Abstrakte Interpretationen beim Optimieren von Programmlaufzeiten. Ein Optimalitätskonzept und seine Anwendung. PhD thesis, Christian-Albrechts-Universität Kiel, 1987.
B. Steffen. Optimal run time optimization — proved by a new look at abstract interpretations. In TAPSOFT '87, pages 52–68. LNCS 249, 1987.
B. Steffen. Optimal data flow analysis via observational equivalence. In MFCS '89, Lecture Notes in Computer Science. Springer Verlag, 1989.
B. Steffen and J. Knoop. Term closures for optimal program optimization. To appear.
B. Steffen and J. Knoop. Ein optimales interpretationsunabhängiges Datenflußanalyseverfahren. Technical Report 8711: Programmspezifikation — Midlum/Föhr, 1987, Christian-Albrechts-Universität Kiel, Institut für Informatik, West-Germany, 1987.
B. Steffen and J. Knoop. Finite constants: Characterizations of a new decidable set of constants. LFCS Report Series 8979, LFCS, Edinburgh Univ., Dept. of Comp. Sci., 1989.
R. E. Tarjan. Fast algorithms for solving path problems. Journal of the ACM, 28(3):594–614, July 1981.
B. Wegbreit. Property extraction in well-founded property sets. IEEE Transactions on Software Engineering, 1(3):270–285, September 1975.
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. In 12th POPL, pages 291–299, New Orleans, Lousiana, 1985.
R. Wilhelm. Global flow analysis and optimization in the MUG2 compiler generating system. In St. S. Muchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications. Prentice Hall, New Jersey, 1981.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Steffen, B., Knoop, J. (1989). Finite constants: Characterizations of a new decidable set of constants. In: Kreczmar, A., Mirkowska, G. (eds) Mathematical Foundations of Computer Science 1989. MFCS 1989. Lecture Notes in Computer Science, vol 379. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51486-4_94
Download citation
DOI: https://doi.org/10.1007/3-540-51486-4_94
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-51486-2
Online ISBN: 978-3-540-48176-8
eBook Packages: Springer Book Archive