Distilling Abstract Machines

被引:5
|
作者
Accattoli, Beniamino [1 ,2 ]
Barenbaum, Pablo [3 ]
Mazza, Damiano [4 ]
机构
[1] Carnegie Mellon Univ, Pittsburgh, PA 15213 USA
[2] Univ Bologna, I-40126 Bologna, Italy
[3] Univ Buenos Aires, CONICET, RA-1053 Buenos Aires, DF, Argentina
[4] Univ Paris 13, CNRS, Sorbonne Paris Cite, LIPN,UMR 7030, F-93430 Villetaneuse, France
关键词
Lambda-calculus; abstract machines; explicit substitutions; linear logic; call-by-need; linear head reduction; CALL-BY-VALUE; NEED;
D O I
10.1145/2692915.2628154
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It is well-known that many environment-based abstract machines can be seen as strategies in lambda calculi with explicit substitutions (ES). Recently, graphical syntaxes and linear logic led to the linear substitution calculus (LSC), a new approach to ES that is halfway between small-step calculi and traditional calculi with ES. This paper studies the relationship between the LSC and environment-based abstract machines. While traditional calculi with ES simulate abstract machines, the LSC rather distills them: some transitions are simulated while others vanish, as they map to a notion of structural congruence. The distillation process unveils that abstract machines in fact implement weak linear head reduction, a notion of evaluation having a central role in the theory of linear logic. We show that such a pattern applies uniformly in call-by-name, call-by-value, and call-by-need, catching many machines in the literature. We start by distilling the KAM, the CEK, and a sketch of the ZINC, and then provide simplified versions of the SECD, the lazy KAM, and Sestoft's machine. Along the way we also introduce some new machines with global environments. Moreover, we show that distillation preserves the time complexity of the executions, i.e. the LSC is a complexity-preserving abstraction of abstract machines.
引用
收藏
页码:363 / 376
页数:14
相关论文
共 50 条
  • [1] Distilling Abstract Machines
    Accattoli, Beniamino
    Barenbaum, Pablo
    Mazza, Damiano
    ICFP'14: PROCEEDINGS OF THE 2014 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2014, : 363 - 376
  • [2] Environments and the Complexity of Abstract Machines
    Accattoli, Beniamino
    Barras, Bruno
    PROCEEDINGS OF THE 19TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2017), 2017, : 4 - 16
  • [3] Refunctionalization of Abstract Abstract Machines
    Wei, Guannan
    Decker, James
    Rompf, Tiark
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [4] Optimizing Abstract Abstract Machines
    Johnson, J. Ian
    Labich, Nicholas
    Might, Matthew
    Van Horn, David
    ACM SIGPLAN NOTICES, 2013, 48 (09) : 443 - 454
  • [5] Refunctionalization of Abstract Abstract Machines Bridging the Gap between Abstract Abstract Machines and Abstract Definitional Interpreters (Functional Pearl)
    Wei, Guannan
    Decker, James
    Rompf, Tiark
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES, 2018,
  • [6] Abstracting Abstract Machines
    Van Horn, David
    Might, Matthew
    ICFP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2010, : 51 - 62
  • [7] Crumbling Abstract Machines
    Accattoli, Beniamino
    Condoluci, Andrea
    Guerrieri, Giulio
    Coen, Claudio Sacerdoti
    PROCEEDINGS OF THE 21ST INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2019), 2019,
  • [8] Abstracting Abstract Machines
    Van Horn, David
    Might, Matthew
    ACM SIGPLAN NOTICES, 2010, 45 (09) : 51 - 62
  • [9] Sequent Calculi and Abstract Machines
    Ariola, Zena M.
    Bohannon, Aaron
    Sabry, Amr
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2009, 31 (04):
  • [10] Abstract machines, optimal reduction, and streams
    Lai, Anna Chiara
    Pedicini, Marco
    Piazza, Mario
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2019, 29 (09) : 1379 - 1410