Abstract
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.
- B. Accattoli. An abstract factorization theorem for explicit substitutions. In RTA, pages 6--21, 2012.Google Scholar
- B. Accattoli. Linear logic and strong normalization. In RTA, pages 39--54, 2013.Google Scholar
- B. Accattoli. Evaluating functions as processes. In TERMGRAPH, pages 41--55, 2013.Google Scholar
Cross Ref
- B. Accattoli and U. Dal Lago. On the invariance of the unitary cost model for head reduction. In RTA, pages 22--37, 2012.Google Scholar
- B. Accattoli and U. Dal Lago. Beta Reduction is Invariant, Indeed. Accepted to LICS/CSL 2014, 2014. Google Scholar
Digital Library
- B. Accattoli and D. Kesner. The structural λ-calculus. In CSL, pages 381--395, 2010. Google Scholar
Digital Library
- B. Accattoli and L. Paolini. Call-by-value solvability, revisited. In FLOPS, pages 4--16, 2012. Google Scholar
Digital Library
- B. Accattoli and C. Sacerdoti Coen. On the Value of Variables. Accepted to WOLLIC 2014, 2014.Google Scholar
- B. Accattoli, P. Barenbaum, and D. Mazza. Distilling Abstract Machines (Long Version). Available at http://arxiv.org/abs/1406.2370, 2014.Google Scholar
- B. Accattoli, E. Bonelli, D. Kesner, and C. Lombardi. A nonstandard standardization theorem. In POPL, pages 659--670, 2014. Google Scholar
Digital Library
- M. S. Ager, D. Biernacki, O. Danvy, and J. Midtgaard. A functional correspondence between evaluators and abstract machines. In PPDP, pages 8--19, 2003. Google Scholar
Digital Library
- M. S. Ager, O. Danvy, and J. Midtgaard. A functional correspondence between call-by-need evaluators and lazy abstract machines. Inf. Process. Lett., 90(5):223--232, 2004. Google Scholar
Digital Library
- Z. M. Ariola and M. Felleisen. The call-by-need lambda calculus. J. Funct. Program., 7(3):265--301, 1997. Google Scholar
Digital Library
- Z. M. Ariola, A. Bohannon, and A. Sabry. Sequent calculi and abstract machines. ACM Trans. Program. Lang. Syst., 31(4), 2009. Google Scholar
Digital Library
- M. Biernacka and O. Danvy. A syntactic correspondence between context-sensitive calculi and abstract machines. Theor. Comput. Sci., 375(1-3):76--108, 2007. Google Scholar
Digital Library
- M. Biernacka and O. Danvy. A concrete framework for environment machines. ACM Trans. Comput. Log., 9(1), 2007. Google Scholar
Digital Library
- S. Chang and M. Felleisen. The call-by-need lambda calculus, revisited. In ESOP, pages 128--147, 2012. Google Scholar
Digital Library
- P. Clairambault. Estimation of the length of interactions in arena game semantics. In FOSSACS, pages 335--349, 2011. Google Scholar
Digital Library
- P. Crégut. Strongly reducing variants of the Krivine abstract machine. Higher-Order and Symbolic Computation, 20(3):209--230, 2007. Google Scholar
Digital Library
- V. Danos and L. Regnier. Head linear reduction. Technical report, 2004.Google Scholar
- V. Danos, H. Herbelin, and L. Regnier. Game semantics & abstract machines. In LICS, pages 394--405, 1996. Google Scholar
Digital Library
- O. Danvy. A rational deconstruction of landin's secd machine. In IFL, pages 52--71, 2004. Google Scholar
Digital Library
- O. Danvy and L. R. Nielsen. Refocusing in reduction semantics. Technical Report RS-04-26, BRICS, 2004.Google Scholar
- O. Danvy and I. Zerny. A synthetic operational account of call-by-need evaluation. In PPDP, pages 97--108, 2013. Google Scholar
Digital Library
- N. G. de Bruijn. Generalizing Automath by Means of a Lambda-Typed Lambda Calculus. In Mathematical Logic and Theoretical Computer Science, number 106 in Lecture Notes in Pure and Applied Mathematics, pages 71--92. Marcel Dekker, 1987.Google Scholar
- R. Di Cosmo, D. Kesner, and E. Polonovski. Proof nets and explicit substitutions. Math. Str. in Comput. Sci., 13(3):409--450, 2003. Google Scholar
Digital Library
- T. Ehrhard and L. Regnier. Böhm trees, Krivine's machine and the Taylor expansion of lambda-terms. In CiE, pages 186--197, 2006. Google Scholar
Digital Library
- M. Felleisen and D. P. Friedman. Control operators, the SECDmachine, and the lambda-calculus. In 3rd Working Conference on the Formal Description of Programming Concepts, Aug. 1986.Google Scholar
- R. Garcia, A. Lumsdaine, and A. Sabry. Lazy evaluation and delimited control. In POPL, pages 153--164, 2009. Google Scholar
Digital Library
- T. Hardin and L. Maranget. Functional runtime systems within the lambda-sigma calculus. J. Funct. Program., 8(2):131--176, 1998. Google Scholar
Digital Library
- D. Kesner. A theory of explicit substitutions with safe and full composition. Logical Methods in Computer Science, 5(3), 2009.Google Scholar
- D. Kesner and S. Lengrand. Resource operators for lambda-calculus. Inf. Comput., 205(4):419--473, 2007. Google Scholar
Digital Library
- D. Kesner and F. Renaud. The prismoid of resources. In MFCS, pages 464--476, 2009. Google Scholar
Digital Library
- J.-L. Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199--207, 2007. Google Scholar
Digital Library
- P. J. Landin. The Mechanical Evaluation of Expressions. The Computer Journal, 6(4):308--320, Jan. 1964. URL http://dx.doi.org/10.1093/comjnl/6.4.308.Google Scholar
Cross Ref
- F. Lang. Explaining the lazy Krivine machine using explicit substitution and addresses. Higher-Order and Symbolic Computation, 20(3):257--270, 2007. Google Scholar
Digital Library
- X. Leroy. The ZINC experiment: an economical implementation of the ML language. Technical report 117, INRIA, 1990. URL http://gallium.inria.fr/xleroy/publi/ZINC.pdf.Google Scholar
- J. Maraist, M. Odersky, and P. Wadler. The call-by-need lambda calculus. J. Funct. Program., 8(3):275--317, 1998. Google Scholar
Digital Library
- J. Maraist, M. Odersky, D. N. Turner, and P. Wadler. Call-by-name, call-by-value, call-by-need and the linear lambda calculus. Theor. Comput. Sci., 228(1-2):175--210, 1999. Google Scholar
Digital Library
- G. Mascari and M. Pedicini. Head linear reduction and pure proof net extraction. Theor. Comput. Sci., 135(1):111--137, 1994. Google Scholar
Digital Library
- R. Milner. Local bigraphs and confluence: Two conjectures. Electr. Notes Theor. Comput. Sci., 175(3):65--73, 2007. Google Scholar
Digital Library
- R. P. Nederpelt. The fine-structure of lambda calculus. Technical Report CSN 92/07, Eindhoven Univ. of Technology, 1992.Google Scholar
- G. D. Plotkin. Call-by-name, call-by-value and the lambda-calculus. Theor. Comput. Sci., 1(2):125--159, 1975.Google Scholar
Cross Ref
- P. Sestoft. Deriving a lazy abstract machine. J. Funct. Program, 7(3): 231--264, 1997. Google Scholar
Digital Library
Index Terms
Distilling abstract machines
Recommendations
Distilling abstract machines
ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programmingIt 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 ...
Classical By-Need
Proceedings of the 25th European Symposium on Programming Languages and Systems - Volume 9632Call-by-need calculi are complex to design and reason with. When adding control effects, the very notion of canonicity is irremediably lost, the resulting calculi being necessarily ad hoc. This calls for a design of call-by-need guided by logical rather ...
A nonstandard standardization theorem
POPL '14Standardization is a fundamental notion for connecting programming languages and rewriting calculi. Since both programming languages and calculi rely on substitution for defining their dynamics, explicit substitutions (ES) help further close the gap ...







Comments