Abstract
Pointer analysis is at the heart of most interprocedural program analyses. However, scaling pointer analysis to large programs is extremely challenging. In this article, we study incremental pointer analysis and present a new algorithm for computing the points-to information incrementally (i.e., upon code insertion, deletion, and modification). Underpinned by new observations of incremental pointer analysis, our algorithm significantly advances the state of the art in that it avoids redundant computations and the expensive graph reachability analysis, and preserves precision as the corresponding whole program exhaustive analysis. Moreover, it is parallel within each iteration of fixed-point computation. We have implemented our algorithm, IPA, for Java based on the WALA framework and evaluated its performance extensively on real-world large, complex applications. Experimental results show that IPA achieves more than 200X speedups over existing incremental algorithms, two to five orders of magnitude faster than whole program pointer analysis, and also improves the performance of an incremental data race detector by orders of magnitude. Our IPA implementation is open source and has been adopted by WALA.
- 2018. Language Server Protocol. https://langserver.org/.Google Scholar
- Karim Ali and Ondřej Lhoták. 2012. Application-only call graph construction. In Proceedings of the 26th European Conference on Object-Oriented Programming. Springer Berlin Heidelberg, 688--712. Google Scholar
Digital Library
- Lars Ole Andersen. 1994. Program Analysis and Specialization for the C Programming Language. Ph.D. Dissertation. University of Copenhagen.Google Scholar
- Steven Arzt and Eric Bodden. 2014. Reviser: Efficiently updating IDE-/IFDS-based data-flow analyses in response to incremental program changes. In Proceedings of the 36th International Conference on Software Engineering. ACM, 288--298. Google Scholar
Digital Library
- SSA based IR in WALA. 2018. Retrieved January 23, 2019 from https://github.com/wala/WALA/wiki/Intermediate-Representation-(IR).Google Scholar
- Michael A. Bender, Jeremy T. Fineman, Seth Gilbert, and Robert E. Tarjan. 2016. A new approach to incremental cycle detection and related problems. ACM Trans. Algorithms 12, 2 (2016), 14:1--14:22. Google Scholar
Digital Library
- Gábor Bergmann, István Ráth, Tamás Szabó, Paolo Torrini, and Dániel Varró. 2012. Incremental pattern matching for the efficient computation of transitive closure. In Graph Transformations. Springer Berlin Heidelberg, 386--400. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. 2006. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 169--190. Google Scholar
Digital Library
- Eric Bodden, Andreas Sewe, Jan Sinschek, Hela Oueslati, and Mira Mezini. 2011. Taming reflection: Aiding static analysis in the presence of reflection and custom class loaders. In Proceedings of the 33rd International Conference on Software Engineering. ACM, 241--250. Google Scholar
Digital Library
- Martin Bravenboer and Yannis Smaragdakis. 2009. Exception analysis and points-to analysis: Better together. In Proceedings of the 18th International Symposium on Software Testing and Analysis. ACM, 1--12. Google Scholar
Digital Library
- Martin Bravenboer and Yannis Smaragdakis. 2009. Strictly declarative specification of sophisticated points-to analyses. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications. ACM, 243--262. Google Scholar
Digital Library
- Michael G. Burke, Paul R. Carini, Jong-Deok Choi, and Michael Hind. 1994. Flow-insensitive interprocedural alias analysis in the presence of pointers. In Proceedings of the 7th International Workshop of Languages and Compilers for Parallel Computing. Springer-Verlag, 234--250. Google Scholar
Digital Library
- Arnab De and Deepak D’Souza. 2012. Scalable flow-sensitive pointer analysis for Java with strong updates. In Proceedings of the 26th European Conference on Object-Oriented Programming. Springer-Verlag, 665--687. Google Scholar
Digital Library
- Jens Dietrich, Nicholas Hollingum, and Bernhard Scholz. 2015. Giga-scale exhaustive points-to analysis for Java in under a minute. In Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 535--551. Google Scholar
Digital Library
- Jens Dietrich, Nicholas Hollingum, and Bernhard Scholz. 2016. A note on the soundness of difference propagation. In Proceedings of the 18th Workshop on Formal Techniques for Java-like Programs. ACM, 3:1--3:5. Google Scholar
Digital Library
- LLVM discussions on pointer analysis. 2016. Retrieved January 28, 2019 from http://lists.llvm.org/pipermail/llvm-dev/2016-March/096851.html.Google Scholar
- Marcus Edvinsson, Jonas Lundberg, and Welf Löwe. 2011. Parallel points-to analysis for multi-core machines. In Proceedings of the 6th International Conference on High Performance and Embedded Architectures and Compilers. ACM, 45--54. Google Scholar
Digital Library
- Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. 1994. 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. ACM, 242--256. Google Scholar
Digital Library
- Charles L. Forgy. 1982. Rete: A fast algorithm for the many pattern/many object pattern match problem. Artif. Intell. 19, 1 (1982), 17--37. Google Scholar
Digital Library
- Neville Grech and Yannis Smaragdakis. 2017. P/Taint: Unified points-to and taint analysis. Proceedings of the ACM on Programming Languages (OOPSLA’17). ACM, 102:1--102:28. Google Scholar
Digital Library
- David Grove and Craig Chambers. 2001. A framework for call graph construction algorithms. ACM Trans. Program. Lang. Syst. 23, 6 (2001), 685--746. Google Scholar
Digital Library
- Ashish Gupta, Inderpal Singh Mumick, and V. S. Subrahmanian. 1993. Maintaining views incrementally. In Proceedings of the ACM SIGMOD International Conference on Management of Data. ACM, 157--166. Google Scholar
Digital Library
- Ben Hardekopf and Calvin Lin. 2007. The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 290--299. Google Scholar
Digital Library
- Ben Hardekopf and Calvin Lin. 2009. Semi-sparse flow-sensitive pointer analysis. In Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 226--238. Google Scholar
Digital Library
- Ben Hardekopf and Calvin Lin. 2011. Flow-sensitive pointer analysis for millions of lines of code. In Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization. IEEE Computer Society, 289--298. Google Scholar
Digital Library
- Nevin Heintze and Olivier Tardieu. 2001. Demand-driven pointer analysis. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation. ACM, 24--34. Google Scholar
Digital Library
- Michael Hind. 2001. Pointer analysis: Haven’t we solved this problem yet?. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering. ACM, 54--61. Google Scholar
Digital Library
- Michael Hind, Michael Burke, Paul Carini, and Jong-Deok Choi. 1999. Interprocedural pointer alias analysis. ACM Trans. Program. Lang. Syst. 21, 4 (1999), 848--894. Google Scholar
Digital Library
- Pointer Analysis in WALA. 2017. Retrieved January 28, 2019 from http://wala.sourceforge.net/wiki/index.php/UserGuide:PointerAnalysis.Google Scholar
- IPA. 2018. https://github.com/april1989/Incremental_Points_to_Analysis.Google Scholar
- George Kastrinis and Yannis Smaragdakis. 2013. Efficient and effective handling of exceptions in Java points-to analysis. In Proceedings of the 22nd International Conference on Compiler Construction. Springer-Verlag, 41--60. Google Scholar
Digital Library
- George Kastrinis and Yannis Smaragdakis. 2013. Hybrid context-sensitivity for points-to analysis. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 423--434. Google Scholar
Digital Library
- J. A. La Poutré and J. van Leeuwen. 1988. Maintenance of transitive closures and transitive reductions of graphs. In Proceedings of the International Workshop on Graph-theoretic Concepts in Computer Science. Springer-Verlag, 106--120. Google Scholar
Digital Library
- William Landi and Barbara G. Ryder. 1991. Pointer-induced aliasing: A problem classification. In Proceedings of the 18th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 93--103. Google Scholar
Digital Library
- William Alexander Landi. 1992. Interprocedural Aliasing in the Presence of Pointers. Ph.D. Dissertation. Rutgers University.Google Scholar
- WALA language-independent IDE support. 2018. Retrieved January 28, 2019 from https://github.com/wala/IDE.Google Scholar
- Ondřej Lhoták. 2002. Spark: A flexible points-to analysis framework for Java. Master’s thesis. McGill University, Montreal.Google Scholar
- Ondřej Lhoták and Laurie Hendren. 2008. Evaluating the benefits of context-sensitive points-to analysis using a BDD-based implementation. ACM Trans. Softw. Eng. Methodol. 18, 1 (2008), 3:1--3:53. Google Scholar
Digital Library
- Lian Li, Cristina Cifuentes, and Nathan Keynes. 2011. 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. ACM, 343--353. Google Scholar
Digital Library
- Yue Li, Tian Tan, Yulei Sui, and Jingling Xue. 2014. Self-inferencing reflection resolution for Java. In Proceedings of the 28th European Conference on Object-Oriented Programming. Springer-Verlag, 27--53. Google Scholar
Digital Library
- Bozhen Liu and Jeff Huang. 2018. D4: Fast concurrency debugging with parallel differential analysis. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 359--373. Google Scholar
Digital Library
- Yanhong A. Liu and Scott D. Stoller. 2009. From datalog rules to efficient programs with time and space guarantees. ACM Trans. Program. Lang. Syst. 31, 6 (2009), 21:1--21:38. Google Scholar
Digital Library
- Benjamin Livshits, John Whaley, and Monica S. Lam. 2005. Reflection analysis for Java. In Proceedings of the 3rd Asian Conference on Programming Languages and Systems. Springer-Verlag, 139--160. Google Scholar
Digital Library
- LogicBlox. 2018. LogiQL. Retrieved January 28, 2019 from http://www.logicblox.com/technology/.Google Scholar
- Yi Lu, Lei Shang, Xinwei Xie, and Jingling Xue. 2013. An incremental points-to analysis with CFL-reachability. In Proceedings of the 22nd International Conference on Compiler Construction. Springer-Verlag, 61--81. Google Scholar
Digital Library
- Nick Malone, Kendra Lesser, Meeko Oishi, and Lydia Tapia. 2014. Stochastic reachability based motion planning for multiple moving obstacle avoidance. In Proceedings of the 17th International Conference on Hybrid Systems: Computation and Control. ACM, 51--60. Google Scholar
Digital Library
- Thomas J. Marlowe and Barbara G. Ryder. 1990. An efficient hybrid algorithm for incremental data flow analysis. In Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 184--196. Google Scholar
Digital Library
- Mario Méndez-Lojo, Martin Burtscher, and Keshav Pingali. 2012. A GPU implementation of inclusion-based points-to analysis. In Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. ACM, 107--116. Google Scholar
Digital Library
- Mario Méndez-Lojo, Augustine Mathew, and Keshav Pingali. 2010. Parallel inclusion-based points-to analysis. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications. ACM, 428--443. Google Scholar
Digital Library
- Ana Milanova, Atanas Rountev, and Barbara G. Ryder. 2005. Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol. 14, 1 (2005), 1--41. Google Scholar
Digital Library
- Boris Motik, Yavor Nenov, Robert Piro, and Ian Horrocks. 2015. Incremental update of datalog materialisation: The backward/forward algorithm. In Proceedings of the 29th AAAI Conference on Artificial Intelligence. AAAI Press, 1560--1568. Google Scholar
Digital Library
- Vaivaswatha Nagaraj and R. Govindarajan. 2013. Parallel flow-sensitive pointer analysis by graph-rewriting. In Proceedings of the 22nd International Conference on Parallel Architectures and Compilation Techniques. IEEE Press, 19--28. Google Scholar
Digital Library
- Y. K. Hwang and P. C. Chen. 1998. SANDROS: A dynamic graph search algorithm for motion planning. IEEE Transactions on Robotics and Automation 4, 3 (1998), 390--403.Google Scholar
- David J. Pearce, Paul H. J. Kelly, and Chris Hankin. 2007. Efficient field-sensitive pointer analysis of C. ACM Trans. Program. Lang. Syst. 30, 1 (2007). Google Scholar
Digital Library
- Sandeep Putta and Rupesh Nasre. 2012. Parallel replication-based points-to analysis. In Proceedings of the 21st International Conference on Compiler Construction. Springer-Verlag, 61--80. Google Scholar
Digital Library
- G. Ramalingam. 1994. The undecidability of aliasing. ACM Trans. Program. Lang. Syst. 16, 5 (1994), 1467--1471. Google Scholar
Digital Library
- Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 49--61. Google Scholar
Digital Library
- Barbara G. Ryder. 1983. Incremental data flow analysis. In Proceedings of the 10th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. ACM, 167--176. Google Scholar
Digital Library
- Barbara G. Ryder. 2003. Dimensions of precision in reference analysis of object-oriented programming languages. In Proceedings of the 12th International Conference on Compiler Construction. Springer-Verlag, 126--137. Google Scholar
Digital Library
- Diptikalyan Saha and C. R. Ramakrishnan. 2005. Incremental and demand-driven points-to analysis using logic programming. In Proceedings of the 7th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming. ACM, 117--128. Google Scholar
Digital Library
- Diptikalyan Saha and C. R. Ramakrishnan. 2005. Symbolic support graph: A space efficient data structure for incremental tabled evaluation. In Logic Programming. Springer Berlin Heidelberg, 235--249. Google Scholar
Digital Library
- Diptikalyan Saha and C. R. Ramakrishnan. 2006. A local algorithm for incremental evaluation of tabled logic programs. In Logic Programming. Springer Berlin Heidelberg, 56--71. Google Scholar
Digital Library
- Lei Shang, Yi Lu, and Jingling Xue. 2012. Fast and precise points-to analysis with incremental CFL-reachability summarisation: Preliminary experience. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering. ACM, 270--273. Google Scholar
Digital Library
- Olin Shivers. 1991. Control-Flow Analysis of Higher-Order Languages. Ph.D. Dissertation. Carnegie Mellon University, Pittsburgh, PA. Google Scholar
Digital Library
- Yannis Smaragdakis and George Balatsouras. 2015. Pointer analysis. Found. Trends Program. Lang. 2, 1 (2015), 1--69. Google Scholar
Digital Library
- Yannis Smaragdakis, George Kastrinis, and George Balatsouras. 2014. Introspective analysis: Context-sensitivity, across the board. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 485--495. Google Scholar
Digital Library
- Robert Smith, Aaron Sloman, and John. Gibson. 1992. POPLOG’s two-level virtual machine support for interactive languages. In Research Directions in Cognitive Science Volume 5: Artificial Intelligence. Psychology Press, 203--231.Google Scholar
- Johannes Späth, Lisa Nguyen Quang Do, Karim Ali, and Eric Bodden. 2016. Boomerang: Demand-driven flow- and context-sensitive pointer analysis for Java. In 30th European Conference on Object-Oriented Programming, Vol. 56. Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, 22:1--22:26.Google Scholar
- Vugranam C. Sreedhar, Michael Burke, and Jong-Deok Choi. 2000. A framework for interprocedural optimization in the presence of dynamic class loading. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation. ACM, 196--207. Google Scholar
Digital Library
- Vugranam C. Sreedhar, Guang R. Gao, and Yong-Fong Lee. 1998. A new framework for elimination-based data flow analysis using DJ graphs. ACM Trans. Program. Lang. Syst. 20, 2 (1998), 388--435. Google Scholar
Digital Library
- Manu Sridharan and Rastislav Bodík. 2006. Refinement-based context-sensitive points-to analysis for Java. In Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM,387--400. Google Scholar
Digital Library
- Manu Sridharan, Satish Chandra, Julian Dolby, Stephen J. Fink, and Eran Yahav. 2013. Alias Analysis for Object-oriented Programs. In Aliasing in Object-Oriented Programming, ed. David, Clarke, Tobias Wrigstad, James Noble. Springer-Verlag, 196--232. Google Scholar
Digital Library
- Manu Sridharan and Stephen J. Fink. 2009. The complexity of Andersen’s analysis in practice. In Proceedings of the 16th International Symposium on Static Analysis. Springer-Verlag, 205--221. Google Scholar
Digital Library
- Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. 2005. Demand-driven points-to analysis for Java. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 59--76. Google Scholar
Digital Library
- Bjarne Steensgaard. 1996. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 32--41. Google Scholar
Digital Library
- Yu Su, Ding Ye, and Jingling Xue. 2014. Parallel pointer analysis with CFL-reachability. In Proceedings of the Brazilian Conference on Intelligent Systems. IEEE Computer Society, 451--460. Google Scholar
Digital Library
- Yulei Sui, Sen Ye, Jingling Xue, and Pen-Chung Yew. 2011. SPAS: Scalable path-sensitive pointer analysis on full-sparse SSA. In Proceedings of the 9th Asian Conference on Programming Languages and Systems. Springer-Verlag, 155--171. Google Scholar
Digital Library
- Galois System. 2018. Retrieved January 28, 2019 from http://iss.ices.utexas.edu/.Google Scholar
- Tamás Szabó, Sebastian Erdweg, and Markus Voelter. 2016. IncA: A DSL for the definition of incremental program analyses. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. ACM, 320--331. Google Scholar
Digital Library
- Tian Tan, Yue Li, and Jingling Xue. 2017. Efficient and precise points-to analysis: Modeling the heap by merging equivalent automata. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 278--291. Google Scholar
Digital Library
- Robert Tarjan. 1972. Depth first search and linear graph algorithms. SIAM J, Comput. 1, 2 (1972).Google Scholar
- K. Tuncay Tekle and Yanhong A. Liu. 2016. Precise complexity guarantees for pointer analysis via datalog with extensions. TPLP 16 (2016), 916--932.Google Scholar
- Zoltán Ujhelyi, Gábor Bergmann, Ábel Hegedüs, Ákos Horváth, Benedek Izsó, István Ráth, Zoltán Szatmári, and Dániel Varró. 2015. EMF-IncQuery: An integrated development environment for live model queries. Sci. Comput. Program. 98 (2015), 80--99. Google Scholar
Digital Library
- Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot - a Java bytecode optimization framework. In Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research. IBM Press, 1--11. Google Scholar
Digital Library
- WALA. 2017. T. J. Watson Libraries for Analysis (WALA). Retrieved January 28, 2019 from http://wala.sourceforge.net/.Google Scholar
- John Whaley and Monica S. Lam. 2004. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 131--144. Google Scholar
Digital Library
- Jyh-shiarn Yur, Barbara G. Ryder, and William A. Landi. 1999. An incremental flow- and context-sensitive pointer aliasing analysis. In Proceedings of the 21st International Conference on Software Engineering. ACM, 442--451. Google Scholar
Digital Library
- Sheng Zhan and Jeff Huang. 2016. ECHO: Instantaneous in situ race detection in the IDE. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 775--786. Google Scholar
Digital Library
- Jisheng Zhao, Michael G. Burke, and Vivek Sarkar. 2018. Parallel sparse flow-sensitive points-to analysis. In Proceedings of the 27th International Conference on Compiler Construction. ACM, 59--70. Google Scholar
Digital Library
Index Terms
Rethinking Incremental and Parallel Pointer Analysis
Recommendations
SHARP: fast incremental context-sensitive pointer analysis for Java
We present SHARP, an incremental context-sensitive pointer analysis algorithm that scales to real-world large complex Java programs and can also be efficiently parallelized. To our knowledge, SHARP is the first algorithm to tackle context-sensitivity in ...
Interprocedural pointer alias analysis
We present practical approximation methods for computing and representing interprocedural aliases for a program written in a language that includes pointers, reference parameters, and recursion. We present the following contributions: (1) a framework ...






Comments