Skip to main content Accessibility help

The full-reducing Krivine abstract machine KN simulates pure normal-order reduction in lockstep: A proof via corresponding calculus



We exploit the idea of proving properties of an abstract machine by using a corresponding semantic artefact better suited to their proof. The abstract machine is an improved version of Pierre Crégut’s full-reducing Krivine machine KN. The original version works with closed terms of the pure lambda calculus with de Bruijn indices. The improved version reduces in similar fashion but works on closures where terms may be open. The corresponding semantic artefact is a structural operational semantics of a calculus of closures whose reduction relation is purposely a reduction strategy. As shown in previous work, improved KN and the structural operational semantics ‘correspond’, i.e. both artefacts realise the same reduction strategy. In this paper, we prove in the calculus of closures that the reduction strategy simulates in lockstep (at every reduction step) the complete and standard normal-order strategy (i.e. leftmost reduction to normal form) of the pure lambda calculus. The simulation is witnessed by a substitution function from closures of the closure calculus to pure terms of the pure lambda calculus. Thus, KN also simulates normal-order in lockstep by the correspondence. This result is stronger than the known proof that KN is complete, for in the pure lambda calculus there are complete but non-standard strategies. The lockstep simulation proof consists of straightforward structural inductions, thanks to three properties of the closure calculus we call ‘index alignment’, ‘parameters-as-levels’ and ‘balanced derivations’. The first two come from KN. Thanks to these properties, a proof in a calculus of closures involving de Bruijn indices and de Bruijn levels is unproblematic. There is no lexical adjustment at binding lookup, on-the-fly alpha-conversion or recursive traversals of the term to deal with bound and free variables as in other calculi. This paper contributes to the framework for environment machines of Biernacka and Danvy a full-reducing open-terms closure calculus, its corresponding abstract machine, and a lockstep simulation proof via a substitution function.



Hide All
Abadi, M., Cardelli, L., Curien, P.-L. & Lévy, J.-J. (1991) Explicit substitutions. J. Funct. Program. 1(4), 375416.
Accattoli, B. (2016) The useful MAM, a reasonable implementation of the strong lambda-calculus. In Proceedings of the 23rd Workshop on Logic, Language, Information and Computation. LNCS, vol. 9803. Springer, pp. 121.
Accattoli, B. & Kesner, D. (2012) Preservation of strong normalisation modulo permutations for the structural lambda-calculus. Log. Methods Comput. Sci. 8(1), 144.
Accattoli, B., Barenbaum, P. & Mazza, D. (2015) A strong distillery. In Proceedings of the 13th Asian Symposium on Programming and Systems. LNCS, vol. 9458. Springer, pp. 231250.
Ariola, Z. M., Bohannon, A. & Sabry, A. (2009) Sequent calculi and abstract machines. ACM Trans. Program. Lang. Syst. 31(4), 13:113:48.
Aydemir, B., Charguéraud, A., Pierce, B. C., Pollack, R. & Weirich, S. (2008) Engineering formal metatheory. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, pp. 315.
Aydemir, B. E., Bohannon, A., Fairbairn, M., Foster, J. N., Pierce, B. C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S. & Zdancewic, S. (2005) Mechanized metatheory for the masses: The POPLmark challenge. In Proceedings of the 18th International Conference on Theorem Proving in Higher Order Logics. LNCS, vol. 3603. Springer, pp. 5065.
Barendregt, H. P. (1984) The Lambda Calculus, Its Syntax and Semantics. North Holland.
Barendregt, H. P. (1990) Functional programming and lambda calculus. In Chapter 7: Handbook of Theoretical Computer Science, vol. B. Elsevier / MIT Press, pp. 321364.
Barendregt, H. P., Kennaway, J. R., Klop, J. W. & Sleep, M. R. (1987) Needed reduction and spine strategies for the lambda calculus. Inf. Comput. 75, 191231.
Biernacka, M. & Danvy, O. (2007) A concrete framework for environment machines. ACM Trans. Comput. Log. 9(1), 6:16:30.
Charguéraud, A. (2012) The locally nameless representation. J. Autom. Reas. 49(3), 363408.
Crégut, P. (2007) Strongly reducing variants of the Krivine abstract machine. Higher-Order Symb. Comput. 20(3), 209230.
Curien, P.-L. (1986) Categorical Combinators, Sequential Algorithms and Functional Programming. John Wiley & Sons.
Curien, P.-L. (1991) An abstract framework for environment machines. Theor. Comput. Sci. 82(2), 389402.
Curien, P.-L. & Herbelin, H. (2000) The duality of computation. In Proceedings of the 5th International Conference on Functional Programming. SIGPLAN Notices, vol. 35, issue no. 9. ACM Press, pp. 233243.
Curien, P.-L., Hardin, T. & Lévy, J.-J. (1996) Confluence properties of weak and strong calculi of explicit substitutions. J. ACM 43(2), 362397.
Curry, H. B. & Feys, R. (1958) Combinatory Logic, vol. 1. North-Holland.
Danvy, O. (2009) From reduction-based to reduction-free normalization. In 6th International School on Advanced Functional Programming, Revised Lectures. LNCS. Springer, pp. 66164.
Danvy, O., Johannsen, J. & Zerny, I. (2011) A walk in the semantic park. In Proceedings of the 20th ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation. ACM Press, pp. 112.
Danvy, O., Milikin, K. & Munk, J. (2013) A correspondence between full normalization by reduction and full normalization by evaluation. Talk presented at A scientific meeting in honor of Pierre-Louis Curien, Venice, 911 September.
de Bruijn, N. G. (1972) Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Math. 34(5), 381392.
Diehl, S., Hartel, P. & Sestoft, P. (2000) Abstract machines for programming language implementation. Future Gener. Comput. Syst. 16(7), 739751.
Felleisen, M. (1987) The Calculi of Lambda-v-cs Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. Ph.D. thesis, Department of Computer Science, Indiana University.
García-Pérez, Á. (2014) Operational Aspects of Full Reduction in Lambda Calculi. Ph.D. thesis, ETSI Informáticos, Universidad Politécnica de Madrid.
García-Pérez, Á. & Nogueira, P. (2014) On the syntactic and functional correspondence between hybrid (or layered) normalisers and abstract machines. Sci. Comput. Program. 95(Part 2), 176199.
García-Pérez, Á.,Nogueira, P. & Moreno-Navarro, J. J. (2013) Deriving the full-reducing Krivine machine from the small-step operational semantics of normal order. In Proceedings of the 15th International Symposium on Principles and Practice of Declarative Programming. ACM Press, pp. 8596.
Grégoire, B. & Leroy, X. (2002) A compiled implementation of strong reduction. In Proceedings of the 7th International Conference on Functional Programming, vol. 37, issue no. (9), pp. 235246.
Kahn, G. (1987) Natural semantics. In Proceedings of Symposium on Theoretical Aspects of Computer Science. LNCS, vol. 247. Springer, pp. 2239.
Keller, R. M. (1976) Formal verification of parallel programs. Commun. ACM 19(7), 371384.
Kesner, D. (2007) The theory of calculi with explicit substitutions revisited. In Proceedings of the 21st International Workshop on Computer Science Logic. LNCS, vol. 4646. Springer, pp. 238252.
Kesner, D. (2009) A theory of explicit substitutions with safe and full composition. Log. Methods Comput. Sci. 5(3), 129.
Kiselyov, O. (2018) λ to SKI, semantically - declarative pearl. In Proceedings of the 14th International Symposium on Functional and Logic Programming. LNCS. Springer, pp. 3350.
Krivine, J.-L. (2007) A call-by-name lambda-calculus machine. Higher-Order Symb. Comput. 20(3), 199207.
Lescanne, P. & Rouyer-Degli, J. (1995) Explicit substitutions with de Bruijn’s levels. In Proceedings of the 6th International Conference on Rewriting Techniques and Applications. LNCS, vol. 914. Springer, pp. 294308.
Melliès, P.-A. (1995) Typed lambda-calculi with explicit substitutions may not terminate. In Proceedings of the 2nd International Conference on Typed Lambda Calculi and Applications. LNCS, vol. 902. Springer, pp. 328334.
Munk, J. (2008) A Study of Syntactic and Semantic Artifacts and its Application to Lambda Definability, Strong Normalization, and Weak Normalization in the Presence of State. M. Phil. thesis, BRICS, Aarhus University.
Paulson, L.C. (1996) ML For the Working Programmer. 2nd ed. New York, NY: Cambridge University Press.
Peyton-Jones, S. (1987) The Implementation of Functional Programming Languages. Prentice-Hall.
Pierce, B. (2002) Types and Programming Languages. The MIT Press.
Plotkin, G. (1975) Call-by-name, call-by-value and the lambda calculus. Theor. Comput. Sci. 1(2), 125159.
Plotkin, G. (1981) A structural approach to operational semantics. Technical Report DAIMI FN-19. Department of Computer Science, Aarhus University, Denmark.
Pollack, R. (1994) Closure under alpha-conversion. In Proceedings of the 1993 International Workshop on Types for Proofs and Programs. LNCS, vol. 806. Springer, pp. 313332.
Ronchi Della Rocca, S. & Paolini, L. (2004) The Parametric Lambda Calculus. Springer.
Scherer, G. & Rémy, D. (2015) Full reduction in the face of absurdity. Proceedings of Programming Languages and Systems - 24th European Symposium on Programming. LNCS, vol. 9032. Springer, pp. 685709.
Sestoft, P. (2002) Demonstrating lambda calculus reduction. In The Essence of Computation, Complexity, Analysis, Transformation. Essays Dedicated to Neil D. Jones. LNCS, vol. 2566. Springer, pp. 420435.

The full-reducing Krivine abstract machine KN simulates pure normal-order reduction in lockstep: A proof via corresponding calculus



Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed.

The full-reducing Krivine abstract machine KN simulates pure normal-order reduction in lockstep: A proof via corresponding calculus

Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *