Scaling Java Points-to Analysis Using Spark
Most points-to analysis research has been done on different systems by different groups, making it difficult to compare results, and to understand interactions between individual factors each group studied. Furthermore, pointsto analysis for Java has been studied much less thoroughly than for C, and the tradeoffs appear very different. We introduce Spark, a flexible framework for experimenting with points-to analyses for Java. Spark supports equality- and subset-based analyses, variations in field sensitivity, respect for declared types, variations in call graph construction, off-line simplification, and several solving algorithms. Spark is composed of building blocks on which new analyses can be based.
We demonstrate Spark in a substantial study of factors affecting precision and efficiency of subset-based points-to analyses, including interactions between these factors. Our results show that Spark is not only flexible and modular, but also offers superior time/space performance when compared to other points-to analysis implementations.
KeywordsVariable Node Call Graph Class Library Call Site Order Binary Decision Diagram
- 5.A. Aiken, M. Fähndrich, J. S. Foster, and Z. Su. Atoolkit for constructing type-and constraintbased program analyses. In Types in Compilation, Second International Workshop, TIC’ 98, volume 1473 of LNCS, pages 78–96, 1998.Google Scholar
- 6.L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, May 1994. (DIKU report 94/19).Google Scholar
- 7.D. F. Bacon and P. F. Sweeney. Fast static analysis ofC++virtual function calls. In Proceedings of the 1996 OOPSLA, pages 324–341, 1996.Google Scholar
- 9.J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP’95-Object-Oriented Programming, 9th European Conference, volume 952 of LNCS, pages 77–101, Aug. 1995.Google Scholar
- 10.A. Diwan, K. S. McKinley, and J. E. B. Moss. Type-based alias analysis. In Proceedings of PLDI’98, pages 106–117, 1998.Google Scholar
- 11.M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of PLDI’94, pages 242–256, 1994.Google Scholar
- 12.M. Fähndrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In Proceedings of PLDI’98, pages 85–96, June 1998.Google Scholar
- 13.N. Heintze. Analysis of large code bases: The compile-link-analyze model. http://cm.bell-labs.com/cm/cs/who/nch/cla.ps, 1999.
- 14.N. Heintze and O. Tardieu. Demand-driven pointer analysis. In Proceedings of PLDI’01, pages 24–34, 2001.Google Scholar
- 16.M. Hind. Pointer analysis: Haven’t we solved this problem yet? In Proceedings of PASTE’01, pages 54–61, June 2001.Google Scholar
- 17.D. Liang, M. Pennings, and M. J. Harrold. Extending and evaluating flow-insensitive and context-insensitive points-to analyses for Java. In Proceedings of PASTE’01, pages 73–79, 2001.Google Scholar
- 19.A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analysis. In Proceedings of PLDI’00, pages 47–56, Jun 2000.Google Scholar
- 20.A. Rountev, A. Milanova, and B. G. Ryder. Points-to analysis for Java using annotated constraints. In Proceedings of the 2001 OOPSLA, pages 43–55, 2001.Google Scholar
- 21.M. Shapiro and S. Horwitz. Fast and accurate flow-insensitive points-to analysis. In Conference Record of 24th POPL’ 97, pages 1–14, Jan. 1997.Google Scholar
- 22.B. Steensgaard. Points-to analysis in almost linear time. In Conference Record of 23rd POPL’96, pages 32–41, Jan. 1996.Google Scholar
- 23.Z. Su, M. Fähndrich, and A. Aiken. Projection merging: reducing redundancies in inclusion constraint graphs. In Proceedings of the 27th POPL’00, pages 81–95, 2000.Google Scholar
- 24.V. Sundaresan, L. Hendren, C. Razafimahefa, R. Vallée-Rai, P. Lam, E. Gagnon, and C. Godin. Practical virtual method call resolution for Java. In Proceedings of the 2000 OOPSLA, pages 264–280, 2000.Google Scholar
- 27.J. Whaley and M. Lam. An efficient inclusion-based points-to analysis for strictly-typed languages. In Static Analysis 9th International Symposium, SAS 2002, volume 2477 of LNCS, pages 180–195, 2002.Google Scholar