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

被引:2
作者
Biernacka, Malgorzata [1 ]
Charatonik, Witold [1 ]
Drab, Tomasz [1 ]
机构
[1] Univ Wroclaw, Fac Math & Comp Sci, Wroclaw, Poland
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2022年 / 6卷 / ICFP期
关键词
lambda-calculus; Abstract machines; Computational complexity; Reduction strategies; Normalization by evaluation; FUNCTIONAL CORRESPONDENCE;
D O I
10.1145/3549822
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present an abstract machine for a strong call-by-need strategy in the lambda calculus. The machine has been derived automatically from a higher-order evaluator that uses the technique of memothunks to implement laziness. The derivation has been done with the use of an off-the-shelf transformation tool implementing the "functional correspondence" between higher-order interpreters and abstract machines, and it yields 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 bilinear number of steps.
引用
收藏
页数:28
相关论文
共 34 条
[1]   Strong Call-by-Value is Reasonable, Implosively [J].
Accattoli, Beniamino ;
Condoluci, Andrea ;
Coen, Claudio Sacerdoti .
2021 36TH ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS), 2021,
[2]   Environments and the Complexity of Abstract Machines [J].
Accattoli, Beniamino ;
Barras, Bruno .
PROCEEDINGS OF THE 19TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2017), 2017, :4-16
[3]   The Useful MAM, a Reasonable Implementation of the Strong λ-Calculus [J].
Accattoli, Beniamino .
LOGIC, LANGUAGE, INFORMATION, AND COMPUTATION, 2016, 9803 :1-21
[4]   (LEFTMOST-OUTERMOST) BETA REDUCTION IS INVARIANT, INDEED [J].
Accattoli, Beniamino ;
Dal Lago, Ugo .
LOGICAL METHODS IN COMPUTER SCIENCE, 2016, 12 (01)
[5]   On the Relative Usefulness of Fireballs [J].
Accattoli, Beniamino ;
Coen, Claudio Sacerdoti .
2015 30TH ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS), 2015, :141-155
[6]  
Accattoli Beniamino, 2022, LIPIcs, V216, DOI [10.4230/LIPIcs.CSL. 2022.4, DOI 10.4230/LIPICS.CSL.2022.4]
[7]  
Accattoli Beniamino, 2019, SCI COMPUT PROGRAM, V184, DOI [10.1016/j.scico.2019.03.002, DOI 10.1016/J.SCIC0.2019.03.002]
[8]  
Ager M. S., 2003, P 5 ACM SIGPLAN INT, P8, DOI DOI 10.1145/888251.888254
[9]   A functional correspondence between call-by-need evaluators and lazy abstract machines [J].
Ager, MS ;
Danvy, O ;
Midtgaard, J .
INFORMATION PROCESSING LETTERS, 2004, 90 (05) :223-232
[10]  
Ariola ZM, 1995, POPL 95, P233, DOI DOI 10.1145/199448.199507