Abstract
The Krivine machine is a simple and natural implementation of the normal weak-head reduction strategy for pure λ-terms. While its original description has remained unpublished, this machine has served as a basis for many variants, extensions and theoretical studies. In this paper, we present the Krivine machine and some well-known variants in a common framework. Our framework consists of a hierarchy of intermediate languages that are subsets of the λ-calculus. The whole implementation process (compiler + abstract machine) is described via a sequence of transformations all of which express an implementation choice. We characterize the essence of the Krivine machine and locate it in the design space of functional language implementations. We show that, even within the particular class of Krivine machines, hundreds of variants can be designed.
Similar content being viewed by others
References
Appel, A.W.: Compiling with Continuations. Cambridge University Press, Cambridge (1992)
Asperti, A.: A categorical understanding of environment machines. J. Funct. Program. 2(1), 23–59 (1992)
Cousineau, G., Curien, P.-L., Mauny, M.: The categorical abstract machine. Sci. Comput. Program. 8(2), 173–202 (1987)
Crégut, P.: An abstract machine for lambda-terms normalization. In: Proc. of LFP’90, pp. 333–340. ACM Press, New York (June 1990)
Crégut, P.: Machines à environnement pour la réduction symbolique et l’évaluation partielle. Thèse de l’université de Paris VII (1991)
Curien, P.-L.: An abstract framework for environment machines. Theor. Comput. Sci. 82, 389–402 (1991)
De Brujin, N.G.: λ-calculus notation with nameless dummies: a tool for automatic formula manipulation, with application to Church Rosser theorem. In Indag. Math. 34, 381–392 (1972)
De Groote, P.: An environment machine for the lambda-mu-calculus. Math. Struct. Comput. Sci. 8(6), 637–669 (1998)
Douence, R.: Décrire et comparer les mises en œuvre de langages fonctionnels. Ph.D. Thesis, University of Rennes I (1996)
Douence, R., Fradet, P.: A taxonomy of functional language implementations. Part I: call-by-value. INRIA Research Report 2783 (Jan. 1996)
Douence, R., Fradet, P.: A taxonomy of functional language implementations. Part II: call-byname, call-by-need, and graph reduction. INRIA Research Report 3050 (Nov. 1996)
Douence, R., Fradet, P.: A systematic study of functional language implementations. ACM Trans. Program. Lang. Syst. 20(2), 344–387 (1998)
Fairbairn, J., Wray, S.: Tim: a simple, lazy abstract machine to execute supercombinators. In: Proc of FPCA’87. Lecture Notes in Computer Science, vol. 274, pp. 34–45 (1987)
Fradet, P., Le Métayer, D.: Compilation of functional languages by program transformation. ACM Trans. Program. Lang. Syst. 13(1), 21–51 (1991)
Hall, C.: Using Hindley-Milner type inference to optimise list representation. In: Proc. of LFP’94, pp. 162–172 (1994)
Hannan, J., Miller, D.: From operational semantics to abstract machines: preliminary results. In: Proc. of LFP’90, Nice, France, pp. 323–332 (1990)
Hardin, T., Maranget, L., Pagano, B.: Functional back-ends within the lambda-sigma calculus. In: Proc. of ICFP’1996, pp. 25–33 (1996)
Johnsson, T.: Compiling lazy functional languages. Ph.D. Thesis, Chalmers University (1987)
Joy, M.S., Rayward-Smith, V.J., Burton, F.W.: Efficient combinator code. Comput. Lang. 10(3) (1985)
Krivine, J.-L.: Un interprète du lambda-calcul. Unpublished draft, available at ftp://ftp.logique.jussieu.fr/pub/distrib/krivine/interprt.pdf
Landin, P.J.: The mechanical evaluation of expressions. Comput. J. 6(4), 308–320 (1964)
Lang, F., Benaissa, Z., Lescanne, P.: Super-closures. In: Proc. of WPAM’98, as Technical Report of the University of SaarBruck, number A 02/98 (1998)
Leroy, X.: The Zinc experiment: an economical implementation of the ML language. INRIA Technical Report 117 (1990)
Leroy, X.: Unboxed objects and polymorphic typing. In: ACM Symp. Princ. Prog. Lang., pp. 177–188, 1992
Nielson, H.R., Nielson, F.: Semantics with Applications: A Formal Introduction. Wiley, New York (1992)
Parigot, M.: λ µ-calculus: an algorithmic interpretation of classical natural deduction. In: Proc. of LPAR’92. Lecture Notes in Artificial Intelligence, vol. 624, pp. 190–201 (1992)
Peyton Jones, S.L.: Implementing lazy functional languages on stock hardware: the spineless tagless G-machine. J. Funct. Program. 2(2), 127–202 (1992)
Peyton Jones, S.L., Lester, D.: Implementing Functional Languages, a Tutorial. Prentice-Hall, Englewood Clips (1992)
Peyton Jones, S.L., Partain, W., Santos, A.: Let-floating: moving bindings to give faster programs. In: Proc. of ICFP’96, pp. 1–12, 1996
Sestoft, P.: Analysis and efficient implementation of functional programs. Ph.D. Thesis, DIKU, University of Copenhagen (1991)
Sestoft, P.: Deriving a lazy abstract machine. J. Funct. Program. 7(3), 231–264 (1997)
Shao, Z., Reppy, J., Appel, A.: Unrolling lists. In: Proc. of LFP’94, pp. 185–195, 1994
Streicher, T., Reus, B.: Classical logic, continuation semantics and abstract machines. J. Funct. Program. 8(6), 543–572 (1998)
Turner, D.A.: A new implementation technique for applicative languages. Softw. Pract. Exp. 9, 31–49 (1979)
Author information
Authors and Affiliations
Corresponding author
Additional information
Work performed while at INRIA/IRISA, Campus de Beaulieu, 35042 Rennes Cedex, France.
Rights and permissions
About this article
Cite this article
Douence, R., Fradet, P. The next 700 Krivine machines. Higher-Order Symb Comput 20, 237–255 (2007). https://doi.org/10.1007/s10990-007-9016-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-007-9016-y