Skip to main content
Log in

Choices in Representation and Reduction Strategies for Lambda Terms in Intensional Contexts

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

Higher-order representations of objects such as programs, proofs, formulas, and types have become important to many symbolic computation tasks. Systems that support such representations usually depend on the implementation of an intensional view of the terms of some variant of the typed lambda calculus. New notations have been proposed for the lambda calculus that provide an excellent basis for realizing such implementations. There are, however, several choices in the actual deployment of these notations the practical consequences of which are not currently well understood. We attempt to develop such an understanding here by examining the impact on performance of different combinations of the features afforded by such notations. Among the facets examined are the treatment of bound variables, eagerness and laziness in substitution and reduction, the ability to merge different structure traversals into one, and the virtues of annotations on terms that indicate their dependence on variables bound by external abstractions. We complement qualitative assessments with experiments conducted by executing programs in a language that supports an intensional view of lambda terms while varying relevant aspects of the implementation of the language. Our study provides insights into the preferred approaches to representing and reducing lambda terms and also exposes characteristics of computations that have a somewhat unanticipated effect on performance.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abadi, M., Cardelli, L., Curien, P.-L. and Lévy, J.-J.: Explicit substitutions, J. Funct. Programming 1(4) (1991), 375–416.

    Google Scholar 

  2. Aiello, L. and Prini, G.: An efficient interpreter for the lambda-calculus, J. Comput. System Sci. 23 (1981), 383–425.

    Google Scholar 

  3. Appel, A. and Shao, Z.: Smartest recompilation, in Tenth Annual ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages, January 1993, Longer version as Princeton University Technical Report CS-TR-395-92.

  4. Benaissa, Z., Briaud, D., Lescanne, P. and Rouyer-Degli, J.: λυ, a calculus of explicit substitutions which preserves strong normalization, J. Funct. Programming 6(5) (1996), 699–722.

    Google Scholar 

  5. Brisset, P. and Ridoux, O.: Naive reverse can be linear, in K. Furukawa (ed.), Eighth International Logic Programming Conference, MIT Press, June 1991, pp. 857–870.

  6. Brisset, P. and Ridoux O.: The compilation of λProlog and its execution with MALI, Publication Interne 687, IRISA, Rennes, November 1992.

  7. de Bruijn, N.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church–Rosser theorem, Indag. Math. 34(5) (1972), 381–392.

    Google Scholar 

  8. de Bruijn, N.: A survey of the project AUTOMATH, in J. P. Seldin and J. R. Hindley (eds.), To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, Academic Press, 1980, pp. 579–606.

  9. Constable, R. L., Allen, S. F., Bromley, H. M., Cleaveland, W. R., Cremer, J. F., Harper, R. W., Howe, D. J., Knoblock, T. B., Mendler, N. P., Panangaden, P., Sasaki, J. T. and Smith, S. F.: Implementing Mathematics with the Nuprl Proof Development System, Prentice-Hall, 1986.

  10. Coquand, T. and Huet, G.: The calculus of constructions, Inform. and Comput. 76(2/3) (February/March 1988), 95–120.

    Google Scholar 

  11. David, R. and Guillaume, B.: A λ-calculus with explicit weakening and explicit substitution, Math. Structures Comput. Sci. 11 (2001), 169–206.

    Google Scholar 

  12. Dowek, G., Hardin, T. and Kirchner, C.: Higher-order unification via explicit substitutions, Inform. and Comput. 157 (2000), 183–235.

    Google Scholar 

  13. Fernandez, M., Mackie, I. and Sinot, F.-R.: Closed reduction: Explicit substitutions without alpha-conversion, Math. Structures Comput. Sci. (2004), to appear.

  14. Field, J.: On laziness and optimality in lambda interpreters: Tools for specification and analysis, in Seventeenth Annual ACM Symposium on Principles of Programming Languages, ACM Press, January 1990, pp. 1–15.

  15. Grégoire, B. and Leroy, X.: A compiled implementation of strong reduction, in Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming, Pittsburgh, October 2002, pp. 235–246.

  16. Harper, R.: Introduction to Standard ML, Technical Report ECS-LFCS-86-14, Laboratory for Foundations of Computer Science, University of Edinburgh, November 1986. Revised by Nick Rothwell, January 1989, with exercises by Kevin Mitchell.

  17. Harper, R., Honsell, F. and Plotkin, G.: A framework for defining logics, J. ACM 40(1) (1993), 143–184.

    Google Scholar 

  18. Huet, G.: A unification algorithm for typed λ-calculus, Theoret. Comput. Sci. 1 (1975), 27–57.

    Google Scholar 

  19. Kamareddine, F. and Ríos, A.: Extending the λ-calculus with explicit substitution which preserves strong normalization into a confluent calculus on open terms, J. Funct. Programming 7(4) (1997), 395–420.

    Google Scholar 

  20. Liang, C.: Let-polymorphism and eager type schemes, in TAPSOFT ‘97: Theory and Practice of Software Development, LNCS 1214, Springer-Verlag, 1997, pp. 490–501.

  21. Liang, C.: Compiler construction in higher order logic programming, in 4th International Symposium on Practical Aspects of Declarative Languages, LNCS 2257, Springer-Verlag, 2002, pp. 47–63.

  22. Miller, D.: Unification of simply typed lambda-terms as logic programming, in Eighth International Logic Programming Conference, MIT Press, June 1991, pp. 255–269.

  23. Miller, D.: A logic programming language with lambda-abstraction, function variables, and simple unification, J. Logic Comput. 1(4) (1991), 497–536.

    Google Scholar 

  24. Miller, D.: Unification under a mixed prefix, J. Symbolic Comput. 14 (1992), 321–358.

    Google Scholar 

  25. Mottl, M.: Automating functional program transformation, M.Sc. Thesis, Division of Informatics, University of Edinburgh, September 2000.

  26. Muñoz, C.: Confluence and preservation of strong normalization in an explicit substitution calculus, in Eleventh Annual IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press, July 1996, pp. 440–447.

  27. Nadathur, G.: A fine-grained notation for lambda terms and its use in intensional operations, J. Funct. Logic Programming 2 (March 1999).

  28. Nadathur, G. and Miller, D.: An overview of λProlog, in K. A. Bowen and R. A. Kowalski (eds.), Fifth International Logic Programming Conference, MIT Press, August 1988, pp. 810–827.

  29. Nadathur, G. and Wilson, D. S.: A notation for lambda terms: A generalization of environments, Theoret. Comput. Sci. 198(1–2) (1998), 49–98.

    Google Scholar 

  30. Nadathur, G. and Mitchell, D. J.: System description: Teyjus – a compiler and abstract machine based implementation of λProlog, in H. Ganzinger (ed.), Automated Deduction – CADE-16, Lecture Notes in Artificial Intelligence 1632, Springer-Verlag, July 1999, pp. 287–291.

  31. Nipkow, T., Paulson, L. C. and Wenzel, M.: Isabelle/HOL – A Proof Assistant for Higher-Order Logic, LNCS 2283, Springer, 2002.

  32. Pfenning, F. and Elliott, C.: Higher-order abstract syntax, in Proceedings of the ACM-SIGPLAN Conference on Programming Language Design and Implementation, ACM Press, June 1988, pp. 199–208.

  33. Pfenning, F. and Schürmann, C.: System description: Twelf – a meta-logical framework for deductive systems, in H. Ganzinger (ed.), Proceedings of the 16th International Conference on Automated Deduction (CADE-16), Trento, Italy, LNAI 1632, Springer-Verlag, July 1999, pp. 202–206.

  34. The Coq Development Team: The Coq proof assistant reference manual version 7.2, Technical Report 255, INRIA, February 2002. More recent versions may be obtained from the site http://coq.inria.fr/.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Chuck Liang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Liang, C., Nadathur, G. & Qi, X. Choices in Representation and Reduction Strategies for Lambda Terms in Intensional Contexts. J Autom Reasoning 33, 89–132 (2004). https://doi.org/10.1007/s10817-004-6885-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-004-6885-1

Keywords

Navigation