By Ravichandhran Madhavan, EPFL, Lausanne, Switzerland, ravi.kandhadai@epfl.ch | G. Ramalingam, Microsoft Research, India, grama@microsoft.com | Kapil Vaswani, Microsoft Research, India, kapilv@microsoft.com
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.
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 A Framework For Efficient Modular Heap Analysis, the focus is 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. 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. A Framework For Efficient Modular Heap Analysis presents a modular heap analysis framework that generalizes these four analyses. It formalizes this framework as an abstract interpretation and establishes the correctness and termination guarantees. It formalizes 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.
A Framework For Efficient Modular Heap Analysis is written with exceptional clarity and is a delightful read for program analysis experts and novices alike.