Systematic abstraction of abstract machines

被引:10
|
作者
Van Horn, David [1 ]
Might, Matthew [2 ]
机构
[1] Northeastern Univ, Coll Comp & Informat Sci, Boston, MA 02115 USA
[2] Univ Utah, Sch Comp, Salt Lake City, UT 84112 USA
基金
美国国家科学基金会;
关键词
CONTROL-FLOW ANALYSIS; PROGRAM ANALYSIS; REACHABILITY;
D O I
10.1017/S0956796812000238
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We describe a derivational approach to abstract interpretation that yields novel and transparently sound static analyses when applied to well-established abstract machines for higher-order and imperative programming languages. To demonstrate the technique and support our claim, we transform the CEK machine of Felleisen and Friedman (Proc. of the 14th ACM SIGACT-SIGPLAN Symp. Prin. Program. Langs, 1987, pp. 314-325), a lazy variant of Krivine's machine (Higher-Order Symb. Comput. Vol 20, 2007, pp. 199-207), and the stack-inspecting CM machine of Clements and Felleisen (ACM Trans. Program. Lang. Syst. Vol 26, 2004, pp. 1029-1052) into abstract interpretations of themselves. The resulting analyses bound temporal ordering of program events; predict return-flow and stack-inspection behavior; and approximate the flow and evaluation of by-need parameters. For all of these machines, we find that a series of well-known concrete machine refactorings, plus a technique of store-allocated continuations, leads to machines that abstract into static analyses simply by bounding their stores. These machines are parameterized by allocation functions that tune performance and precision and substantially expand the space of analyses that this framework can represent. We demonstrate that the technique scales up uniformly to allow static analysis of realistic language features, including tail calls, conditionals, mutation, exceptions, first-class continuations, and even garbage collection. In order to close the gap between formalism and implementation, we provide translations of the mathematics as running Haskell code for the initial development of our method.
引用
收藏
页码:705 / 746
页数:42
相关论文
共 50 条
  • [1] Keywords: abstract, abstraction
    Heath, Stephen
    [J]. CRITICAL QUARTERLY, 2013, 55 (03) : 1 - 10
  • [2] Refunctionalization of Abstract Abstract Machines
    Wei, Guannan
    Decker, James
    Rompf, Tiark
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [3] Optimizing Abstract Abstract Machines
    Johnson, J. Ian
    Labich, Nicholas
    Might, Matthew
    Van Horn, David
    [J]. ACM SIGPLAN NOTICES, 2013, 48 (09) : 443 - 454
  • [4] Abstract machines
    Raunig, Herald
    [J]. LOGOS, 2010, (01): : 207 - 215
  • [5] The new abstraction (Abstract painting)
    MacAdam, Barbara A.
    [J]. ARTNEWS, 2007, 106 (04): : 110 - 115
  • [6] Refunctionalization of Abstract Abstract Machines Bridging the Gap between Abstract Abstract Machines and Abstract Definitional Interpreters (Functional Pearl)
    Wei, Guannan
    Decker, James
    Rompf, Tiark
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES, 2018,
  • [7] MAKING ABSTRACT MACHINES LESS ABSTRACT
    HANNAN, J
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1991, 523 : 618 - 635
  • [8] Abstract parallel machines
    O'Donnell, J
    Rünger, G
    [J]. COMPUTERS AND ARTIFICIAL INTELLIGENCE, 2000, 19 (02): : 105 - 129
  • [9] Distilling Abstract Machines
    Accattoli, Beniamino
    Barenbaum, Pablo
    Mazza, Damiano
    [J]. ACM SIGPLAN NOTICES, 2014, 49 (09) : 363 - 376
  • [10] CONCURRENT ABSTRACT MACHINES
    BERRY, G
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1991, 494 : 49 - 49