Advertisement

Checking Herbrand Equalities and Beyond

  • Markus Müller-Olm
  • Oliver Rüthing
  • Helmut Seidl
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3385)

Abstract

A Herbrand equality between expressions in a program is an equality which holds relative to the Herbrand interpretation of operators. We show that the problem of checking validity of positive Boolean combinations of Herbrand equalities at a given program point is decidable – even in presence of disequality guards. This result vastly extends the reach of classical methods for global value numbering which cannot deal with disjunctions and are always based on an abstraction of conditional branching with non-deterministic choice. In order to introduce our analysis technique in a simpler scenario we also give an alternative proof that in the classic setting, where all guards are ignored, conjunctions of Herbrand equalities can be checked in polynomial time. As an application of our method, we show how to derive all valid Herbrand constants in programs with disequality guards. Finally, we present a PSPACE lower bound and show that in presence of equality guards instead of disequality guards, it is undecidable to check whether a given Herbrand equality holds or not.

Keywords

Polynomial Time Complete Lattice Constraint System Ground Term Program Point 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alpern, B., Wegman, M., Zadeck, F.K.: Detecting Equality of Variables in Programs. In: 15th ACM Symp. on Principles of Programming Languages (POPL), pp. 1–11 (1988)Google Scholar
  2. 2.
    Briggs, P., Cooper, K.D., Simpson, L.T.: Value Numbering. Software- Practice and Experience 27(6), 701–724 (1997)CrossRefGoogle Scholar
  3. 3.
    Click, C., Cooper, K.D.: Combining Analyses, Combining Optimizations. ACM Transactions on Programming Languages and Systems 17(2), 181–196 (1995)CrossRefGoogle Scholar
  4. 4.
    Cocke, J., Schwartz, J.T.: Programming Languages and Their Compilers. Courant Institute of Mathematical Sciences, NY (1970)zbMATHGoogle Scholar
  5. 5.
    Duffy, D.: Principles of Automated Theorem Proving. Wiley, Chichester (1991)zbMATHGoogle Scholar
  6. 6.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, New York (1978)Google Scholar
  7. 7.
    Gargi, K.: A Sparse Algorithm for Predicated Global Value Numbering. In: ACM Conf. on Programming Language Design and Implementation (PLDI), pp. 45–56 (2002)Google Scholar
  8. 8.
    Gulwani, S., Necula, G.C.: A Polynomial-time Algorithm for Global Value Numbering. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 212–227. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  9. 9.
    Gulwani, S., Necula, G.C.: Global Value Numbering Using Random Interpretation. In: 31st ACM Symp. on Principles of Programming Languages (POPL), pp. 342–352 (2004)Google Scholar
  10. 10.
    Kam, J.B., Ullman, J.D.: Monotone data flow analysis frameworks. Technical Report 169, Department of Electrical Engineering, Princeton University, Princeton, NJ (1975)Google Scholar
  11. 11.
    Kildall, G.A.: A Unified Approach to Global Program Optimization. In: First ACM Symp. On Principles of Programming Languages (POPL), pp. 194–206 (1973)Google Scholar
  12. 12.
    Knoop, J., Rüthing, O., Steffen, B.: Code motion and code placement: Just synonyms? In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 154–196. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  13. 13.
    Müller-Olm, M., Rüthing, O.: The Complexity of Constant Propagation. In: Sands, D. (ed.) ESOP 2001. LNCS, vol. 2028, pp. 190–205. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    Müller-Olm, M., Seidl, H.: Polynomial Constants are Decidable. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 4–19. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  15. 15.
    Müller-Olm, M., Seidl, H.: A Note on Karr’s Algorithm. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 1016–1028. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. 16.
    Müller-Olm, M., Seidl, H.: Computing Polynomial Program Invariants. Information Processing Letters (IPL) 91(5), 233–244 (2004)zbMATHCrossRefGoogle Scholar
  17. 17.
    Müller-Olm, M., Seidl, H.: Precise Interprocedural Analysis through Linear Algebra. In: 31st ACM Symp. on Principles of Programming Languages (POPL), pp. 330–341 (2004)Google Scholar
  18. 18.
    Reif, J.H., Lewis, R.: Symbolic Evaluation and the Gobal Value Graph. In: 4th ACMSymp. on Principles of Programming Languages (POPL), pp. 104–118 (1977)Google Scholar
  19. 19.
    Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Global Value Numbers and Redundant Computations. In: 15th ACM Symp. on Principles of Programming Languages (POPL), pp. 12–27 (1988)Google Scholar
  20. 20.
    Rüthing, O., Knoop, J., Steffen, B.: Detecting Equalities of Variables: Combining Efficiency with Precision. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 232–247. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  21. 21.
    Steffen, B., Knoop, J., Rüthing, O.: The Value Flow Graph: A Program Representation for Optimal Program Transformations. In: Jones, N.D. (ed.) ESOP 1990. LNCS, vol. 432, pp. 389–405. Springer, Heidelberg (1990)Google Scholar
  22. 22.
    Steffen, B., Knoop, J., Rüthing, O.: Efficient Code Motion and an Adaption to Strength Reduction. In: Abramsky, S. (ed.) TAPSOFT 1991, CCPSD 1991, and ADC-Talks 1991. LNCS, vol. 494, pp. 394–415. Springer, Heidelberg (1991)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Markus Müller-Olm
    • 1
  • Oliver Rüthing
    • 1
  • Helmut Seidl
    • 2
  1. 1.FB 4, LS VUniversität DortmundDortmundGermany
  2. 2.Informatik, I2TU MünchenGarchingGermany

Personalised recommendations