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.
Bibliographical noteFunding Information:
We are grateful to the reviewers of this paper for their careful reading and thoughtful feedback. This work has derived supported from a special research grant from the Department of Computer Science at Hofstra University, NSF Grants CCR-0096322 and CCF-0429572, a Grant in Aid of Research from the University of Minnesota and the Department of Computer Science and Engineering and the Digital Technology Center at the University of Minnesota. Revisions were made to this paper during Nadathur’s sabbatical visit to the Parsifal and Comete groups at Ecole Polytechnique and INRIA, Saclay.
- Explicit substitution
- Lambda calculus
- Lambda conversion