Abstract
We present the results of an empirical study evaluating the precision of subset-based points-to analysis with several variations of context sensitivity on Java benchmarks of significant size. We compare the use of call site strings as the context abstraction, object sensitivity, and the BDD-based context-sensitive algorithm proposed by Zhu and Calman, and by Whaley and Lam. Our study includes analyses that context-sensitively specialize only pointer variables, as well as ones that also specialize the heap abstraction. We measure both characteristics of the points-to sets themselves, as well as effects on the precision of client analyses. To guide development of efficient analysis implementations, we measure the number of contexts, the number of distinct contexts, and the number of distinct points-to sets that arise with each context sensitivity variation. To evaluate precision, we measure the size of the call graph in terms of methods and edges, the number of devirtualizable call sites, and the number of casts statically provable to be safe.
The results of our study indicate that object-sensitive analysis implementations are likely to scale better and more predictably than the other approaches; that object-sensitive analyses are more precise than comparable variations of the other approaches; that specializing the heap abstraction improves precision more than extending the length of context strings; and that the profusion of cycles in Java call graphs severely reduces precision of analyses that forsake context sensitivity in cyclic regions.
This work was supported, in part, by NSERC and an IBM Ph.D. Fellowship.
Chapter PDF
References
Agesen, O.: The Cartesian Product Algorithm. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 2–51. Springer, Heidelberg (1995)
Aiken, A., Faehndrich, M., Foster, J.S., Su, Z.: A toolkit for constructing type- and constraint-based program analyses. In: Leroy, X., Ohori, A. (eds.) TIC 1998. LNCS, vol. 1473, pp. 78–96. Springer, Heidelberg (1998)
Berndl, M., Lhoták, O., Qian, F., Hendren, L., Umanee, N.: Points-to analysis using BDDs. In: Proceedings of PLDI 2003, pp. 103–114 (2003)
Burke, M., Carini, P., Choi, J., Hind, M.: Interprocedural pointer alias analysis. Technical Report RC 21055, IBM T. J. Watson Research Center (December 1997)
DaCapo Benchmark Suite, http://www-ali.cs.umass.edu/DaCapo/gcbm.html
Dean, J., Grove, D., Chambers, C.: Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)
Dufour, B.: Objective quantification of program behaviour using dynamic metrics. Master’s thesis, McGill University (June 2004)
Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proceedings of PLDI 1994, pp. 242–256 (1994)
Heintze, N.: Analysis of large code bases: the compile-link-analyze model (1999), http://cm.bell-labs.com/cm/cs/who/nch/cla.ps
Hind, M.: Pointer analysis: haven’t we solved this problem yet? In: Proceedings of PASTE 2001, pp. 54–61. ACM Press, New York (2001)
Hind, M., Burke, M., Carini, P., Choi, J.-D.: Interprocedural pointer alias analysis. ACM Trans. Program. Lang. Syst. 21(4), 848–894 (1999)
Lhoták, O.: Program Analysis using Binary Decision Diagrams. PhD thesis, McGill University (Jan 2006)
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)
Lhoták, O., Hendren, L.: Jedd: a BDD-based relational extension of Java. In: Proceedings of PLDI 2004, pp. 158–169. ACM Press, New York (2004)
Liang, D., Harrold, M.J.: Efficient points-to analysis for whole-program analysis. In: Nierstrasz, O., Lemoine, M. (eds.) ESEC 1999 and ESEC-FSE 1999. LNCS, vol. 1687, pp. 199–215. Springer, Heidelberg (1999)
Liang, D., Pennings, M., Harrold, M.J.: Evaluating the impact of context-sensitivity on andersen’s algorithm for Java programs. In: PASTE 2005. ACM Press, New York (2005)
Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to and side-effect analyses for Java. In: Proceedings of ISSTA 2002, pp. 1–11. ACM Press, New York (2002)
Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol. 14(1), 1–41 (2005)
Nystrom, E.M., Kim, H.-S., Hwu, W.-m.W.: Importance of heap specialization in pointer analysis. In: Proceedings of PASTE 2004, pp. 43–48. ACM Press, New York (2004)
Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)
Rountev, A., Milanova, A., Ryder, B.G.: Points-to analysis for Java using annotated constraints. In: Proceedings OOPSLA 2001, pp. 43–55. ACM Press, New York (2001)
Ruf, E.: Context-insensitive alias analysis reconsidered. In: Proceedings of the Conference on Programming Language Design and Implementation, pp. 13–22. ACM Press, New York (1995)
Ryder, B.G.: Dimensions of Precision in Reference Analysis of Object-Oriented Programming Languages. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 126–137. Springer, Heidelberg (2003)
Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications, ch.7, pp. 189–233. Prentice-Hall, Englewood Cliffs (1981)
Shivers, O.: Control flow analysis in scheme. In: Proceedings of PLDI 1988, pp. 164–174 (1988)
SPEC JVM 1998 Benchmarks, http://www.spec.org/osg/jvm98/
Vallée-Rai, R.: Ashes suite collection, http://www.sable.mcgill.ca/ashes/
Wang, T., Smith, S.F.: Precise constraint-based type inference for Java. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 99–117. Springer, Heidelberg (2001)
Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proceedings of PLDI 2004, pp. 131–144. ACM Press, New York (2004)
Wilson, R.P., Lam, M.S.: Efficient context-sensitive pointer analysis for C programs. In: Proceedings of PLDI 1995, pp. 1–12. ACM Press, New York (1995)
Zhu, J., Calman, S.: Symbolic pointer analysis revisited. In: Proceedings of PLDI 2004, pp. 145–157. ACM Press, New York (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lhoták, O., Hendren, L. (2006). Context-Sensitive Points-to Analysis: Is It Worth It?. In: Mycroft, A., Zeller, A. (eds) Compiler Construction. CC 2006. Lecture Notes in Computer Science, vol 3923. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11688839_5
Download citation
DOI: https://doi.org/10.1007/11688839_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-33050-9
Online ISBN: 978-3-540-33051-6
eBook Packages: Computer ScienceComputer Science (R0)