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

📅 2026-03-23
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Although call-by-strong-demand strategies combine the sharing benefits of full reduction and lazy evaluation, they have long lacked a concise and efficient implementation. This work proposes RKNL, the first abstract machine for strong demand that achieves both simplicity and efficiency. RKNL incorporates lazy evaluation via memothunks and is derived through a conservative extension of the weak-call-by-name Krivine machine using an automatic “function correspondence” inference method. It simulates normal-order reduction with bilinear time complexity—linear in both the number of β-reductions and the size of the input term—thereby delivering the first practical abstract machine for strong demand.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

strong call-by-need
abstract machine
lazy evaluation
normalization
efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

strong call-by-need
abstract machine
memothunks
functional correspondence
bilinear overhead
🔎 Similar Papers
M
Małgorzata Biernacka
University of Wrocław, Faculty of Mathematics and Computer Science, Poland
Witold Charatonik
Witold Charatonik
Professor of Computer Science, University of Wrocław
Logic in Computer Science
T
Tomasz Drab
University of Wrocław, Faculty of Mathematics and Computer Science & Google, Poland