Advertisement

Scalable Flow-Sensitive Pointer Analysis for Java with Strong Updates

  • Arnab De
  • Deepak D’Souza
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7313)

Abstract

The ability to perform strong updates is the main contributor to the precision of flow-sensitive pointer analysis algorithms. Traditional flow-sensitive pointer analyses cannot strongly update pointers residing in the heap. This is a severe restriction for Java programs. In this paper, we propose a new flow-sensitive pointer analysis algorithm for Java that can perform strong updates on heap-based pointers effectively. Instead of points-to graphs, we represent our points-to information as maps from access paths to sets of abstract objects. We have implemented our analysis and run it on several large Java benchmarks. The results show considerable improvement in precision over the points-to graph based flow-insensitive and flow-sensitive analyses, with reasonable running time.

Keywords

Binary Decision Diagram Access Path Program Fragment Program Language Design Interprocedural Analysis 
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.
    Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994)Google Scholar
  2. 2.
    Berndl, M., Lhoták, O., Qian, F., Hendren, L., Umanee, N.: Points-to analysis using bdds. In: PLDI 2003: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, pp. 103–114. ACM, New York (2003)CrossRefGoogle Scholar
  3. 3.
    Bravenboer, M., Smaragdakis, Y.: Strictly declarative specification of sophisticated points-to analyses. In: Proceeding of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2009, pp. 243–262. ACM, New York (2009)CrossRefGoogle Scholar
  4. 4.
    Bryant, R.E.: Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput. 35, 677–691 (1986)zbMATHCrossRefGoogle Scholar
  5. 5.
    Chang, W., Streiff, B., Lin, C.: Efficient and extensible security enforcement using dynamic data flow analysis. In: Proceedings of the 15th ACM Conference on Computer and Communications Security, CCS 2008, pp. 39–50. ACM, New York (2008)CrossRefGoogle Scholar
  6. 6.
    Choi, J.-D., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1993, pp. 232–245. ACM, New York (1993)CrossRefGoogle Scholar
  7. 7.
    Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, PLDI 1994, pp. 242–256. ACM, New York (1994)CrossRefGoogle Scholar
  8. 8.
    Fink, S.J., Yahav, E., Dor, N., Ramalingam, G., Geay, E.: Effective typestate verification in the presence of aliasing. ACM Trans. Softw. Eng. Methodol. 17, 9:1–9:34 (2008)Google Scholar
  9. 9.
    Guyer, S.Z., Lin, C.: Error checking with client-driven pointer analysis. Sci. Comput. Program. 58, 83–114 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Hardekopf, B., Lin, C.: The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. SIGPLAN Not. 42(6), 290–299 (2007)CrossRefGoogle Scholar
  11. 11.
    Hardekopf, B., Lin, C.: Semi-sparse flow-sensitive pointer analysis. In: Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, pp. 226–238. ACM, New York (2009)Google Scholar
  12. 12.
    Hardekopf, B., Lin, C.: Flow-sensitive pointer analysis for millions of lines of code. In: 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO), pp. 289–298 (April 2011)Google Scholar
  13. 13.
    Hasti, R., Horwitz, S.: Using static single assignment form to improve flow-insensitive pointer analysis. In: PLDI 1998: Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 97–105. ACM, New York (1998)CrossRefGoogle Scholar
  14. 14.
    Heintze, N., Tardieu, O.: Ultra-fast aliasing analysis using cla: a million lines of c code in a second. In: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, PLDI 2001, pp. 254–263. ACM, New York (2001)CrossRefGoogle Scholar
  15. 15.
    Hind, M., Burke, M., Carini, P., Choi, J.-D.: Interprocedural pointer alias analysis. ACM Trans. Program. Lang. Syst. 21, 848–894 (1999)CrossRefGoogle Scholar
  16. 16.
    Hind, M., Pioli, A.: Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 57–81. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  17. 17.
    Hind, M., Pioli, A.: Which pointer analysis should i use? In: ISSTA 2000: Proceedings of the 2000 ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 113–123. ACM, New York (2000)Google Scholar
  18. 18.
    Kahlon, V.: Bootstrapping: a technique for scalable flow and context-sensitive pointer alias analysis. In: PLDI 2008: Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 249–259. ACM, New York (2008)CrossRefGoogle Scholar
  19. 19.
    Kildall, G.A.: A unified approach to global program optimization. In: POPL 1973: Proceedings of the 1st Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 194–206. ACM, New York (1973)CrossRefGoogle Scholar
  20. 20.
    Landi, W., Ryder, B.G.: A safe approximate algorithm for interprocedural aliasing. In: PLDI 1992: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, pp. 235–248. ACM, New York (1992)CrossRefGoogle Scholar
  21. 21.
    Lhoták, O., Chung, K.-C.A.: Points-to analysis with efficient strong updates. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, pp. 3–16. ACM, New York (2011)Google Scholar
  22. 22.
    Li, L., Cifuentes, C., Keynes, N.: Boosting the performance of flow-sensitive points-to analysis using value flow. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, SIGSOFT/FSE 2011, pp. 343–353. ACM, New York (2011)CrossRefGoogle Scholar
  23. 23.
    Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol. 14, 1–41 (2005)CrossRefGoogle Scholar
  24. 24.
    Naik, M.: jchord: A static and dynamic program analysis platform for java, http://code.google.com/p/jchord/
  25. 25.
    Nystrom, E.M., Kim, H.-S., Hwu, W.-m.W.: Bottom-Up and Top-Down Context-Sensitive Summary-Based Pointer Analysis. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 165–180. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  26. 26.
    Pearce, D.J.: Some directed graph algorithms and their application to pointer analysis. PhD thesis, University of London, Imperial College of Science, Technology and Medicine, Department of Computing (2005)Google Scholar
  27. 27.
    Pearce, D.J., Kelly, P.H., Hankin, C.: Efficient field-sensitive pointer analysis of c. ACM Trans. Program. Lang. Syst. 30(1) (November 2007)Google Scholar
  28. 28.
    Salcianu, A., Rinard, M.: Pointer and escape analysis for multithreaded programs. In: PPoPP 2001: Proceedings of the Eighth ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming, pp. 12–23. ACM, New York (2001)CrossRefGoogle Scholar
  29. 29.
    Shapiro II, M., Horwitz, S.: The Effects of the Precision of Pointer Analysis. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 16–34. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  30. 30.
    Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis, ch.7, pp. 189–234. Prentice-Hall, Englewood Cliffs (1981)Google Scholar
  31. 31.
    Steensgaard, B.: Points-to analysis in almost linear time. In: POPL 1996: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 32–41. ACM, New York (1996)CrossRefGoogle Scholar
  32. 32.
    Ullman, J.D.: Principles of Database and Knowledge-Base Systems: Volume II: The New Technologies. W. H. Freeman & Co., New York (1990)Google Scholar
  33. 33.
    Whaley, J.: Context-Sensitive Pointer Analysis using Binary Decision Diagrams. PhD thesis, Stanford University (March 2007)Google Scholar
  34. 34.
    Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, PLDI 2004, pp. 131–144. ACM, New York (2004)CrossRefGoogle Scholar
  35. 35.
    Whaley, J., Rinard, M.: Compositional pointer and escape analysis for java programs. In: OOPSLA 1999: Proceedings of the 14th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, pp. 187–206. ACM, New York (1999)CrossRefGoogle Scholar
  36. 36.
    Whaley, J., Unkel, C., Lam, M.S.: A bdd-based deductive database for program analysis (2004), http://suif.stanford.edu/bddbddb
  37. 37.
    Wilson, R.P., Lam, M.S.: Efficient context-sensitive pointer analysis for c programs. In: Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation, PLDI 1995, pp. 1–12. ACM, New York (1995)CrossRefGoogle Scholar
  38. 38.
    Yu, H., Xue, J., Huo, W., Feng, X., Zhang, Z.: Level by level: making flow- and context-sensitive pointer analysis scalable for millions of lines of code. In: Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2010, pp. 218–229. ACM, New York (2010)CrossRefGoogle Scholar
  39. 39.
    Zhu, J.: Towards scalable flow and context sensitive pointer analysis. In: Proceedings of the 42nd Annual Design Automation Conference, DAC 2005, pp. 831–836. ACM, New York (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Arnab De
    • 1
  • Deepak D’Souza
    • 1
  1. 1.Department of Computer Science and AutomationIndian Institute of ScienceBangaloreIndia

Personalised recommendations