arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.21949cs.PL
收藏

基于抽象机的强调需调用的简单高效实现

A simple and efficient implementation of strong call by need by an abstract machine

University of Wrocław, Faculty of Mathematics and Computer Science(弗罗茨瓦夫大学数学与计算机科学系);Google(谷歌)

Małgorzata Biernacka, Witold Charatonik, Tomasz Drab

AI总结:

本文提出RKNL抽象机,通过双线性开销实现强调需调用,结合高阶求值器的memothunks技术,证明其在弱调需策略下扩展Krivine机,并在双线性步骤内模拟正常序策略。

摘要:

强调需调用结合完全归约与惰性求值的共享纪律,但此前未有同时简单高效的实现。我们引入RKNL抽象机,通过双线性开销实现强调需调用。该机由高阶求值器自动推导得出,利用memothunks技术实现惰性。通过使用功能性对应关系的转换工具,获得简洁的机器描述。证明该机保守扩展弱调需策略的Krivine机,并在双线性步骤内模拟正常序策略,即步骤数与β归约次数和输入项大小成线性关系。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑