Skip to main content

Scaling CFL-Reachability-Based Points-To Analysis Using Context-Sensitive Must-Not-Alias Analysis

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5653))

Abstract

Pointer analyses derived from a Context-Free-Language (CFL) reachability formulation achieve very high precision, but they do not scale well to compute the points-to solution for an entire large program. Our goal is to increase significantly the scalability of the currently most precise points-to analysis for Java. This CFL-reachability analysis depends on determining whether two program variables may be aliases. We propose an efficient but less precise pre-analysis that computes context-sensitive must-not-alias information for all pairs of variables. Later, these results can be used to quickly filter out infeasible CFL-paths during the more precise points-to analysis. Several novel techniques are employed to achieve precision and efficiency, including a new approximate CFL-reachability formulation of alias analysis, as well as a carefully-chosen trade-off in context sensitivity. The approach effectively reduces the search space of the points-to analysis: the modified points-to analysis is more than three times faster than the original analysis.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Das, M., Lerner, S., Seigle, M.: ESP: Path-sensitive program verification in polynomial time. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 57–68 (2002)

    Google Scholar 

  2. Fink, S., Yahav, E., Dor, N., Ramalingam, G., Geay, E.: Effective typestate verification in the presence of aliasing. In: ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 133–144 (2006)

    Google Scholar 

  3. Naik, M., Aiken, A., Whaley, J.: Effective static race detection for Java. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 308–319 (2006)

    Google Scholar 

  4. Voung, J.W., Jhala, R., Lerner, S.: RELAY: Static race detection on millions of lines of code. In: ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pp. 205–214 (2007)

    Google Scholar 

  5. Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems 12(1), 26–60 (1990)

    Article  Google Scholar 

  6. Sridharan, M., Bodik, R.: Refinement-based context-sensitive points-to analysis for Java. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 387–400 (2006)

    Google Scholar 

  7. Zheng, X., Rugina, R.: Demand-driven alias analysis for C. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 197–208 (2008)

    Google Scholar 

  8. Reps, T.: Program analysis via graph reachability. Information and Software Technology 40(11-12), 701–726 (1998)

    Article  Google Scholar 

  9. Sridharan, M. (2006), http://www.sable.mcgill.ca/pipermail/soot-list/2006-January/000477.html

  10. Kahlon, V.: Bootstrapping: A technique for scalable flow and context-sensitive pointer alias analysis. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 249–259 (2008)

    Google Scholar 

  11. Lhoták, O., Hendren, L.: Context-sensitive points-to analysis: Is it worth it? In: International Conference on Compiler Construction, pp. 47–64 (2006)

    Google Scholar 

  12. Xu, G., Rountev, A.: Merging equivalent contexts for scalable heap-cloning-based context-sensitive points-to analysis. In: ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 225–235 (2008)

    Google Scholar 

  13. Kodumal, J., Aiken, A.: The set constraint/CFL reachability connection in practice. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 207–218 (2004)

    Google Scholar 

  14. Soot Framework, http://www.sable.mcgill.ca/soot

  15. Vallée-Rai, R., Gagnon, E., Hendren, L., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java bytecode using the Soot framework: Is it feasible? In: International Conference on Compiler Construction, pp. 18–34 (2000)

    Google Scholar 

  16. Sridharan, M., Gopan, D., Shan, L., Bodik, R.: Demand-driven points-to analysis for Java. In: ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 59–76 (2005)

    Google Scholar 

  17. Chatterjee, R., Ryder, B.G., Landi, W.: Relevant context inference. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 133–146 (1999)

    Google Scholar 

  18. Wilson, R., Lam, M.: Efficient context-sensitive pointer analysis for C programs. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 1–12 (1995)

    Google Scholar 

  19. Cheng, B., Hwu, W.: Modular interprocedural pointer analysis using access paths. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 57–69 (2000)

    Google Scholar 

  20. Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 187–206 (1999)

    Google Scholar 

  21. Melski, D., Reps, T.: Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science 248, 29–98 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  22. Rehof, J., Fähndrich, M.: Type-based flow analysis: From polymorphic subtyping to CFL-reachability. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 54–66 (2001)

    Google Scholar 

  23. Kodumal, J., Aiken, A.: Regularly annotated set constraints. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 331–341 (2007)

    Google Scholar 

  24. Nystrom, E., Kim, H., Hwu, W.: Importance of heap specialization in pointer analysis. In: PASTE, pp. 43–48 (2004)

    Google Scholar 

  25. Lattner, C., Lenharth, A., Adve, V.: Making context-sensitive points-to analysis with heap cloning practical for the real world. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 278–289 (2007)

    Google Scholar 

  26. Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Muchnick, S., Jones, N. (eds.) Program Flow Analysis: Theory and Applications, pp. 189–234. Prentice-Hall, Englewood Cliffs (1981)

    Google Scholar 

  27. Lhoták, O., Hendren, L.: Scaling java points-to analysis using SPARK. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 153–169. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  28. Hind, M.: Pointer analysis: Haven’t we solved this problem yet? In: PASTE, pp. 54–61 (2001)

    Google Scholar 

  29. Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 49–61 (1995)

    Google Scholar 

  30. Horwitz, S., Reps, T., Sagiv, M.: Demand interprocedural dataflow analysis. In: ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pp. 104–115 (1995)

    Google Scholar 

  31. Reps, T.: Solving demand versions of interprocedural analysis problems. In: Fritzson, P.A. (ed.) CC 1994. LNCS, vol. 786, pp. 389–403. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  32. Reps, T., Horwitz, S., Sagiv, M., Rosay, G.: Speeding up slicing. In: ACM SIGSOFT International Symposium on the Foundations of Software Engineering, pp. 11–20 (1994)

    Google Scholar 

  33. Naik, M., Aiken, A.: Conditional must not aliasing for static race detection. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 327–338 (2007)

    Google Scholar 

  34. Rountev, A., Chandra, S.: Off-line variable substitution for scaling points-to analysis. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 47–56 (2000)

    Google Scholar 

  35. Hardekopf, B., Lin, C.: The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 290–299 (2007)

    Google Scholar 

  36. Berndl, M., Lhoták, O., Qian, F., Hendren, L., Umanee, N.: Points-to analysis using BDDs. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 103–114 (2003)

    Google Scholar 

  37. Lhoták, O., Hendren, L.: Jedd: A BDD-based relational extension of Java. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 158–169 (2004)

    Google Scholar 

  38. Whaley, J., Lam, M.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 131–144 (2004)

    Google Scholar 

  39. Zhu, J., Calman, S.: Symbolic pointer analysis revisited. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 145–157 (2004)

    Google Scholar 

  40. Bravenboer, M., Smaragdakis, Y.: Doop framework for Java pointer analysis (2009), doop.program-analysis.org

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Xu, G., Rountev, A., Sridharan, M. (2009). Scaling CFL-Reachability-Based Points-To Analysis Using Context-Sensitive Must-Not-Alias Analysis. In: Drossopoulou, S. (eds) ECOOP 2009 – Object-Oriented Programming. ECOOP 2009. Lecture Notes in Computer Science, vol 5653. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03013-0_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-03013-0_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-03012-3

  • Online ISBN: 978-3-642-03013-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics