Hostname: page-component-76fb5796d-vvkck Total loading time: 0 Render date: 2024-04-26T08:03:07.676Z Has data issue: false hasContentIssue false

Efficient self-interpretation in lambda calculus

Published online by Cambridge University Press:  07 November 2008

Torben Æ. Mogensen
Affiliation:
DIKU, University of Copenhagen, Denmark
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We start by giving a compact representation schema for λ-terms, and show how this leads to an exceedingly small and elegant self-interpreter. We then define the notion of a self-reducer, and show how this too can be written as a small λ-term. Both the self-interpreter and the self-reducer are proved correct. We finally give a constructive proof for the second fixed point theorem for the representation schema. All the constructions have been implemented on a computer, and experiments verify their correctness. Timings show that the self-interpreter and self-reducer are quite efficient, being about 35 and 50 times slower than direct execution using a call-by-need reductions strategy

Type
Articles
Copyright
Copyright © Cambridge University Press 1992

References

Barendregt, H. 1984. The Lambda Calculus: Its Syntax and Semantics (revised edition). North-Holland.Google Scholar
Barendregt, H. 1991. Self-interpretation in lambda calculus. J. Functional Program., 1 (2): 229–33.Google Scholar
Berger, U. and Schwichtenberg, H. 1991. An Inverse of the Evaluation Functional for Typed λ-calculus. Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press, 203211.Google Scholar
Dybvig, R. K. 1987. The Scheme Programming Language. Prentice-Hall.Google Scholar
Gomard, C. and Jones, N. D. 1991. A Partial Evaluator for the Untyped Lambda Calculus. J. Functional Program., 1 (1): 2169.Google Scholar
Kleene, S. C. 1952. Introduction to Metamathematics. North-Holland.Google Scholar
Pfenning, F. and Elliot, C. 1988. Higher-Order Abstract Syntax. In Proc. ACM-SIGPLAN Conf. on Programming Language Design and Implementation, pp. 199208. ACM Press.Google Scholar
Pfenning, F. and Lee, P. 1991. Metacircularity in the polymorphic λ-calculus. Theoretical Computer Science, 89: 137159.Google Scholar
Reynolds, J. C. 1985. Three Approaches to Type Structure. Vol. 85 of Lecture Notes in Computer Science, pp. 97138. Springer-Verlag.Google Scholar
Steensgaard-Madsen, J. 1989. Typed Representation of Objects by Functions. TOPLAS, 11 (1): 6789.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.