Abstract
Constant propagation (CP) is one of the most widely used optimizations in practice (cf. [9]). Intuitively, it addresses the problem of statically detecting whether an expression always evaluates to a unique constant at run-time. Unfortunately, as proved by different authors [4, 16], CP is in general undecidable even if the interpretation of branches is completely ignored. On the other hand, it is certainly decidable in more restricted settings, like on loop-free programs (cf. [7]. In this paper, we explore the complexity of CP for a three-dimensional taxonomy. We present an almost complete complexity classification, leaving only two upper bounds open.
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
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1985.
C. Click and K. D. Cooper. Combining analyses, combining optimizations. ACM Transactions on Programming Languages and Systems, 17(2):181–196, 1995.
M. R. Garey and D. S. Johnson. Computers and Intractability-A Guide to the Theory of NP-Completeness. W.H. Freeman & Co, San Francisco, 1979.
M. S. Hecht. Flow Analysis of Computer Programs. Elsevier, North-Holland, 1977.
N. D. Jones and S. S Muchnick. Complexity of flow analysis, inductive assertion synthesis, and a language due to Dijkstra. In [10], chapter 12, pages 380–393.
M. Karr. Affine relationships among variables of a program. Acta Informatica, 6:133–151, 1976.
J. Knoop and O. Rüthing. Constant propagation on the value graph: simple constants and beyond. In CC’ 2000, LNCS 1781, pages 94–109, Berlin, Germany, 2000. Springer-Verlag.
W. Landi. Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4):323–337, 1992.
S. S. Muchnick. Advanced Compiler Design & Implementation. Morgan Kaufmann, San Francisco, CA, 1997.
S. S. Muchnick and N. D. Jones, editors. Program Flow Analysis: Theory and Applications. Prentice Hall, Englewood Cliffs, NJ, 1981.
M. Müller-Olm. The complexity of copy constant detection in parallel programs. In STACS’2001, LNCS, 2001. Springer-Verlag. To appear.
R. Muth and S. Debray. On the complexity of flow-sensitive dataflow analysis. In POPL’2000, pages 67–81, ACM, Boston, MA, 2000.
C. H. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.
W. Pugh. The Omega Test: a fast and practical integer programming algorithm for dependence analysis. In IEEE, editor, Supercomputing’ 91, Albuquerque, NM, pages 4–13. IEEE Computer Society Press, 1991.
W. Pugh and D. Wonnacott. Constraint-based array dependence analysis. ACM Transactions on Programming Languages and Systems, 20(3):635–678, 1998.
J. H. Reif and R. Lewis. Symbolic evaluation and the gobal value graph. POPL’77, pages 104–118, ACM, Los Angeles, CA, 1977.
M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural dataflow analysis with applications to constant propagation. Theoretical Computer Science, 167(1-2):131–170, 1996.
M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In [10], chapter 7, pages 189–233.
B. Steffen and J. Knoop. Finite constants: Characterizations of a new decidable set of constants. Theoretical Computer Science, 80(2):303–318, 1991.
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2), 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Müller-Olm, M., Rüthing, O. (2001). On the Complexity of Constant Propagation. In: Sands, D. (eds) Programming Languages and Systems. ESOP 2001. Lecture Notes in Computer Science, vol 2028. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45309-1_13
Download citation
DOI: https://doi.org/10.1007/3-540-45309-1_13
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41862-7
Online ISBN: 978-3-540-45309-3
eBook Packages: Springer Book Archive