Hostname: page-component-848d4c4894-wzw2p Total loading time: 0 Render date: 2024-06-08T07:12:24.930Z Has data issue: false hasContentIssue false

Denotational aspects of untyped normalization by evaluation

Published online by Cambridge University Press:  15 July 2005

Andrzej Filinski
Affiliation:
DIKU, Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen, Denmark; andrzej@diku.dk
Henning Korsholm Rohde
Affiliation:
BRICS, Department of Computer Science, University of Aarhus, IT-parken, Aabogade 34, DK-8200 Aarhus N, Denmark; hense@brics.dk  Basic Research in Computer Science (), funded by the Danish National Research Foundation.
Get access

Abstract

We show that the standard normalization-by-evaluation construction for the simply-typed λβη-calculus has a natural counterpart for the untyped λβ-calculus, with the central type-indexed logical relation replaced by a “recursively defined” invariant relation, in the style of Pitts. In fact, the construction can be seen as generalizing a computational-adequacy argument for an untyped, call-by-name language to normalization instead of evaluation.In the untyped setting, not all terms have normal forms, so the normalization function is necessarily partial. We establish its correctness in the senses of soundness (the output term, if any, is in normal form and β-equivalent to the input term); identification (β-equivalent terms are mapped to the same result); and completeness (the function is defined for all terms that do have normal forms). We also show how the semantic construction enables a simple yet formal correctness proof for the normalization algorithm, expressed as a functional program in an ML-like, call-by-value language. Finally, we generalize the construction to produce an infinitary variant of normal forms, namely Böhm trees. We show that the three-part characterization of correctness, as well as the proofs, extend naturally to this generalization.

Type
Research Article
Copyright
© EDP Sciences, 2005

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Aehlig, K. and Joachimski, F., Operational aspects of untyped normalization by evaluation. Math. Structures Comput. Sci. 14 (2004) 587611. CrossRef
H.P. Barendregt, The Lambda Calculus: Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, revised edition (1984).
U. Berger and H. Schwichtenberg, An inverse of the evaluation functional for typed λ-calculus, in Proc. of the Sixth Annual IEEE Symposium on Logic in Computer Science, Amsterdam, The Netherlands (July 1991) 203–211.
Coquand, T. and Dybjer, P., Intuitionistic model constructions and normalization proofs. Math. Structures Comput. Sci. 7 (1997) 7594. CrossRef
Filinski, A., A semantic account of type-directed partial evaluation, in International Conference on Principles and Practice of Declarative Programming, edited by G. Nadathur, Springer-Verlag, Paris, France. Lect. Notes Comput. Sci. 1702 (1999) 378395 CrossRef
A. Filinski and H.K. Rohde, A denotational account of untyped normalization by evaluation, in 7th International Conference on Foundations of Software Science and Computation Structures (FOSSACS 2004), edited by I. Walukiewicz, Springer-Verlag, Barcelona, Spain Lect. Notes Comput. Sci. 2987 (2004) 167–181.
A. Filinski and H.K. Rohde, Denotational aspects of untyped normalization by evaluation (extended version, with detailed proofs). BRICS Report RS-05-4, University of Aarhus, Denmark (February 2005). Available from http://www.brics.dk/RS/05/4/.
B. Grégoire and X. Leroy, A compiled implementation of strong reduction, in Proc. of the Seventh ACM SIGPLAN International Conference on Functional Programming, edited by S. Peyton Jones, ACM Press, Pittsburgh, Pennsylvania, SIGPLAN Notices 37 (2002) 235–246.
R. Milner, M. Tofte, R. Harper and D. MacQueen, The Definition of Standard ML. The MIT Press, revised edition (1997).
J.C. Mitchell, Foundations for Programming Languages. The MIT Press (1996).
Pitts, A.M., Computational adequacy via “mixed” inductive definitions, in Mathematical Foundations of Programming Semantics. Springer-Verlag. Lect. Notes Comput. Sci. 802 (1993) 7282. CrossRef
Pitts, A.M., Relational properties of domains. Inform. Comput. 127 (1996) 6690. CrossRef
Plotkin, G.D., LCF considered as a programming language. Theor. Comput. Sci. 5 (1977) 223255. CrossRef
M.R. Shinwell, A.M. Pitts and M.J. Gabbay, FreshML: Programming with binders made simple, in Eighth ACM SIGPLAN International Conference on Functional Programming, ACM Press, Uppsala, Sweden (2003) 263–274.