Monadic abstract interpreters

  • Authors:
  • Ilya Sergey;Dominique Devriese;Matthew Might;Jan Midtgaard;David Darais;Dave Clarke;Frank Piessens

  • Affiliations:
  • IMDEA Software Institute, Madrid, Spain;KU Leuven, Leuven, Belgium;University of Utah, Salt Lake City, Utah, USA;Aarhus University, Aarhus, Denmark;Harvard University, Cambridge, Massachusetts, USA;KU Leuven, Leuven , Belgium;KU Leuven, Leuven , Belgium

  • Venue:
  • Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Recent developments in the systematic construction of abstract interpreters hinted at the possibility of a broad unification of concepts in static analysis. We deliver that unification by showing context-sensitivity, polyvariance, flow-sensitivity, reachability-pruning, heap-cloning and cardinality-bounding to be independent of any particular semantics. Monads become the unifying agent between these concepts and between semantics. For instance, by plugging the same "context-insensitivity monad" into a monadically-parameterized semantics for Java or for the lambda calculus, it yields the expected context-insensitive analysis. To achieve this unification, we develop a systematic method for transforming a concrete semantics into a monadically-parameterized abstract machine. Changing the monad changes the behavior of the machine. By changing the monad, we recover a spectrum of machines---from the original concrete semantics to a monovariant, flow- and context-insensitive static analysis with a singly-threaded heap and weak updates. The monadic parameterization also suggests an abstraction over the ubiquitous monotone fixed-point computation found in static analysis. This abstraction makes it straightforward to instrument an analysis with high-level strategies for improving precision and performance, such as abstract garbage collection and widening. While the paper itself runs the development for continuation-passing style, our generic implementation replays it for direct-style lambda-calculus and Featherweight Java to support generality.