Nothing Special   »   [go: up one dir, main page]

skip to main content
article

A Framework For Efficient Modular Heap Analysis

Published: 19 January 2015 Publication History

Abstract

Modular heap analysis techniques analyze a program by computing summaries for every procedure in the program that describes its effects on an input heap, using pre-computed summaries for the called procedures. In this article, we focus on a family of modular heap analyses that summarize a procedure's heap effects using a context-independent, shape-graph-like summary that is agnostic to the aliasing in the input heap. The analyses proposed by Whaley, Salcianu and Rinard, Buss et al., Lattner et al. and Cheng et al. belong to this family. These analyses are very efficient. But their complexity and the absence of a theoretical formalization and correctness proofs makes it hard to produce correct extensions and modifications of these algorithms whether to improve precision or scalability or to compute more information. We present a modular heap analysis framework that generalizes these four analyses. We formalize our framework as an abstract interpretation and establish the correctness and termination guarantees. We formalize the four analyses as instances of the framework. The formalization explains the basic principle behind such modular analyses and simplifies the task of producing extensions and variations of such analyses. We empirically evaluate our framework using several real-world C# applications, under six different configurations for the parameters, and using three client analyses. The results show that the framework offers a wide range of analyses having different precision and scalability.

References

[1]
Martin Bravenboer and Yannis Smaragdakis. Strictly declarative specification of sophisticated points-to analyses. In OOPSLA, pages 243-262, 2009.
[2]
Marcio Buss, Daniel Brand, Vugranam C. Sreedhar, and Stephen A. Edwards. Flexible pointer analysis using assign-fetch graphs. In SAC, pages 234-239, 2008.
[3]
Marcio Buss, Daniel Brand, Vugranam C. Sreedhar, and Stephen A. Edwards. A novel analysis space for pointer analysis and its application for bug finding. Sci. Comput. Program., 75(11):921-942, 2010.
[4]
Cristiano Calcagno, Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. Compositional shape analysis by means of bi-abduction. In POPL, pages 289-300, 2009.
[5]
Ramkrishna Chatterjee, Barbara G. Ryder, and William A. Landi. Relevant context inference. In POPL, pages 133-146, 1999.
[6]
Ben-Chung Cheng and Wen-Mei W. Hwu. Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation. In PLDI, pages 57-69, 2000.
[7]
Patrick Cousot and Radhia Cousot. Abstract interpretation frameworks. J. Log. Comput., 2(4):511-547, 1992.
[8]
Patrick Cousot and Radhia Cousot. Modular static program analysis. In CC, pages 159-178, 2002.
[9]
Manuvir Das. Unification-based pointer analysis with directional assignments. In PLDI, pages 35-46, 2000.
[10]
Arnab De and Deepak D'Souza. Scalable flow-sensitive pointer analysis for java with strong updates. In ECOOP, pages 665-687, 2012.
[11]
Isil Dillig, Thomas Dillig, Alex Aiken, and Mooly Sagiv. Precise and compact modular procedure summaries for heap manipulating programs. In PLDI, pages 567-577, 2011.
[12]
Bhargav S. Gulavani, Supratik Chakraborty, Ganesan Ramalingam, and Aditya V. Nori. Bottom-up shape analysis. In SAS, pages 188-204, 2009.
[13]
Ben Hardekopf and Calvin Lin. Flow-sensitive pointer analysis for millions of lines of code. In CGO, pages 289-298, 2011.
[14]
Bertrand Jeannet, Alexey Loginov, Thomas Reps, and Mooly Sagiv. A relational approach to interprocedural shape analysis. ACM Trans. Program. Lang. Syst., 32:5:1-5:52, 2010.
[15]
Etienne Kneuss, Viktor Kuncak, and Philippe Suter. Effect analysis for programs with callbacks. In VSTTE, pages 48-67, 2013.
[16]
Jens Knoop and Bernhard Steffen. The interprocedural coincidence theorem. In CC, pages 125-140, 1992.
[17]
Chris Lattner and Vikram Adve. Macroscopic Data Structure Analysis and Operations. PhD thesis, University of Illinois at Urbana-Champaign, 2005a.
[18]
Chris Lattner and Vikram S. Adve. Automatic pool allocation: improving performance by controlling data structure layout in the heap. In PLDI, pages 129-142, 2005b.
[19]
Chris Lattner, Andrew Lenharth, and Vikram S. Adve. Making context-sensitive points-to analysis with heap cloning practical for the real world. In PLDI, pages 278-289, 2007.
[20]
Ondrej Lhoták. Program Analysis Using Binary Decision Diagrams. PhD thesis, 2006.
[21]
Ondrej Lhoták and Kwok-Chiang Andrew Chung. Points-to analysis with efficient strong updates. In POPL, pages 3-16, 2011.
[22]
Donglin Liang and Mary Jean Harrold. Efficient computation of parameterized pointer information for interprocedural analyses. In SAS, pages 279-298, 2001.
[23]
Percy Liang and Mayur Naik. Scaling abstraction refinement via pruning. In PLDI, pages 590-601, 2011.
[24]
Ravichandhran Madhavan, Ganesan Ramalingam, and Kapil Vaswani. Purity analysis: An abstract interpretation formulation. In SAS, pages 7-24, 2011.
[25]
Ravichandhran Madhavan, G. Ramalingam, and Kapil Vaswani. Modular heap analysis for higher-order programs. In SAS, pages 370-387, 2012.
[26]
Ravi Mangal, Mayur Naik, and Hongseok Yang. A correspondence between two approaches to interprocedural analysis in the presence of join. In ESOP, pages 513-533, 2014.
[27]
Mark Marron, Ondrej Lhoták, and Anindya Banerjee. Programming paradigm driven heap analysis. In CC, pages 41-60, 2012.
[28]
Erik M. Nystrom, Hong-Seok Kim, and Wen mei W. Hwu. Bottom-up and top-down context-sensitive summary-based pointer analysis. In SAS, pages 165-180, 2004.
[29]
Prakash Prabhu, Ganesan Ramalingam, and Kapil Vaswani. Safe programmable speculative parallelism. In PLDI, pages 50-61, 2010.
[30]
Noam Rinetzky, Mooly Sagiv, and Eran Yahav. Interprocedural shape analysis for cutpoint-free programs. In SAS, pages 284-302, 2005.
[31]
Shmuel Sagiv, Thomas W. Reps, and Reinhard Wilhelm. Parametric shape analysis via 3-valued logic. In POPL, pages 105-118, 1999.
[32]
Alexandru D. Salcianu. Pointer analysis and its applications for java programs. Master's thesis, Massachusetts institute of technology, 2001.
[33]
Alexandru D. Salcianu and Martin C. Rinard. Purity and side effect analysis for java programs. In VMCAI, pages 199-215, 2005.
[34]
Micha Sharir and Amir Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, pages 189- 234, 1981.
[35]
Yannis Smaragdakis and Martin Bravenboer. Using datalog for fast and easy program analysis. In Datalog, pages 245-251, 2010.
[36]
Yannis Smaragdakis, Martin Bravenboer, and Ondrej Lhoták. Pick your contexts well: understanding object-sensitivity. In POPL, pages 17-30, 2011.
[37]
Yannis Smaragdakis, George Kastrinis, and George Balatsouras. Introspective analysis: context-sensitivity, across the board. In PLDI, page 50, 2014.
[38]
Bjarne Steensgaard. Points-to analysis in almost linear time. In POPL, pages 32-41, 1996.
[39]
WALA. T. J. Watson libraries for program analysis. URL https://github. com/wala/WALA.
[40]
John Whaley and Martin C. Rinard. Compositional pointer and escape analysis for java programs. In OOPSLA, pages 187-206, 1999.
[41]
Xin Zhang, Ravi Mangal, Radu Grigore, Mayur Naik, and Hongseok Yang. On abstraction refinement for program analyses in datalog. In PLDI, page 27, 2014.

Cited By

View all
  • (2024)The ART of Sharing Points-to Analysis: Reusing Points-to Analysis Results Safely and EfficientlyProceedings of the ACM on Programming Languages10.1145/36898038:OOPSLA2(2606-2632)Online publication date: 8-Oct-2024
  • (2024)Interactive Abstract Interpretation with Demanded SummarizationACM Transactions on Programming Languages and Systems10.1145/364844146:1(1-40)Online publication date: 15-Feb-2024
  • (2023)Compositional Taint Analysis for Enforcing Security Policies at ScaleProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3613889(1985-1996)Online publication date: 30-Nov-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Foundations and Trends in Programming Languages
Foundations and Trends in Programming Languages  Volume 1, Issue 4
January 2015
116 pages
ISSN:2325-1107
EISSN:2325-1131
Issue’s Table of Contents

Publisher

Now Publishers Inc.

Hanover, MA, United States

Publication History

Published: 19 January 2015

Author Tags

  1. Pointer and heap analysis
  2. Program analysis

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)The ART of Sharing Points-to Analysis: Reusing Points-to Analysis Results Safely and EfficientlyProceedings of the ACM on Programming Languages10.1145/36898038:OOPSLA2(2606-2632)Online publication date: 8-Oct-2024
  • (2024)Interactive Abstract Interpretation with Demanded SummarizationACM Transactions on Programming Languages and Systems10.1145/364844146:1(1-40)Online publication date: 15-Feb-2024
  • (2023)Compositional Taint Analysis for Enforcing Security Policies at ScaleProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3613889(1985-1996)Online publication date: 30-Nov-2023
  • (2019)PYEACM Transactions on Programming Languages and Systems10.1145/333779441:3(1-37)Online publication date: 2-Jul-2019
  • (2018)An efficient data structure for must-alias analysisProceedings of the 27th International Conference on Compiler Construction10.1145/3178372.3179519(48-58)Online publication date: 24-Feb-2018

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media