Polynomial Constants Are Decidable
Constant propagation aims at identifying expressions that always yield a unique constant value at run-time. It is well-known that constant propagation is undecidable for programs working on integers even if guards are ignored as in non-deterministic flow graphs. We show that polynomial constants are decidable in non-deterministic flow graphs. In polynomial constant propagation, assignment statements that use the operators +, -,* are interpreted exactly but all assignments that use other operators are conservatively interpreted as non-deterministic assignments.
We present a generic algorithm for constant propagation via a symbolic weakest precondition computation and show how this generic algorithm can be instantiated for polynomial constant propagation by exploiting techniques from computable ring theory.
KeywordsConstant Propagation Polynomial Ring Assignment Statement Abstract Interpretation Start Node
Unable to display preview. Download preview PDF.
- 1.A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
- 3.P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings 4th POPL, Los Angeles, California, 1977.Google Scholar
- 5.J. H. Davenport, Y. Siret, and E. Tournier. Computer Algebra: Systems and Algorithms for Algebraic Computation. Academic Press, 1988.Google Scholar
- 6.E. W. Dijkstra. A Discipline of Programming. Prentice Hall, 1976.Google Scholar
- 7.C. Fischer and R. LeBlanc. Crafting a Compiler. Benjamin/Cummings Publishing Co., Inc., Menlo Park, CA, 1988.Google Scholar
- 8.K. O. Geddes, S. R. Czapor, and G. Labahn. Algorithms for Computer Algebra. Kluwer, 1992.Google Scholar
- 9.M. S. Hecht. Flow analysis of computer programs. Elsevier North-Holland, 1977.Google Scholar
- 12.Y. V. Matiyasevich. Hilbert’s Tenth Problem. The MIT Press, 1993.Google Scholar
- 13.A. Melton, D. A. Schmidt, and G. E. Strecker. Galois connections and computer science applications. In D. Pitt, S. Abramsky, A. Poigné, and D. Rydeheard, editors, Category Theory and Computer Programming, LNCS 240, pages 299–312. Springer-Verlag, 1985.Google Scholar
- 14.B. Mishra. Algorithmic Algebra. Springer-Verlag, 1993.Google Scholar
- 15.S. S. Muchnick. Advanced compiler design and implementation. Morgan Kaufmann Publishers, San Francisco, California, 1997.Google Scholar
- 16.M. Müller-Olm and O. Rüthing. The complexity of constant propagation. In D. Sands, editor, ESOP 2001, LNCS 2028, pages 190–205. Springer, 2001.Google Scholar
- 17.J. R. Reif and H. R. Lewis. Symbolic evaluation and the global value graph. In Conf. Rec. 4th ACM Symposium on Principles of Programming Languages POPL’77, pages 104–118, Los Angeles, CA, January 1977.Google Scholar
- 20.F. Winkler. Polynomial Algorithms. Springer-Verlag, 1996.Google Scholar