TY - GEN
T1 - Distilling abstract machines
AU - Accattoli, Beniamino
AU - Barenbaum, Pablo
AU - Mazza, Damiano
PY - 2014/8/19
Y1 - 2014/8/19
N2 - 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.
AB - 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.
KW - abstract machines
KW - call-by-need
KW - explicit substitutions
KW - lambda-calculus
KW - linear head reduction
KW - linear logic
U2 - 10.1145/2628136.2628154
DO - 10.1145/2628136.2628154
M3 - Conference contribution
AN - SCOPUS:84907015363
SN - 9781450328739
SN - 9781450328739
T3 - Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP
SP - 363
EP - 376
BT - ICFP 2014 - Proceedings of the 2014 ACM SIGPLAN International Conference on Functional Programming
PB - Association for Computing Machinery
T2 - 19th ACM SIGPLAN International Conference on Functional Programming, ICFP 2014
Y2 - 1 September 2014 through 3 September 2014
ER -