Skip to main content

Finite constants: Characterizations of a new decidable set of constants

  • Communications
  • Conference paper
  • First Online:
Mathematical Foundations of Computer Science 1989 (MFCS 1989)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 379))

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

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho and J. D. Ullman. Principles of Compiler Design. Addison-Wesley, 1977.

    Google Scholar 

  2. F. E. Allen. Control flow analysis. ACM Sigplan Notices, July 1970.

    Google Scholar 

  3. B. Alpern, M. N. Wegman, and F. K. Zadeck. Detecting equality of variables in programs. In 15th POPL, pages 1–11, San Diego, 1988.

    Google Scholar 

  4. J. Cocke and J. T. Schwartz. Programming languages and their compilers. Preliminary notes, Courant Institute of Mathematical Sciences, New York University, April 1970.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. J. B. Kam and J. D. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7:309–317, 1975.

    Google Scholar 

  8. J. B. Kam and J. D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158–171, January 1976.

    Google Scholar 

  9. K. W. Kennedy. Variable subsumption with constant folding. SETL Newsletter 112, Courant Institute of Mathematical Sciences, New York University, August 1973.

    Google Scholar 

  10. G. A. Kildall. Global expression optimization during compilation. Technical Report 72-06-02, University of Washington, Computer Science Group, Seattle, Washington, 1972.

    Google Scholar 

  11. G. A. Kildall. A unified approach to global program optimization. In 1st POPL, pages 194–206, Boston, Massachusetts, 1973.

    Google Scholar 

  12. F. Nielson. A bibliography on abstract interpretations. ACM Sigplan Notices, 21:31–38, 1986.

    Google Scholar 

  13. J. H. Reif and R. Lewis. Symbolic evaluation and the global value graph. In 4th POPL, pages 104–118, Los Angeles, California, 1977.

    Google Scholar 

  14. J. H. Reif and R. Lewis. Efficient symbolic analysis of programs. Technical Report 37–82, Harvard University, Aiken Computation Laboratory, 1982.

    Google Scholar 

  15. B. Steffen. Abstrakte Interpretationen beim Optimieren von Programmlaufzeiten. Ein Optimalitätskonzept und seine Anwendung. PhD thesis, Christian-Albrechts-Universität Kiel, 1987.

    Google Scholar 

  16. B. Steffen. Optimal run time optimization — proved by a new look at abstract interpretations. In TAPSOFT '87, pages 52–68. LNCS 249, 1987.

    Google Scholar 

  17. B. Steffen. Optimal data flow analysis via observational equivalence. In MFCS '89, Lecture Notes in Computer Science. Springer Verlag, 1989.

    Google Scholar 

  18. B. Steffen and J. Knoop. Term closures for optimal program optimization. To appear.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. 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.

    Google Scholar 

  21. R. E. Tarjan. Fast algorithms for solving path problems. Journal of the ACM, 28(3):594–614, July 1981.

    Google Scholar 

  22. B. Wegbreit. Property extraction in well-founded property sets. IEEE Transactions on Software Engineering, 1(3):270–285, September 1975.

    Google Scholar 

  23. M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. In 12th POPL, pages 291–299, New Orleans, Lousiana, 1985.

    Google Scholar 

  24. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Antoni Kreczmar Grazyna Mirkowska

Rights and permissions

Reprints 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

Publish with us

Policies and ethics