skip to main content
research-article
Free Access

Fast interprocedural linear two-variable equalities

Published:03 January 2012Publication History
Skip Abstract Section

Abstract

In this article we provide an interprocedural analysis of linear two-variable equalities. The novel algorithm has a worst-case complexity of 𝒪(nk4), where k is the number of variables and n is the program size. Thus, it saves a factor of k4 in comparison to a related algorithm based on full linear algebra. We also indicate how the practical runtime can be further reduced significantly. The analysis can be applied, for example, for register coalescing, for identifying local variables and thus for interprocedurally observing stack pointer modifications as well as for an analysis of array index expressions, when analyzing low-level code.

References

  1. Alpern, B., Wegman, M., and Zadeck, F. K. 1988. Detecting equality of variables in programs. In Proceedings of the 15th ACM Symposium on Principles of Programming Languages (POPL). ACM, New York, 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Fecht, C. and Seidl, H. 1998. Propagating differences: An efficient new fixpoint algorithm for distributive constraint systems. Nord. J. Comput. 5, 4, 304--329. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. George, L. and Appel, A. W. 1996. Iterated register coalescing. ACM Trans. Program. Lang. Syst. 18, 3, 300--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Gulwani, S. and Necula, G. C. 2004. A polynomial-time algorithm for global value numbering. In Proceedings of the 11th International Static Analysis Symposium (SAS). Lecture Notes in Computer Science, vol. 3148, Springer, Berlin, 212--227.Google ScholarGoogle Scholar
  5. Horwitz, S., Reps, T. W., and Sagiv, M. 1995. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the 22nd ACM Symposium on Principles of Programming Languages (POPL). ACM, New York, 49--61. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Knoop, J. and Steffen, B. 1992. The interprocedural coincidence theorem. In Proceedings of the Compiler Construction Conference (CC). Lecture Notes in Computer Science, vol. 541, Springer, Berlin, 125--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Miné, A. 2001a. A new numerical abstract domain based on difference bound matrices. In Proceedings of the 2d Symposium on Programs as Data Objects (PADO II). Lecture Notes in Computer Science, vol. 2053, Springer, Berlin, 155--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Miné, A. 2001b. The octagon abstract domain. In Proceedings of the Workshop on Analysis, Slicing, and Transformation (AST). IEEE, Los Alamitos, CA, 310--319. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Müller-Olm, M., Rüthing, O., and Seidl, H. 2005. Checking Herbrand equalities and beyond. In Proceedings of the International Conference on Verification, Model-Checking and Abstract Interpretation (VMCAI). Lecture Notes in Computer Science, vol. 3385, Springer, Berlin, 79--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Müller-Olm, M. and Seidl, H. 2004. Precise interprocedural analysis through linear algebra. In Proceedings of the 31st ACM Symposium on Principles of Programming Languages (POPL). ACM, New York, 330--341. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Müller-Olm, M., Seidl, H., and Steffen, B. 2005. Interprocedural Herbrand equalities. In Proceedings of the 14th European Symposium on Programming (ESOP). Lecture Notes in Computer Science, vol. 3444, Springer, Berlin, 31--45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Müller-Olm, M. and Seidl, H. 2007. Analysis of modular arithmetic. ACM Trans. Program. Lang. Syst. 29, 5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Müller-Olm, M. and Seidl, H. 2008. Upper adjoints for fast inter-procedural variable equalities. In Proceedings of the 17th European Symposium on Programming (ESOP). Lecture Notes in Computer Science, vol. 4960, Springer, Berlin. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Sagiv, S., Reps, T. W., and Horwitz, S. 1996. Precise interprocedural dataflow analysis with applications to constant propagation. Theor. Comput. Sci. 167, 1/2, 131--170. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sankaranarayanan, S., Sipma, H., and Manna, Z. 2005. Scalable analysis of linear systems using mathematical programming. In Proceedings of the 6th International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI). Lecture Notes in Computer Science, vol. 3385, Springer, Berlin, 25--41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Sharir, M. and Pnueli, A. 1981. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Application, Prentice Hall, Englewood Cliffs, NJ, 189--234.Google ScholarGoogle Scholar
  17. Simon, A., King, A., and Howe, J. M. 2002. Two variables per linear inequality as an abstract domain. In Proceedings of the Conference on Logic Based Program Development and Transformation (LOPSTR). Lecture Notes in Computer Science, vol. 2664, Springer, Berlin, 71--89. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Steffen, B., Knoop, J., and Rüthing, O. 1990. The value flow graph: A program representation for optimal program transformations. In Proceedings of the 3rd European Symposium on Programming (ESOP). Lecture Notes in Computer Science, vol. 432, Springer, Berlin, 389--405. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Votum. 2010. http://www2.in.tum.de/votum.Google ScholarGoogle Scholar
  20. Zucker, S. and Karhi, K. 1995. System V application binary interface: PowerPC processor supplement. http://refspecs.freestandards.org/elf/elfspec_ppc.pdf.Google ScholarGoogle Scholar

Index Terms

  1. Fast interprocedural linear two-variable equalities

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in

                    Full Access

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader
                    About Cookies On This Site

                    We use cookies to ensure that we give you the best experience on our website.

                    Learn more

                    Got it!