Denotational aspects of untyped normalization by evaluation

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 Bohm trees. We show that the three-part characterization of correctness, as well as the proofs, extend naturally to this generalization.

[1]  Andrzej Filinski,et al.  A Denotational Account of Untyped Normalization by Evaluation , 2004, FoSSaCS.

[2]  Thierry Coquand,et al.  Intuitionistic model constructions and normalization proofs , 1997, Mathematical Structures in Computer Science.

[3]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[4]  F. Jones There and back again , 1989, Nature.

[5]  Mitchell Wand,et al.  Bottom-Up -Substitution: Uplinks and -DAGs , 2004 .

[6]  Andrzej Filinski,et al.  A Semantic Account of Type-Directed Partial Evaluation , 1999, PPDP.

[7]  Peter D. Mosses,et al.  Constructive Action Semantics for Core ML , 2005, IEE Proc. Softw..

[8]  Ulrich Berger,et al.  An inverse of the evaluation functional for typed lambda -calculus , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[9]  Benjamin Grégoire,et al.  A compiled implementation of strong reduction , 2002, ICFP '02.

[10]  Andrew M. Pitts,et al.  Relational Properties of Domains , 1996, Inf. Comput..

[11]  Olivier Danvy,et al.  Fast partial evaluation of pattern matching in strings , 2003, PEPM.

[12]  M. Goldberg On the Recursive Enumerability of Fixed-Point Combinators , 2004 .

[13]  Andrew M. Pitts,et al.  Computational Adequacy via "Mixed" Inductive Definitions , 1993, MFPS.

[14]  Andrew M. Pitts,et al.  FreshML: programming with binders made simple , 2003, ICFP '03.

[15]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[16]  Peter D. Mosses,et al.  An Action Environment , 2004, LDTA@ETAPS.

[17]  Olivier Danvy,et al.  CPS transformation of beta-redexes , 2000, Inf. Process. Lett..

[18]  Andrzej Filinski,et al.  Denotational Aspects of Untyped Normalization by Evaluation , 2005 .

[19]  Olivier Danvy,et al.  On the dynamic extent of delimited continuations , 2005, Inf. Process. Lett..

[20]  KLAUS AEHLIG,et al.  Under consideration for publication in Math. Struct. in Comp. Science Operational Aspects of Untyped Normalization by Evaluation , .

[21]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[22]  Robin Milner,et al.  Definition of standard ML , 1990 .