Abstract
We present an abstract machine for a strong call-by-need strategy in the lambda calculus. The machine has been derived automatically from a higher-order evaluator that uses the technique of memothunks to implement laziness. The derivation has been done with the use of an off-the-shelf transformation tool implementing the "functional correspondence" between higher-order interpreters and abstract machines, and it yields a simple and concise description of the machine. We prove that the resulting machine conservatively extends the lazy version of Krivine machine for the weak call-by-need strategy, and that it simulates the normal-order strategy in bilinear number of steps.
- Beniamino Accattoli. 2016. The Useful MAM, a Reasonable Implementation of the Strong λ -Calculus. In Logic, Language, Information, and Computation - 23rd International Workshop, WoLLIC 2016, Puebla, Mexico, August 16-19th, 2016. Proceedings (Lecture Notes in Computer Science, Vol. 9803). Springer, 1–21. https://doi.org/10.1007/978-3-662-52921-8_1
Google Scholar
Digital Library
- Beniamino Accattoli and Bruno Barras. 2017. Environments and the complexity of abstract machines. In Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming (PPDP’17), Namur, Belgium, October 09 - 11, 2017, Wim Vanhoof and Brigitte Pientka (Eds.). ACM, 4–16. isbn:978-1-4503-5291-8 https://doi.org/10.1145/3131851.3131855
Google Scholar
Digital Library
- Beniamino Accattoli and Claudio Sacerdoti Coen. 2015. On the Relative Usefulness of Fireballs. In 30th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2015, Kyoto, Japan, July 6-10, 2015. IEEE Computer Society, 141–155. https://doi.org/10.1109/LICS.2015.23
Google Scholar
Digital Library
- Beniamino Accattoli, Andrea Condoluci, and Claudio Sacerdoti Coen. 2021. Strong Call-by-Value is Reasonable, Implosively. In 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, June 29 - July 2, 2021. IEEE, 1–14. https://doi.org/10.1109/LICS52264.2021.9470630
Google Scholar
Digital Library
- Beniamino Accattoli and Ugo Dal Lago. 2016. (Leftmost-Outermost) Beta Reduction is Invariant, Indeed. In Logical Methods in Computer Science. Logical Methods in Computer Science, 12, https://doi.org/10.2168/LMCS-12(1:4)2016
Google Scholar
Cross Ref
- Beniamino Accattoli and Giulio Guerrieri. 2019. Abstract machines for Open Call-by-Value. Sci. Comput. Program., 184 (2019), https://doi.org/10.1016/j.scico.2019.03.002
Google Scholar
Digital Library
- Beniamino Accattoli and Maico Leberle. 2022. Useful Open Call-By-Need. In 30th EACSL Annual Conference on Computer Science Logic, CSL 2022, February 14-19, 2022, Göttingen, Germany (Virtual Conference), Florin Manea and Alex Simpson (Eds.) (LIPIcs, Vol. 216). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 4:1–4:21. https://doi.org/10.4230/LIPIcs.CSL.2022.4
Google Scholar
Cross Ref
- Mads Sig Ager, Dariusz Biernacki, Olivier Danvy, and Jan Midtgaard. 2003. A functional correspondence between evaluators and abstract machines. In Proceedings of the 5th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, 27-29 August 2003, Uppsala, Sweden. ACM, 8–19. https://doi.org/10.1145/888251.888254
Google Scholar
Digital Library
- Mads Sig Ager, Olivier Danvy, and Jan Midtgaard. 2004. A functional correspondence between call-by-need evaluators and lazy abstract machines. Inf. Process. Lett., 90, 5 (2004), 223–232. https://doi.org/10.1016/j.ipl.2004.02.012 Extended version available as the research report BRICS RS-04-3
Google Scholar
Digital Library
- Zena M. Ariola, Matthias Felleisen, John Maraist, Martin Odersky, and Philip Wadler. 1995. The Call-by-Need Lambda Calculus. In Conference Record of POPL’95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, USA, January 23-25, 1995, Ron K. Cytron and Peter Lee (Eds.). ACM Press, 233–246. https://doi.org/10.1145/199448.199507
Google Scholar
Digital Library
- Thibaut Balabonski, Pablo Barenbaum, Eduardo Bonelli, and Delia Kesner. 2017. Foundations of strong call by need. PACMPL, 1, ICFP (2017), 20:1–20:29. https://doi.org/10.1145/3110264
Google Scholar
Digital Library
- Thibaut Balabonski, Antoine Lanco, and Guillaume Melquiond. 2021. A Strong Call-By-Need Calculus. In 6th International Conference on Formal Structures for Computation and Deduction, FSCD 2021, July 17-24, 2021, Buenos Aires, Argentina (Virtual Conference), Naoki Kobayashi (Ed.) (LIPIcs, Vol. 195). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 9:1–9:22. https://doi.org/10.4230/LIPIcs.FSCD.2021.9
Google Scholar
Cross Ref
- Pablo Barenbaum, Eduardo Bonelli, and Kareem Mohamed. 2018. Pattern Matching and Fixed Points: Resource Types and Strong Call-By-Need: Extended Abstract. In Proceedings of the 20th International Symposium on Principles and Practice of Declarative Programming, PPDP 2018, Frankfurt am Main, Germany, September 03-05, 2018, David Sabel and Peter Thiemann (Eds.). ACM, 6:1–6:12. https://doi.org/10.1145/3236950.3236972
Google Scholar
Digital Library
- Mał gorzata Biernacka, Dariusz Biernacki, Witold Charatonik, and Tomasz Drab. 2020. An Abstract Machine for Strong Call by Value. In Programming Languages and Systems - 18th Asian Symposium, APLAS 2020, Fukuoka, Japan, November 30 - December 2, 2020, Proceedings, Bruno C. d. S. Oliveira (Ed.) (Lecture Notes in Computer Science, Vol. 12470). Springer, 147–166. https://doi.org/10.1007/978-3-030-64437-6_8
Google Scholar
Digital Library
- Mał gorzata Biernacka and Witold Charatonik. 2019. Deriving an Abstract Machine for Strong Call by Need. In 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, June 24-30, 2019, Dortmund, Germany, Herman Geuvers (Ed.) (LIPIcs, Vol. 131). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 8:1–8:20. https://doi.org/10.4230/LIPIcs.FSCD.2019.8
Google Scholar
Cross Ref
- Mał gorzata Biernacka, Witold Charatonik, and Tomasz Drab. 2021. A Derived Reasonable Abstract Machine for Strong Call by Value. In 23rd International Symposium on Principles and Practice of Declarative Programming (PPDP 2021). Association for Computing Machinery, New York, NY, USA. Article 6, 14 pages. isbn:9781450386890 https://doi.org/10.1145/3479394.3479401
Google Scholar
Digital Library
- Mał gorzata Biernacka, Witold Charatonik, and Tomasz Drab. 2022. Abstract Machines Workshop. https://doi.org/10.5281/zenodo.6786796 (software artifact)
Google Scholar
Digital Library
- Mał gorzata Biernacka, Witold Charatonik, and Tomasz Drab. 2022. The Zoo of Lambda-Calculus Reduction Strategies, and Coq. In 13th International Conference on Interactive Theorem Proving, ITP 2022, July 7 to 10, 2022, Haifa, Israel, June Andronick and Leonardo de Moura (Eds.) (LIPIcs, Vol. 237). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 7:1–7:19. https://doi.org/10.4230/LIPIcs.ITP.2022.7
Google Scholar
Cross Ref
- Mał gorzata Biernacka, Witold Charatonik, and Klara Zielinska. 2017. Generalized Refocusing: From Hybrid Strategies to Abstract Machines. In 2nd International Conference on Formal Structures for Computation and Deduction, FSCD 2017, September 3-9, 2017, Oxford, UK, Dale Miller (Ed.) (LIPIcs, Vol. 84). Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 10:1–10:17. isbn:978-3-95977-047-7 https://doi.org/10.4230/LIPIcs.FSCD.2017.10
Google Scholar
Cross Ref
- Mał gorzata Biernacka and Olivier Danvy. 2007. A Syntactic Correspondence between Context-Sensitive Calculi and Abstract Machines. Theor. Comput. Sci., 375, 1-3 (2007), 76–108. https://doi.org/10.1016/j.tcs.2006.12.028
Google Scholar
Digital Library
- Maciej Buszka and Dariusz Biernacki. 2021. Automating the Functional Correspondence Between Higher-Order Evaluators and Abstract Machines. In Logic-Based Program Synthesis and Transformation - 31st International Symposium, LOPSTR 2021, Tallinn, Estonia, September 7-8, 2021, Proceedings, Emanuele De Angelis and Wim Vanhoof (Eds.) (Lecture Notes in Computer Science, Vol. 13290). Springer, 38–59. https://doi.org/10.1007/978-3-030-98869-2_3
Google Scholar
Digital Library
- Stephen Chang and Matthias Felleisen. 2012. The Call-by-Need Lambda Calculus, Revisited. In Programming Languages and Systems - 21st European Symposium on Programming, ESOP 2012, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24 - April 1, 2012. Proceedings, Helmut Seidl (Ed.) (Lecture Notes in Computer Science, Vol. 7211). Springer, 128–147. https://doi.org/10.1007/978-3-642-28869-2_7
Google Scholar
Digital Library
- Andrea Condoluci, Beniamino Accattoli, and Claudio Sacerdoti Coen. 2019. Sharing Equality is Linear. In Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages, PPDP 2019, Porto, Portugal, October 7-9, 2019, Ekaterina Komendantskaya (Ed.). ACM, 9:1–9:14. https://doi.org/10.1145/3354166.3354174
Google Scholar
Digital Library
- Pierre Crégut. 2007. Strongly reducing variants of the Krivine abstract machine. High. Order Symb. Comput., 20, 3 (2007), 209–230. https://doi.org/10.1007/s10990-007-9015-z A preliminary version was presented at the 1990 ACM Conference on Lisp and Functional Programming
Google Scholar
Digital Library
- Olivier Danvy and Ian Zerny. 2013. A Synthetic Operational Account of Call-by-need Evaluation. In Proceedings of the 15th Symposium on Principles and Practice of Declarative Programming (PPDP ’13). ACM, New York, NY, USA. 97–108. isbn:978-1-4503-2154-9 https://doi.org/10.1145/2505879.2505898
Google Scholar
Digital Library
- Matthias Felleisen and Robert Hieb. 1992. The Revised Report on the Syntactic Theories of Sequential Control and State. Theor. Comput. Sci., 103, 2 (1992), 235–271. https://doi.org/10.1016/0304-3975(92)90014-7
Google Scholar
Digital Library
- Andrzej Filinski and Henning Korsholm Rohde. 2005. Denotational aspects of untyped normalization by evaluation. RAIRO Theor. Informatics Appl., 39, 3 (2005), 423–453. https://doi.org/10.1051/ita:2005026 A preliminary version was presented at FOSSACS 2004
Google Scholar
Cross Ref
- Álvaro García-Pérez and Pablo Nogueira. 2014. On the syntactic and functional correspondence between hybrid (or layered) normalisers and abstract machines. Sci. Comput. Program., 95 (2014), 176–199. https://doi.org/10.1016/j.scico.2014.05.011
Google Scholar
Digital Library
- Simon L. Peyton Jones. 1992. Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-Machine. J. Funct. Program., 2, 2 (1992), 127–202. https://doi.org/10.1017/S0956796800000319
Google Scholar
Cross Ref
- John Launchbury. 1993. A Natural Semantics for Lazy Evaluation. In Conference Record of the Twentieth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina, USA, January 1993, Mary S. Van Deusen and Bernard Lang (Eds.). ACM Press, 144–154. https://doi.org/10.1145/158511.158618
Google Scholar
Digital Library
- Johan Munk. 2007. A Study of Syntactic and Semantic Artifacts and its Application to Lambda Definability, Strong Normalization, and Weak Normalization in the Presence of State. Master’s thesis. DAIMI, Department of Computer Science, Aarhus University. Aarhus, Denmark. https://www.brics.dk/RS/08/3/BRICS-RS-08-3.pdf BRICS research report RS-08-3
Google Scholar
- Chris Okasaki. 1999. Purely functional data structures. Cambridge University Press. isbn:978-0-521-66350-2 https://doi.org/10.1017/CBO9780511530104
Google Scholar
Cross Ref
- Maciej Piróg and Dariusz Biernacki. 2010. A systematic derivation of the STG machine verified in Coq. In Proceedings of the 3rd ACM SIGPLAN Symposium on Haskell, Haskell 2010, Baltimore, MD, USA, 30 September 2010, Jeremy Gibbons (Ed.). ACM, 25–36. https://doi.org/10.1145/1863523.1863528
Google Scholar
Digital Library
- Peter Sestoft. 1997. Deriving a Lazy Abstract Machine. J. Funct. Program., 7, 3 (1997), May, 231–264. https://doi.org/10.1017/s0956796897002712
Google Scholar
Digital Library
Index Terms
A simple and efficient implementation of strong call by need by an abstract machine
Recommendations
An Abstract Machine for Strong Call by Value
Programming Languages and SystemsAbstractWe present an abstract machine that implements a full-reducing (a.k.a. strong) call-by-value strategy for pure -calculus. It is derived using Danvy et al.’s functional correspondence from Crégut’s KN by: (1) deconstructing KN to a call-by-name ...
A syntactic and functional correspondence between reduction semantics and reduction-free full normalisers
PEPM '13: Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulationOlivier Danvy and others have shown the syntactic correspondence between reduction semantics (a small-step semantics) and abstract machines, as well as the functional correspondence between reduction-free normalisers (a big-step semantics) and abstract ...
Deriving the full-reducing Krivine machine from the small-step operational semantics of normal order
PPDP '13: Proceedings of the 15th Symposium on Principles and Practice of Declarative ProgrammingWe derive by program transformation Pierre Crégut's full-reducing Krivine machine KN from the structural operational semantics of the normal order reduction strategy in a closure-converted pure lambda calculus. We thus establish the correspondence ...






Comments