Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

The ART of Sharing Points-to Analysis: Reusing Points-to Analysis Results Safely and Efficiently

Published: 08 October 2024 Publication History

Abstract

Data-flow analyses like points-to analysis can vastly improve the precision of other analyses, and enable powerful code optimizations. However, whole-program points-to analysis of large Java programs tends to be expensive – both in terms of time and memory. Consequently, many compilers (both static and JIT) and program-analysis tools tend to employ faster – but more conservative – points-to analyses to improve usability. As an alternative to such trading of precision for performance, various techniques have been proposed to perform precise yet expensive fixed-point points-to analyses ahead of time in a static analyzer, store the results, and then transmit them to independent compilation/program-analysis stages that may need them. However, an underlying concern of safety affects all such techniques – can a compiler (or program analysis tool) trust the points-to analysis results generated by another compiler/tool? In this work, we address this issue of trust in the context of Java, while accounting for the issue of performance. We propose ART: Analysis-results Representation Template – a novel scheme to efficiently and concisely encode results of flow-sensitive, context-insensitive points-to analysis computed by a static analyzer for use in any independent system that may benefit from such a precise points-to analysis. ART also allows for fast regeneration of the encoded sound analysis results in such systems. Our scheme has two components: (i) a producer that can statically perform expensive points-to analysis and encode the same concisely, (ii) a consumer that, on receiving such encoded results (called artwork), can regenerate the points-to analysis results encoded by the artwork if it is deemed “safe”. The regeneration scheme completely avoids fixed-point computations and thus can help consumers like static analyzers and JIT compilers to obtain precise points-to information without paying a prohibitively high cost. We demonstrate the usage of ART by implementing a producer (in Soot) and two consumers (in Soot and the Eclipse OpenJ9 JIT compiler). We have evaluated our implementation over various benchmarks from the DaCapo and SPECjvm2008 suites. Our results demonstrate that using ART, a consumer can obtain precise flow-sensitive, context-insensitive points-to analysis results in less than (average) 1% of the time taken by a static analyzer to perform the same analysis, with the storage overhead of ART representing a small fraction of the program size (average around 4%).

References

[1]
Karim Ali. 2014. The Separate Compilation Assumption. Ph. D. Dissertation. University of Waterloo, Waterloo, Canada. https://plg.uwaterloo.ca/~olhotak/pubs/thesis-karim-phd.pdf
[2]
B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, V. Sarkar, and M. Trapp. 2005. The Jikes Research Virtual Machine project: Building an open-source research community. IBM Systems Journal 44, 2 (2005), 399–417.
[3]
Aditya Anand, Solai Adithya, Swapnil Rustagi, Priyam Seth, Vijay Sundaresan, Daryl Maier, V. Krishna Nandivada, and Manas Thakur. 2024. Optimistic Stack Allocation and Dynamic Heapification for Managed Runtimes. Proc. ACM Program. Lang. 8, PLDI, Article 159 (Jun 2024), 24 pages.
[4]
Dirk Beyer, Matthias Dangl, Daniel Dietsch, Matthias Heizmann, Thomas Lemberger, and Michael Tautschnig. 2022. Verification Witnesses. ACM Trans. Softw. Eng. Methodol. 31, 4, Article 57 (sep 2022), 69 pages. issn:1049-331X
[5]
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 OOPSLA ’06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications (Portland, OR, USA). ACM Press, New York, NY, USA, 169–190.
[6]
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 (Waikiki, Honolulu, HI, USA) (ICSE ’11). Association for Computing Machinery, New York, NY, USA, 241–250. isbn:9781450304450
[7]
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 (Orlando, Florida, USA) (OOPSLA ’09). Association for Computing Machinery, New York, NY, USA, 243–262. isbn:9781605587660
[8]
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. issn:0004-5411
[9]
Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. 1999. Escape Analysis for Java. In Proceedings of the 14th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (Denver, Colorado, USA) (OOPSLA ’99). ACM, New York, NY, USA, 1–19. isbn:1-58113-238-7
[10]
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. isbn:3-540-43369-4 http://dl.acm.org/citation.cfm?id=647478.727794
[11]
Arnab De and Deepak D’Souza. 2012. Scalable Flow-Sensitive Pointer Analysis for Java with Strong Updates. In ECOOP 2012 – Object-Oriented Programming, James Noble (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 665–687. isbn:978-3-642-31057-7
[12]
Jeffrey Dean, David Grove, and Craig Chambers. 1995. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In Proceedings of the 9th European Conference on Object-Oriented Programming (ECOOP ’95). Springer-Verlag, Berlin, Heidelberg, 77–101. isbn:3540601600
[13]
Thomas Dickerson, Paul Gazzillo, Maurice Herlihy, Vikram Saraph, and Eric Koskinen. 2019. Proof-Carrying Smart Contracts. In Financial Cryptography and Data Security, Aviv Zohar, Ittay Eyal, Vanessa Teague, Jeremy Clark, Andrea Bracciali, Federico Pintore, and Massimiliano Sala (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 325–338. isbn:978-3-662-58820-8
[14]
Jens Dietrich, Nicholas Hollingum, and Bernhard Scholz. 2015. Giga-Scale Exhaustive Points-to Analysis for Java in under a Minute. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (Pittsburgh, PA, USA) (OOPSLA 2015). Association for Computing Machinery, New York, NY, USA, 535–551. isbn:9781450336895
[15]
Umar Farooq, Zhijia Zhao, Manu Sridharan, and Iulian Neamtiu. 2020. LiveDroid: Identifying and Preserving Mobile App State in Volatile Runtime Environments. Proc. ACM Program. Lang. 4, OOPSLA, Article 160 (nov 2020), 30 pages.
[16]
Kostas Ferles, Benjamin Sepanski, Rahul Krishnan, James Bornholt, and Işil Dillig. 2022. Synthesizing Fine-grained Synchronization Protocols for Implicit Monitors. Proc. ACM Program. Lang. 6, OOPSLA1, Article 67 (apr 2022), 26 pages.
[17]
Andy Georges, Dries Buytaert, and Lieven Eeckhout. 2007. Statistically Rigorous Java Performance Evaluation. In Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA ’07). Association for Computing Machinery, New York, NY, USA, 57–76. isbn:9781595937865
[18]
Github. 2015. Problem using Booster and the play-out agent. Github. https://github.com/secure-software-engineering/tamiflex/issues/1
[19]
Github. 2018. FATAL ERROR while using Play In Agent Tamiflex Issue #940. Github. https://github.com/soot-oss/soot/issues/940
[20]
Github. 2021. PlayOutAgent fails with OpenJ9 JDK · Issue #11 · secure-software-engineering/tamiflex. Github. https://github.com/secure-software-engineering/tamiflex/issues/11
[21]
S Goldwasser, S Micali, and C Rackoff. 1985. The Knowledge Complexity of Interactive Proof-systems. In Proceedings of the Seventeenth Annual ACM Symposium on Theory of Computing (Providence, Rhode Island, USA) (STOC ’85). Association for Computing Machinery, New York, NY, USA, 291–304. isbn:0897911512
[22]
Neville Grech, George Fourtounis, Adrian Francalanza, and Yannis Smaragdakis. 2018. Shooting from the Heap: Ultra-scalable Static Analysis with Heap Snapshots. In Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis (Amsterdam, Netherlands) (ISSTA 2018). Association for Computing Machinery, New York, NY, USA, 198–208. isbn:9781450356992
[23]
Shashin Halalingaiah, Vijay Sundaresan, Daryl Maier, and V. Krishna Nandivada. 2024. The ART of Sharing Points-to Analysis (Extended Abstract). Technical Report. IIT Madras. http://cse.iitm.ac.in/~krishna/preprints/oopsla24/oopsla-ea-24.pdf
[24]
Dongjie He, Yujiang Gui, Wei Li, Yonggang Tao, Changwei Zou, Yulei Sui, and Jingling Xue. 2023. A Container-Usage-Pattern-Based Context Debloating Approach for Object-Sensitive Pointer Analysis. Proc. ACM Program. Lang. 7, OOPSLA2, Article 256 (oct 2023), 30 pages.
[25]
IBM. 2017. Eclipse OpenJ9. IBM. https://github.com/eclipse/openj9
[26]
Md. Jahidul Islam, A.T.M Mizanur Rahman, and Sohel Rana. 2023. Performance Analysis of Modern Garbage Collectors using Big Data Benchmarks in the JDK 20 Environment. In 5th International Conference on Sustainable Technologies for Industry 5.0 (STI). IEEE, 1–6.
[27]
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 (Seattle, Washington, USA) (PLDI ’13). Association for Computing Machinery, New York, NY, USA, 423–434. isbn:9781450320146
[28]
Chris Lattner, Andrew Lenharth, and Vikram Adve. 2007. Making Context-sensitive Points-to analysis with Heap Cloning Practical for the Real World. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (San Diego, California, USA) (PLDI ’07). Association for Computing Machinery, New York, NY, USA, 278–289. isbn:9781595936332
[29]
Ondřej Lhoták and Laurie Hendren. 2003. Scaling Java Points-to Analysis Using Spark. In Compiler Construction, Görel Hedin (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 153–169. isbn:978-3-540-36579-2
[30]
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.
[31]
Tim Lindholm, Frank Yellin, Gilad Bracha, and Alex Buckley. 2014. The Java Virtual Machine Specification, Java SE 8 Edition (1st ed.). Addison-Wesley Professional, USA. isbn:013390590X https://docs.oracle.com/javase/specs/jvms/se8/html/
[32]
Alexey Loginov, Eran Yahav, Satish Chandra, Stephen Fink, Noam Rinetzky, and Mangala Nanda. 2008. Verifying Dereference Safety via Expanding-Scope Analysis. In Proceedings of the 2008 International Symposium on Software Testing and Analysis (ISSTA ’08). Association for Computing Machinery, New York, NY, USA, 213–224. isbn:9781605580500
[33]
Jingbo Lu, Dongjie He, and Jingling Xue. 2021. Eagle: CFL-Reachability-Based Precision-Preserving Acceleration of Object-Sensitive Pointer Analysis with Partial Context Sensitivity. ACM Trans. Softw. Eng. Methodol. 30, 4, Article 46 (jul 2021), 46 pages. issn:1049-331X
[34]
Ravichandhran Madhavan, G. Ramalingam, and Kapil Vaswani. 2015. A Framework For Efficient Modular Heap Analysis. Found. Trends Program. Lang. 1, 4 (Jan. 2015), 269–381. issn:2325-1107
[35]
Misc. 2015. Problem using Booster and the play-out agent. https://groups.google.com/g/tamiflex-discuss/c/ZQIagfvlOsI
[36]
Misc. 2019. Soot-list Soot Dacapo Issue. https://mailman.cs.mcgill.ca/pipermail/soot-list/2019-February/009071.html
[37]
Greg Morrisett, David Walker, Karl Crary, and Neal Glew. 1999. From System F to Typed Assembly Language. ACM Trans. Program. Lang. Syst. 21, 3 (may 1999), 527–568. issn:0164-0925
[38]
Steven S. Muchnick. 1997. Advanced compiler design and implementation. Morgan Kaufmann Publishers an imprint of Elsevier, Amsterdam.
[39]
Mangala Gowri Nanda and Saurabh Sinha. 2009. Accurate Interprocedural Null-Dereference Analysis for Java. In 31st International Conference on Software Engineering. IEEE, Canada, 133–143.
[40]
George C. Necula. 1997. Proof-Carrying Code. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Paris, France) (POPL ’97). Association for Computing Machinery, New York, NY, USA, 106–119. isbn:0897918533
[41]
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 (Seattle, Washington) (SOAP ’13). Association for Computing Machinery, New York, NY, USA, 31–36. isbn:9781450322010
[42]
Michael Paleczny, Christopher Vick, and Cliff Click. 2001. The Java HotspotTM Server Compiler. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1 (Monterey, California) (JVM’01). USENIX Association, USA, 1. https://www.usenix.org/conference/jvm-01/java-hotspot
[43]
Girish Maskeri Rama, Raghavan Komondoor, and Himanshu Sharma. 2018. Refinement in object-sensitivity points-to analysis via slicing. Proc. ACM Program. Lang. 2, OOPSLA (2018), 142:1–142:27.
[44]
Alexandru Sălcianu and Martin Rinard. 2005. Purity and Side Effect Analysis for Java Programs. In Verification, Model Checking, and Abstract Interpretation, Radhia Cousot (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 199–215. isbn:978-3-540-30579-8
[45]
Christopher Schwaab, Ekaterina Komendantskaya, Alasdair Hill, František Farka, Ronald P. A. Petrick, Joe Wells, and Kevin Hammond. 2019. Proof-Carrying Plans. In Practical Aspects of Declarative Languages, José Júlio Alferes and Moa Johansson (Eds.). Springer International Publishing, Cham, 204–220. isbn:978-3-030-05998-9
[46]
Mauricio Serrano, Rajesh Bordawekar, Sam Midkiff, and Manish Gupta. 2000. Quicksilver: A Quasi-Static Compiler for Java. SIGPLAN Not. 35, 10 (oct 2000), 66–82. issn:0362-1340
[47]
Shamik Sharma, Anurag Acharya, and Joel Saltz. 1998. Deferred Data-Flow Analysis. Technical Report. University of California at Santa Barbara, USA. https://cs.ucsb.edu/index.php/research/tech-reports/1998-03
[48]
Yannis Smaragdakis and George Balatsouras. 2015. Pointer Analysis. Found. Trends Program. Lang. 2, 1 (apr 2015), 1–69. issn:2325-1107
[49]
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 (Austin, Texas, USA) (POPL ’11). Association for Computing Machinery, New York, NY, USA, 17–30. isbn:9781450304900
[50]
SPECjvm. 2008. SPECJVM2008. SPEC. https://www.spec.org/jvm2008/
[51]
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 (Barcelona, Spain) (PLDI 2017). Association for Computing Machinery, New York, NY, USA, 278–291. isbn:9781450349888
[52]
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). ACM, Washington, DC, USA, 135–146.
[53]
Manas Thakur and V. Krishna Nandivada. 2019. PYE: A Framework for Precise-Yet-Efficient Just-In-Time Analyses for Java Programs. ACM Trans. Program. Lang. Syst. 41, 3, Article 16 (jul 2019), 37 pages. issn:0164-0925
[54]
Manas Thakur and V. Krishna Nandivada. 2020. Mix Your Contexts Well: Opportunities Unleashed by Recent Advances in Scaling Context-Sensitivity. In Proceedings of the 29th International Conference on Compiler Construction (CC 2020). Association for Computing Machinery, New York, NY, USA, 27–38.
[55]
Hamid A. Toussi and Abbas Rasoolzadegan. 2014. Flow-sensitive points-to analysis for Java programs using BDDs. In 2014 4th International Conference on Computer and Knowledge Engineering (ICCKE). IEEE, 380–386.
[56]
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 (Mississauga, Ontario, Canada) (CASCON ’99). IBM Press, 13.
[57]
John Whaley and Martin Rinard. 1999. Compositional Pointer and Escape Analysis for Java Programs. SIGPLAN Not. 34, 10 (oct 1999), 187–206. issn:0362-1340
[58]
John Whaley and Martin Rinard. 1999. Compositional Pointer and Escape Analysis for Java Programs. In Proceedings of the 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (Denver, Colorado, USA) (OOPSLA ’99). Association for Computing Machinery, New York, NY, USA, 187–206. isbn:1581132387
[59]
Jongwook Woo, Jehak Woo, I. Attali, D. Caromel, J.-L. Gaudiot, and A.L. Wendelborn. 2001. Alias Analysis for Java with Reference-set Representation. In Proceedings. Eighth International Conference on Parallel and Distributed Systems. ICPADS 2001. IEEE, 459–466.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 8, Issue OOPSLA2
October 2024
2691 pages
EISSN:2475-1421
DOI:10.1145/3554319
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 October 2024
Published in PACMPL Volume 8, Issue OOPSLA2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. IDFA
  2. Java program analysis
  3. points-to analysis
  4. staged analysis

Qualifiers

  • Research-article

Funding Sources

  • IBM CAS

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 165
    Total Downloads
  • Downloads (Last 12 months)165
  • Downloads (Last 6 weeks)38
Reflects downloads up to 03 Feb 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media