Shape Analysis in the Absence of Pointers and Structure

10 years 6 months ago
Shape Analysis in the Absence of Pointers and Structure
Shape analyses (Chase et al. 1990, Sagiv et al. 2002) discover properties of dynamic and/or mutable structures. We ask, "Is there an equivalent to shape analysis for purely functional programs, and if so, what `shapes' does it discover?" By treating binding environments as dynamically allocated structures, by treating bindings as addresses, and by treating value environments as heaps, we argue that we can analyze the "shape" of higher-order functions. To demonstrate this, we enrich ct-interpretive control-flow analysis with principles from shape analysis. In particular, we promote "anodization" as a way to generalize gleton abstraction and the notion of focusing, and we promote "binding invariants" as the analog of shape predicates. Our analysis enables two optimizations known to be beyond the reach of control-flow analysis (globalization and super- inlining) and one previously unknown optimization (higher-order rematerialization).
Matthew Might
Added 05 Mar 2010
Updated 08 Mar 2010
Type Conference
Year 2010
Authors Matthew Might
Comments (0)