skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Precision-preserving yet fast object-sensitive pointer analysis with partial context sensitivity

Published:10 October 2019Publication History
Skip Abstract Section

Abstract

Object-sensitivity is widely used as a context abstraction for computing the points-to information context-sensitively for object-oriented languages like Java. Due to the combinatorial explosion of contexts in large programs, k-object-sensitive pointer analysis (under k-limiting), denoted k-obj, is scalable only for small values of k, where k⩽2 typically. A few recent solutions attempt to improve its efficiency by instructing k-obj to analyze only some methods in the program context-sensitively, determined heuristically by a pre-analysis. While already effective, these heuristics-based pre-analyses do not provide precision guarantees, and consequently, are limited in the efficiency gains achieved. We introduce a radically different approach, Eagle, that makes k-obj run significantly faster than the prior art while maintaining its precision. The novelty of Eagle is to enable k-obj to analyze a method with partial context-sensitivity, i.e., context-sensitively for only some of its selected variables/allocation sites. Eagle makes these selections during a lightweight pre-analysis by reasoning about context-free-language (CFL) reachability at the level of variables/objects in the program, based on a new CFL-reachability formulation of k-obj. We demonstrate the advances made by Eagle by comparing it with the prior art in terms of a set of popular Java benchmarks and applications.

Skip Supplemental Material Section

Supplemental Material

a148-lu

Presentation at OOPSLA '19

References

  1. Karim Ali and Ondřej Lhoták. 2012. Application-Only Call Graph Construction. In ECOOP 2012 – Object-Oriented Programming , James Noble (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 688–712.Google ScholarGoogle Scholar
  2. Karim Ali and Ondřej Lhoták. 2013. Averroes: Whole-Program Analysis without the Whole Program. In ECOOP 2013 – Object-Oriented Programming , Giuseppe Castagna (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 378–400.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph.D. Dissertation.Google ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cheng Cai, Qirun Zhang, Zhiqiang Zuo, Khanh Nguyen, Guoqing Xu, and Zhendong Su. 2018. Calling-to-reference context translation via constraint-guided CFL-reachability. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation . ACM, 196–210.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Swarat Chaudhuri. 2008. Subcubic Algorithms for Recursive State Machines. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08) . ACM, New York, NY, USA, 159–169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Behnaz Hassanshahi, Raghavendra Kagalavadi Ramesh, Padmanabhan Krishnan, Bernhard Scholz, and Yi Lu. 2017. An efficient tunable selective points-to analysis for large codebases. In Proceedings of the 6th ACM SIGPLAN International Workshop on State Of the Art in Program Analysis . ACM, 13–18.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Minseok Jeon, Sehun Jeong, and Hakjoo Oh. 2018. Precise and scalable points-to analysis via data-driven context tunneling. Proceedings of the ACM on Programming Languages 2, OOPSLA (2018), 140.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sehun Jeong, Minseok Jeon, Sungdeok Cha, and Hakjoo Oh. 2017. Data-driven context-sensitivity for points-to analysis. Proceedings of the ACM on Programming Languages 1, OOPSLA (2017), 100.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. John Kodumal and Alex Aiken. 2004. The Set Constraint/CFL Reachability Connection in Practice. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI ’04) . ACM, New York, NY, USA, 207–218. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ondřej Lhoták and Laurie Hendren. 2003. Scaling Java points-to analysis using Spark. In International Conference on Compiler Construction . Springer, 153–169.Google ScholarGoogle ScholarCross RefCross Ref
  12. Ondřej Lhoták and Laurie Hendren. 2008. Evaluating the benefits of context-sensitive points-to analysis using a BDD-based implementation. ACM Transactions on Software Engineering and Methodology (TOSEM) 18, 1 (2008), 3.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Yue Li, Tian Tan, Anders Møller, and Yannis Smaragdakis. 2018. Precision-guided context sensitivity for pointer analysis. Proceedings of the ACM on Programming Languages 2, OOPSLA (2018), 141.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Bozhen Liu, Jeff Huang, and Lawrence Rauchwerger. 2019. Rethinking Incremental and Parallel Pointer Analysis. ACM Trans. Program. Lang. Syst. 41, 1, Article 6 (March 2019), 31 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ana Milanova, Atanas Rountev, and Barbara G Ryder. 2005. Parameterized object sensitivity for points-to analysis for Java. ACM Transactions on Software Engineering and Methodology (TOSEM) 14, 1 (2005), 1–41.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mukund Raghothaman, Sulekha Kulkarni, Kihong Heo, and Mayur Naik. 2018. User-guided program reasoning using Bayesian inference. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation . ACM, 722–735.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Siegfried Rasthofer, Steven Arzt, Marc Miltenberger, and Eric Bodden. 2016. Harvesting Runtime Values in Android Applications That Feature Anti-Analysis Techniques.. In NDSS.Google ScholarGoogle Scholar
  18. Thomas Reps. 1998. Program analysis via graph reachability1. Information and software technology 40, 11-12 (1998), 701–726.Google ScholarGoogle Scholar
  19. Thomas Reps. 2000. Undecidability of context-sensitive data-dependence analysis. ACM Transactions on Programming Languages and Systems (TOPLAS) 22, 1 (2000), 162–186.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Lei Shang, Xinwei Xie, and Jingling Xue. 2012. On-demand dynamic summary-based points-to analysis. In Proceedings of the Tenth International Symposium on Code Generation and Optimization . ACM, 264–274.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Olin Shivers. 1991. Control-flow analysis of higher-order languages. Ph.D. Dissertation. Citeseer.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Yannis Smaragdakis, Martin Bravenboer, and Ondrej Lhoták. 2011. Pick Your Contexts Well: Understanding Object-Sensitivity. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). Association for Computing Machinery, New York, NY, USA, 17–30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 (PLDI ’14) . Association for Computing Machinery, New York, NY, USA, 485–495. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 (PLDI ’06) . Association for Computing Machinery, New York, NY, USA, 387–400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 (OOPSLA ’05) . ACM, New York, NY, USA, 59–76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Tian Tan, Yue Li, and Jingling Xue. 2016. Making k-object-sensitive pointer analysis more precise with still k-limiting. In International Static Analysis Symposium . Springer, 489–510.Google ScholarGoogle ScholarCross RefCross Ref
  27. 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 (PLDI 2017) . Association for Computing Machinery, New York, NY, USA, 278–291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Rei Thiessen and Ondřej Lhoták. 2017. Context Transformations for Pointer Analysis. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017) . Association for Computing Machinery, New York, NY, USA, 263–277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 2010. Soot: A Java bytecode optimization framework. In CASCON First Decade High Impact Papers. IBM Corp., 214–224.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Shiyi Wei and Barbara G Ryder. 2015. Adaptive context-sensitive analysis for JavaScript. In LIPIcs-Leibniz International Proceedings in Informatics , Vol. 37. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik.Google ScholarGoogle Scholar
  31. Guoqing Xu, Atanas Rountev, and Manu Sridharan. 2009. Scaling CFL-Reachability-Based Points-To Analysis Using ContextSensitive Must-Not-Alias Analysis. In Proceedings of the 23rd European Conference on ECOOP 2009 — Object-Oriented Programming (Genoa) . Springer-Verlag, Berlin, Heidelberg, 98–122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Xin Zhang, Ravi Mangal, Radu Grigore, Mayur Naik, and Hongseok Yang. 2014. On Abstraction Refinement for Program Analyses in Datalog. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14) . Association for Computing Machinery, New York, NY, USA, 239–248. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Precision-preserving yet fast object-sensitive pointer analysis with partial context sensitivity

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!