Allocation Characterizes Polyvariance: A Unified Methodology for Polyvariant Control-Flow Analysis

Thomas Gilray, Michael D. Adams, and Matthew Might

Status: Published

Abstract

The polyvariance of a static analysis is the degree to which it structurally differentiates approximations of program values. Polyvariant techniques come in a number of different flavors that represent alternative heuristics for managing the trade-off an analysis strikes between precision and complexity. For example, call sensitivity supposes that values will tend to correlate with recent call sites, object sensitivity supposes that values will correlate with the allocation points of related objects, the Cartesian product algorithm supposes correlations between the values of arguments to the same function, and so forth.

In this paper, we describe a unified methodology for implementing and understanding polyvariance in a higher-order setting (i.e., for control-flow analyses). We do this by extending the method of abstracting abstract machines (AAM), a systematic approach to producing an abstract interpretation of abstract-machine semantics. AAM eliminates recursion within a language’s semantics by passing around an explicit store, and thus places importance on the strategy an analysis uses for allocating abstract addresses within the abstract heap or store. We build on AAM by showing that the design space of possible abstract allocators exactly and uniquely corresponds to the design space of polyvariant strategies. This allows us to both unify and generalize polyvariance as tunings of a single function. Changes to the behavior of this function easily recapitulate classic styles of analysis and produce novel variations, combinations of techniques, and fundamentally new techniques.

Keywords

Keywords Polyvariance; Static analysis; Control-flow analysis; Abstract interpretation; Abstract allocation; Context sensitivity

Citation

Thomas Gilray, Michael D. Adams, and Matthew Might. Allocation characterizes polyvariance: A unified methodology for polyvariant control-flow analysis. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP ’16, pages 407–420. ACM, New York, NY, USA, September 2016. ISBN 978-1-4503-4219-3. doi: 10.1145/2951913.2951936.

BibTeX Entry

@inproceedings{gilray2016allocation,
  author = {Gilray, Thomas and Adams, Michael D. and Might, Matthew},
  title = {Allocation Characterizes Polyvariance: A Unified Methodology for Polyvariant Control-Flow Analysis},
  booktitle = {Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming},
  pages = {407--420},
  year = {2016},
  series = {ICFP '16},
  address = {New York, NY, USA},
  month = sep,
  publisher = {ACM},
  isbn = {978-1-4503-4219-3},
  doi = {10.1145/2951913.2951936},
}

Copyright Notice

© ACM, 2016. This is the author’s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, (2016). http://doi.acm.org/10.1145/2951913.2951936.