Abstract
Abstract machines for strong evaluation of the \(\lambda \)-calculus enter into arguments and have a set of transitions for backtracking out of an evaluated argument. We study a new abstract machine which avoids backtracking by splitting the run of the machine in smaller jobs, one for argument, and that jumps directly to the next job once one is finished.
Usually, machines are also deterministic and implement deterministic strategies. Here we weaken this aspect and consider a light form of non-determinism, namely the diamond property, for both the machine and the strategy. For the machine, this introduces a modular management of jobs, parametric in a scheduling policy. We then show how to obtain various strategies, among which leftmost-outermost evaluation, by instantiating in different ways the scheduling policy.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
To ease the language, in the paper we shorten leftmost-outermost to leftmost.
References
Accattoli, B.: The useful MAM, a reasonable implementation of the strong \(\lambda \)-calculus. In: Väänänen, J., Hirvonen, Å., de Queiroz, R. (eds.) WoLLIC 2016. LNCS, vol. 9803, pp. 1–21. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-52921-8_1
Accattoli, B., Barenbaum, P.: A diamond machine for strong evaluation. CoRR abs/2309.12515 (2023). https://arxiv.org/abs/2309.12515
Accattoli, B., Barenbaum, P., Mazza, D.: Distilling abstract machines. In: Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming, Gothenburg, Sweden, September 1–3, 2014, pp. 363–376 (2014). https://doi.org/10.1145/2628136.2628154
Accattoli, B., Barenbaum, P., Mazza, D.: A strong distillery. In: Feng, X., Park, S. (eds.) APLAS 2015. LNCS, vol. 9458, pp. 231–250. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-26529-2_13
Accattoli, B., Barras, B.: Environments and the complexity of abstract machines. In: Vanhoof, W., Pientka, B. (eds.) Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming, Namur, Belgium, October 09–11, 2017, pp. 4–16. ACM (2017). https://doi.org/10.1145/3131851.3131855
Accattoli, B., Bonelli, E., Kesner, D., Lombardi, C.: A nonstandard standardization theorem. In: Jagannathan, S., Sewell, P. (eds.) The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20–21, 2014, pp. 659–670. ACM (2014). https://doi.org/10.1145/2535838.2535886
Accattoli, B., Condoluci, A., Guerrieri, G., Sacerdoti Coen, C.: Crumbling abstract machines. In: Komendantskaya, E. (ed.) Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages, PPDP 2019, Porto, Portugal, October 7–9, 2019, pp. 4:1–4:15. ACM (2019). https://doi.org/10.1145/3354166.3354169
Accattoli, B., Condoluci, A., Sacerdoti Coen, C.: 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, pp. 1–14. IEEE (2021). https://doi.org/10.1109/LICS52264.2021.9470630
Accattoli, B., Faggian, C., Guerrieri, G.: Factorization and normalization, essentially. In: Lin, A.W. (ed.) APLAS 2019. LNCS, vol. 11893, pp. 159–180. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-34175-6_9
Accattoli, B., Guerrieri, G.: Abstract machines for open call-by-value. Sci. Comput. Program. 184 (2019). https://doi.org/10.1016/j.scico.2019.03.002
Barendregt, H.P., Kennaway, R., Klop, J.W., Sleep, M.R.: Needed reduction and spine strategies for the lambda calculus. Inf. Comput. 75(3), 191–231 (1987). https://doi.org/10.1016/0890-5401(87)90001-0
Biernacka, M., Biernacki, D., Charatonik, W., Drab, T.: An abstract machine for strong call by value. In: Oliveira, B.C.S. (ed.) APLAS 2020. LNCS, vol. 12470, pp. 147–166. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-64437-6_8
Biernacka, M., Biernacki, D., Lenglet, S., Schmitt, A.: Non-deterministic abstract machines. In: Klin, B., Lasota, S., Muscholl, A. (eds.) 33rd International Conference on Concurrency Theory, CONCUR 2022, September 12–16, 2022, Warsaw, Poland. LIPIcs, vol. 243, pp. 7:1–7:24. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022). https://doi.org/10.4230/LIPIcs.CONCUR.2022.7
Biernacka, M., Charatonik, W.: Deriving an abstract machine for strong call by need. In: Geuvers, H. (ed.) 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, June 24–30, 2019, Dortmund, Germany. LIPIcs, vol. 131, pp. 8:1–8:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019). https://doi.org/10.4230/LIPIcs.FSCD.2019.8
Biernacka, M., Charatonik, W., Drab, T.: A derived reasonable abstract machine for strong call by value. In: Veltri, N., Benton, N., Ghilezan, S. (eds.) PPDP 2021: 23rd International Symposium on Principles and Practice of Declarative Programming, Tallinn, Estonia, September 6–8, 2021, pp. 6:1–6:14. ACM (2021). https://doi.org/10.1145/3479394.3479401
Biernacka, M., Charatonik, W., Drab, T.: A simple and efficient implementation of strong call by need by an abstract machine. Proc. ACM Program. Lang. 6(ICFP), 109–136 (2022). https://doi.org/10.1145/3549822
Biernacka, M., Charatonik, W., Zielinska, K.: 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, pp. 10:1–10:17 (2017). https://doi.org/10.4230/LIPIcs.FSCD.2017.10
Boudol, G.: Computational semantics of term rewriting systems. In: Algebraic Methods in Semantics, pp. 169–236. Cambridge University Press (1986)
de Carvalho, D., Pagani, M., Tortora de Falco, L.: A semantic measure of the execution time in linear logic. Theor. Comput. Sci. 412(20), 1884–1902 (2011). https://doi.org/10.1016/j.tcs.2010.12.017
Crégut, P.: Strongly reducing variants of the Krivine abstract machine. High. Order Symb. Comput. 20(3), 209–230 (2007). https://doi.org/10.1007/s10990-007-9015-z
Dal Lago, U., Martini, S.: The weak lambda calculus as a reasonable machine. Theor. Comput. Sci. 398(1–3), 32–50 (2008). https://doi.org/10.1016/j.tcs.2008.01.044
Danvy, O., Nielsen, L.R.: Refocusing in Reduction Semantics. Tech. Rep. RS-04-26, BRICS (2004)
García-Pérez, Á., Nogueira, P.: The full-reducing Krivine abstract machine KN simulates pure normal-order reduction in lockstep: a proof via corresponding calculus. J. Funct. Program. 29, e7 (2019). https://doi.org/10.1017/S0956796819000017
García-Pérez, Á., Nogueira, P., Moreno-Navarro, J.J.: Deriving the full-reducing Krivine machine from the small-step operational semantics of normal order. In: 15th International Symposium on Principles and Practice of Declarative Programming, PPDP’13, pp. 85–96. ACM (2013). https://doi.org/10.1145/2505879.2505887
Girard, J.: Light linear logic. Inf. Comput. 143(2), 175–204 (1998). https://doi.org/10.1006/inco.1998.2700
Gonthier, G., Lévy, J.J., Melliès, P.A.: An abstract standardisation theorem. In: Proceedings of the Seventh Annual Symposium on Logic in Computer Science (LICS ’92), Santa Cruz, California, USA, June 22–25, 1992, pp. 72–81. IEEE Computer Society (1992). https://doi.org/10.1109/LICS.1992.185521
Huet, G.P., Lévy, J.J.: Computations in orthogonal rewriting systems, I. In: Lassez, J., Plotkin, G.D. (eds.) Computational Logic - Essays in Honor of Alan Robinson, pp. 395–414. The MIT Press (1991)
Huet, G.P., Lévy, J.J.: Computations in orthogonal rewriting systems, II. In: Lassez, J., Plotkin, G.D. (eds.) Computational Logic - Essays in Honor of Alan Robinson, pp. 415–443. The MIT Press (1991)
Maranget, L.: Optimal derivations in weak lambda-calculi and in orthogonal terms rewriting systems. In: Wise, D.S. (ed.) Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, Orlando, Florida, USA, January 21–23, 1991, pp. 255–269. ACM Press (1991). https://doi.org/10.1145/99583.99618
Melliès, P.A.: Description Abstraite de système de réécriture. PhD thesis, Paris 7 University (1996)
Oostrom, V.: Normalisation in weakly orthogonal rewriting. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 60–74. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48685-2_5
Terese: Term rewriting systems. Cambridge tracts in theoretical computer science, vol. 55. Cambridge University Press (2003)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Accattoli, B., Barenbaum, P. (2023). A Diamond Machine for Strong Evaluation. In: Hur, CK. (eds) Programming Languages and Systems. APLAS 2023. Lecture Notes in Computer Science, vol 14405. Springer, Singapore. https://doi.org/10.1007/978-981-99-8311-7_4
Download citation
DOI: https://doi.org/10.1007/978-981-99-8311-7_4
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-8310-0
Online ISBN: 978-981-99-8311-7
eBook Packages: Computer ScienceComputer Science (R0)