Abstract Interpreters for Free

In small-step abstract interpretations, the concrete and abstract semantics bear an uncanny resemblance. In this work, we present an analysis-design methodology that both explains and exploits that resemblance. Specifically, we present a two-step method to convert a smallstep concrete semantics into a family of sound, computable abstract interpretations. The first step re-factors the concrete state-space to eliminate recursive structure; this refactoring of the state-space simultaneously determines a store-passing-style transformation on the underlying concrete semantics. The second step uses inference rules to generate an abstract state-space and a Galois connection simultaneously. The Galois connection allows the calculation of the "optimal" abstract interpretation. The two-step process is unambiguous, but nondeterministic: at each step, analysis designers face choices. Some of these choices ultimately influence properties such as flow-, field- and context-sensitivity. Thus, under the method, we can give the emergence of these properties a graphtheoretic characterization. To illustrate the method, we systematically abstract the continuation-passing style lambda calculus to arrive at two distinct families of analyses. The first is the well-known k-CFA family of analyses. The second consists of novel "environment-centric" abstract interpretations, none of which appear in the literature on static analysis of higher-order programs.

[1]  Mads Dam,et al.  Selected papers from the 5th LOMAPS Workshop on Analysis and Verification of Multiple-Agent Languages , 1996 .

[2]  Olivier Danvy,et al.  A functional correspondence between evaluators and abstract machines , 2003, PPDP '03.

[3]  Matthew Might,et al.  A PosterioriSoundness for Non-deterministic Abstract Interpretations , 2009, VMCAI.

[4]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[5]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[6]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[7]  Olivier Danvy,et al.  A functional correspondence between monadic evaluators and abstract machines for languages with computational effects , 2003, Theor. Comput. Sci..

[8]  Mitchell Wand,et al.  Constraint systems for useless variable elimination , 1999, POPL '99.

[9]  Olivier Danvy,et al.  A Rational Deconstruction of Landin's SECD Machine , 2003, IFL.

[10]  Olivier Danvy,et al.  Refunctionalization at work , 2006, Sci. Comput. Program..

[11]  Flemming Nielson,et al.  Infinitary control flow analysis: a collecting semantics for closure analysis , 1997, POPL '97.

[12]  Tianlong Gu,et al.  Automatic Construction of Complete Abstraction by Abstract Interpretation , 2009, 2009 Eighth IEEE/ACIS International Conference on Computer and Information Science.

[13]  Matthew Might,et al.  Improving flow analyses via ΓCFA: abstract garbage collection and counting , 2006, ICFP '06.

[14]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[15]  Olivier Danvy,et al.  A Functional Correspondence between Evaluators and Abstract Machines , 2003 .

[16]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[17]  Olin Shivers,et al.  Control flow analysis in scheme , 1988, PLDI '88.

[18]  Matthew Might,et al.  Exploiting reachability and cardinality in higher-order flow analysis , 2008, J. Funct. Program..

[19]  Mads Dam Analysis and verification of multiple-agent languages : 5th LOMAPS Workshop, Stockholm, Sweden, June 24-26, 1996 : selected papers , 1997 .

[20]  Olivier Danvy,et al.  A functional correspondence between call-by-need evaluators and lazy abstract machines , 2003, Inf. Process. Lett..

[21]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[22]  David A. Schmidt Abstract Interpretation of Small-Step Semantics , 1996, LOMAPS.