Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3426428.3426923acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

How (not) to write Java pointer analyses after 2020

Published: 17 November 2020 Publication History

Abstract

Despite being a very old discipline, pointer analysis still attracts several research papers every year in premier programming language venues. While a major goal of contemporary pointer analysis research is to improve its efficiency without sacrificing precision, we also see works that introduce novel ways of solving the problem itself. What does this mean? Research in this area is not going to die soon.
I too have been writing pointer analyses of various kinds, specially for object-oriented languages such as Java. While some standard ways of writing such analyses are clear, I have realized that there are an umpteen number of nooks and pitfalls that make the task difficult and error prone. In particular, there are several misconceptions and undocumented practices, being aware of which would save significant research time. On the other hand, there are lessons from my own research that might go a long way in writing correct, precise and efficient pointer analyses, faster. This paper summarizes some such learnings, with a hope to help readers beat the state-of-the-art in (Java) pointer analysis, as they move into their research careers beyond 2020.

Supplementary Material

Auxiliary Presentation Video (onward20essays-id5-p-video.mp4)
Despite being an old discipline, pointer analysis still attracts research papers every year in premier programming language venues. While a major goal of contemporary pointer analysis research is to improve its efficiency without sacrificing precision, we also see works that introduce novel ways of solving the problem itself. What does this mean? Research in this area is not going to die soon. While some standard ways of writing pointer analyses are clear, there are multiple nooks and pitfalls that make the task difficult and error prone. In particular, there are several misconceptions and undocumented practices, being aware of which would save significant research time. Similarly, some lessons from my own efforts might go a long way in writing correct, precise and efficient pointer analyses, faster. This essay summarizes some such learnings, with a hope to help readers beat the state-of-the-art in (Java) pointer analysis, as they move into their research careers beyond 2020.
MP4 File (3426428.3426923.mp4)
Presentation Videos

References

[1]
Lars Ole Andersen. 1994. Program Analysis and Specialization for the C Programming Language. Ph.D. Dissertation. Cornell University.
[2]
Stephen M. Blackburn, Robin Garner, Chris Hofmann, Asjad M. Khang, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanović, Thomas VanDrunen, Daniel von Dincklage, and Ben 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 (OOPSLA '06). ACM, New York, NY, USA, 169-190.
[3]
Bruno Blanchet. 2003. Escape Analysis for JavaTM: Theory and Practice. ACM Trans. Program. Lang. Syst. 25, 6 (Nov. 2003 ), 713-775.
[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. https://github.com/securesoftware-engineering/tamiflex. In Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). ACM, New York, NY, USA, 241-250.
[5]
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 (OOPSLA '09). Association for Computing Machinery, New York, NY, USA, 243-262. doi.org/10.1145/1640089.1640108
[6]
Cristiano Calcagno, Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. 2011. Compositional Shape Analysis by Means of Bi-Abduction. J. ACM 58, 6, Article 26 ( Dec. 2011 ), 66 pages. 10.1145/2049697.2049700
[7]
Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkif. 1999. Escape Analysis for Java. In Proceedings of the 14th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '99). ACM, New York, NY, USA, 1-19.
[8]
Patrick Cousot and Radhia Cousot. 2002. Modular Static Program Analysis. In Proceedings of the 11th International Conference on Compiler Construction (CC '02). Springer-Verlag, London, UK, UK, 159-178. htp: //dl.acm.org/citation.cfm?id= 647478. 727794
[9]
Jefrey Dean, David Grove, and Craig Chambers. 1995. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In ECOOP' 95-Object-Oriented Programming, 9th European Conference, Åarhus, Denmark, August 7-11, 1995, Mario Tokoro and Remo Pareschi (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 77-101.
[10]
Graal. 2020. OpenJDK Graal. http://openjdk.java.net/projects/graal/. ( 2020 ).
[11]
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 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '07). ACM, New York, NY, USA, 290-299.
[12]
Michael Hind. 2001. Pointer Analysis: Haven't We Solved This Problem Yet?. In Proceedings of the 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE '01). Association for Computing Machinery, New York, NY, USA, 54-61.
[13]
Vini Kanvar and Uday P. Khedker. 2016. Heap Abstractions for Static Analysis. ACM Comput. Surv. 49, 2, Article 29 ( June 2016 ), 47 pages.
[14]
Uday P. Khedker and Bageshri Karkare. 2008. Eficiency, Precision, Simplicity, and Generality in Interprocedural Data Flow Analysis: Resurrecting the Classical Call Strings Method. In Proceedings of the International Conference on Compiler Construction (CC'08). SpringerVerlag, Berlin, Heidelberg, 213-228. htp://dl.acm.org/citation.cfm? id= 1788374. 1788394
[15]
Thomas Kotzmann and Hanspeter Mössenböck. 2005. Escape Analysis in the Context of Dynamic Compilation and Deoptimization. In Proceedings of the 1st ACM/USENIX International Conference on Virtual Execution Environments (VEE '05). ACM, New York, NY, USA, 111-120.
[16]
C. Lattner and V. Adve. 2004. LLVM: a compilation framework for lifelong program analysis transformation. In International Symposium on Code Generation and Optimization, 2004. CGO 2004. 75-86.
[17]
Kyungwoo Lee, Xing Fang, and Samuel P. Midkif. 2007. Practical Escape Analyses: How Good Are They?. In Proceedings of the 3rd International Conference on Virtual Execution Environments (VEE '07). Association for Computing Machinery, New York, NY, USA, 180-190.
[18]
Ondřej Lhoták and Laurie Hendren. 2006. Context-Sensitive Pointsto Analysis: Is It Worth It?. In Proceedings of the 15th International Conference on Compiler Construction (CC'06). Springer-Verlag, Berlin, Heidelberg, 47-64.
[19]
Yue Li, Tian Tan, Anders Møller, and Yannis Smaragdakis. 2018. Precision-guided Context Sensitivity for Pointer Analysis. Proc. ACM Program. Lang. 2, OOPSLA, Article 141 (Oct. 2018 ), 29 pages.
[20]
Yue Li, Tian Tan, Anders Møller, and Yannis Smaragdakis. 2018. Scalability-first Pointer Analysis with Self-tuning Context-sensitivity. In Proceedings of the ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2018 ). ACM, New York, NY, USA, 129-140.
[21]
Yue Li, Tian Tan, and Jingling Xue. 2019. Understanding and Analyzing Java Reflection. ACM Trans. Softw. Eng. Methodol. 28, 2, Article 7 ( Feb. 2019 ), 50 pages.
[22]
Benjamin Livshits, Manu Sridharan, Yannis Smaragdakis, Ondřej Lhoták, J. Nelson Amaral, Bor-Yuh Evan Chang, Samuel Z. Guyer, Uday P. Khedker, Anders Møller, and Dimitrios Vardoulakis. 2015. In Defense of Soundiness: A Manifesto. Commun. ACM 58, 2 (Jan. 2015 ), 44-46.
[23]
Ravichandhran Madhavan, G. Ramalingam, and Kapil Vaswani. 2015. A Framework For Eficient Modular Heap Analysis. Found. Trends Program. Lang. 1, 4 (Jan. 2015 ), 269-381. 2500000020
[24]
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 (Jan. 2005 ), 1-41. 1145/1044834.1044835
[25]
Steven S. Muchnick. 1997. Advanced Compiler Design and Implementation. Morgan Kaufmann.
[26]
Erik M. Nystrom, Hong-Seok Kim, and Wen-mei W. Hwu. 2004. Importance of Heap Specialization in Pointer Analysis. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE '04). ACM, New York, NY, USA, 43-48.
[27]
Hakjoo Oh, Wonchan Lee, Kihong Heo, Hongseok Yang, and Kwangkeun Yi. 2014. Selective Context-sensitivity Guided by Impact Pre-analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '14). ACM, New York, NY, USA, 475-484. 2594318
[28]
Eclipse OpenJ9. 2020. The Eclipse OpenJ9 Virtual Machine. https://www.eclipse.org/openj9/. ( 2020 ).
[29]
Rohan Padhye and Uday P. Khedker. 2013. Interprocedural Data Flow Analysis in Soot Using Value Contexts. In Proceedings of the 2nd ACM SIGPLAN International Workshop on State Of the Art in Java Program Analysis (SOAP '13). ACM, New York, NY, USA, 31-36. //dx.doi.org/10.1145/2487568.2487569
[30]
Michael Paleczny, Christopher Vick, and Clif Click. 2001. The Java HotSpotTM Server Compiler. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium-Volume 1 (JVM'01). USENIX Association, Berkeley, CA, USA, 1-1. htp: //dl.acm.org/citation.cfm?id= 1267847. 1267848
[31]
Michael Reif, Florian Kübler, Michael Eichberg, and Mira Mezini. 2018. Systematic Evaluation of the Unsoundness of Call Graph Construction Algorithms for Java. In Companion Proceedings for the ISSTA/ECOOP 2018 Workshops (ISSTA '18). Association for Computing Machinery, New York, NY, USA, 107-112. 3236503
[32]
M Sharir and A Pnueli. 1978. Two Approaches to Interprocedural Data Flow Analysis. New York Univ. Comput. Sci. Dept., New York, NY. htps://cds.cern.ch/record/120118
[33]
Olin Shivers. 1991. Control-Flow Analysis of Higher-Order Languages. Technical Report.
[34]
Yannis Smaragdakis and George Balatsouras. 2015. Pointer Analysis. Found. Trends Program. Lang. 2, 1 (April 2015 ), 1-69. doi.org/10.1561/2500000014
[35]
Yannis Smaragdakis, Martin Bravenboer, and Ondrej Lhoták. 2011. Pick Your Contexts Well: Understanding Object-sensitivity. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '11). ACM, New York, NY, USA, 17-30. //dx.doi.org/10.1145/1926385.1926390
[36]
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). ACM, New York, NY, USA, 485-495.
[37]
Alexandru Sălcianu and Martin Rinard. 2005. Purity and Side Effect Analysis for Java Programs. In Proceedings of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI'05). Springer-Verlag, Berlin, Heidelberg, 199-215.
[38]
Tian Tan, Yue Li, and Jingling Xue. 2016. Making k-Object-Sensitive Pointer Analysis More Precise with Still k-Limiting. In Static Analysis, Xavier Rival (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 489-510.
[39]
Tian Tan, Yue Li, and Jingling Xue. 2017. Eficient and Precise Points-to Analysis: Modeling the Heap by Merging Equivalent Automata. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017 ). ACM, New York, NY, USA, 278-291.
[40]
Manas Thakur and V. Krishna Nandivada. 2019. Compare Less, Defer More: Scaling Value-Contexts Based Whole-Program Heap Analyses. In Proceedings of the 28th International Conference on Compiler Construction (CC 2019 ). Association for Computing Machinery, New York, NY, USA, 135-146.
[41]
Manas Thakur and V. Krishna Nandivada. 2019. PYE: A Framework for Precise-Yet-Eficient Just-In-Time Analyses for Java Programs. ACM Trans. Program. Lang. Syst. 41, 3, Article 16 ( July 2019 ), 37 pages.
[42]
Manas Thakur and V. Krishna Nandivada. 2020. Mix Your Contexts Well: Opportunities Unleashed by Recent Advances in Scaling ContextSensitivity. In Proceedings of the 29th International Conference on Compiler Construction (CC 2020 ). Association for Computing Machinery, New York, NY, USA, 27-38. 3377902
[43]
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 1999 Conference of the Centre for Advanced Studies on Collaborative Research (CASCON '99). IBM Press, 13-. htp://dl.acm.org/citation.cfm?id= 781995. 782008
[44]
John Whaley and Martin Rinard. 1999. Compositional Pointer and Escape Analysis for Java Programs. In Proceedings of the ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '99). ACM, New York, NY, USA, 187-206.

Cited By

View all
  • (2024)PyAnalyzer: An Effective and Practical Approach for Dependency Extraction from Python CodeProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3640325(1-12)Online publication date: 20-May-2024
  • (2024)Call-Graph-Based Context-Sensitive Points-to Analysis for JavaIEEE Transactions on Reliability10.1109/TR.2023.323699073:2(851-860)Online publication date: Jun-2024
  • (2023)Variational Study of the Impact of Call Graphs on Precision of Android Taint AnalysisProceedings of the 16th Innovations in Software Engineering Conference10.1145/3578527.3578545(1-5)Online publication date: 23-Feb-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Onward! 2020: Proceedings of the 2020 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software
November 2020
208 pages
ISBN:9781450381789
DOI:10.1145/3426428
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 November 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Correctness
  2. Efficiency
  3. Java
  4. Pointer analysis

Qualifiers

  • Research-article

Conference

SPLASH '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 40 of 105 submissions, 38%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)48
  • Downloads (Last 6 weeks)3
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)PyAnalyzer: An Effective and Practical Approach for Dependency Extraction from Python CodeProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3640325(1-12)Online publication date: 20-May-2024
  • (2024)Call-Graph-Based Context-Sensitive Points-to Analysis for JavaIEEE Transactions on Reliability10.1109/TR.2023.323699073:2(851-860)Online publication date: Jun-2024
  • (2023)Variational Study of the Impact of Call Graphs on Precision of Android Taint AnalysisProceedings of the 16th Innovations in Software Engineering Conference10.1145/3578527.3578545(1-5)Online publication date: 23-Feb-2023

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media