A Simple and Efficient Implementation of Strong Call by Need by an Abstract Machine

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Biernacka, Małgorzata, Charatonik, Witold, Drab, Tomasz
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910065819123712
author Biernacka, Małgorzata
Charatonik, Witold
Drab, Tomasz
author_facet Biernacka, Małgorzata
Charatonik, Witold
Drab, Tomasz
contents Strong call-by-need combines full normalization with the sharing discipline of lazy evaluation, yet no prior implementation achieved both simplicity and efficiency. We introduce RKNL, an abstract machine that realizes strong call-by-need with bilinear overhead. The machine has been derived automatically from a higher-order evaluator that uses the technique of memothunks to implement laziness. By employing an off-the-shelf transformation tool implementing the ``functional correspondence'' between higher-order interpreters and abstract machines, we obtained 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 a bilinear number of steps, i.e., linear in both the number of beta-reductions and the size of the input term.
format Preprint
id arxiv_https___arxiv_org_abs_2603_21949
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle A Simple and Efficient Implementation of Strong Call by Need by an Abstract Machine
Biernacka, Małgorzata
Charatonik, Witold
Drab, Tomasz
Programming Languages
F.3.2
Strong call-by-need combines full normalization with the sharing discipline of lazy evaluation, yet no prior implementation achieved both simplicity and efficiency. We introduce RKNL, an abstract machine that realizes strong call-by-need with bilinear overhead. The machine has been derived automatically from a higher-order evaluator that uses the technique of memothunks to implement laziness. By employing an off-the-shelf transformation tool implementing the ``functional correspondence'' between higher-order interpreters and abstract machines, we obtained 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 a bilinear number of steps, i.e., linear in both the number of beta-reductions and the size of the input term.
title A Simple and Efficient Implementation of Strong Call by Need by an Abstract Machine
topic Programming Languages
F.3.2
url https://arxiv.org/abs/2603.21949