Creative Commons Attribution 4.0 International license
Non-deterministic abstract machine (NDAM) is a recent implementation model for programming languages where one must choose among several redexes at each reduction step, like process calculi. These machines can be derived from a zipper semantics, a mix between structural operational semantics and context-based reduction semantics. Such a machine has been generated also for the λ-calculus without a fixed reduction strategy, i.e., with the full non-deterministic β-reduction. In that machine, substitution is an external operation that replaces all the occurrences of a variable at once. Implementing substitution with environments is more low-level and more efficient as variables are replaced only when needed. In this paper, we define a NDAM with environments for the λ-calculus without a fixed reduction strategy. We also introduce other optimizations, including a form of refocusing, and we show that we can restrict our optimized NDAM to recover some of the usual λ-calculus machines, e.g., the Krivine Abstract Machine. Most of the improvements we propose in this work could be applied to other NDAMs as well.
@InProceedings{biernacka_et_al:LIPIcs.FSCD.2024.11,
author = {Biernacka, Ma{\l}gorzata and Biernacki, Dariusz and Lenglet, Sergue\"{i} and Schmitt, Alan},
title = {{Optimizing a Non-Deterministic Abstract Machine with Environments}},
booktitle = {9th International Conference on Formal Structures for Computation and Deduction (FSCD 2024)},
pages = {11:1--11:22},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-323-2},
ISSN = {1868-8969},
year = {2024},
volume = {299},
editor = {Rehof, Jakob},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSCD.2024.11},
URN = {urn:nbn:de:0030-drops-203409},
doi = {10.4230/LIPIcs.FSCD.2024.11},
annote = {Keywords: Abstract machine, Explicit substitutions, Refocusing}
}
archived version