ACM Home Page
Please provide us with feedback. Feedback
Eta-expansion does The Trick
Full text PdfPdf (259 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 18 ,  Issue 6  (November 1996) table of contents
Pages: 730 - 751  
Year of Publication: 1996
ISSN:0164-0925
Authors
Olivier Danvy  Aarhus Univ., Aarhus, Denmark
Karoline Malmkjær  Aarhus Univ., Aarhus, Denmark
Jens Palsberg  Massachusetts Institute of Technology, Cambridge
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 31,   Citation Count: 9
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/236114.236119
What is a DOI?

ABSTRACT

Partial-evaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such “binding-time improvements”: nonstandard use of continuation-passing style, eta-expansion, and a popular transformation called “The Trick.” We provide a unified view of these binding-time improvements, from a typing perspective. Just as a proper treatment of product values in partial evaluation requires partially static values, a proper treatment of disjoint sums requires moving static contexts across dynamic case expressions. This requirement precisely accounts for the nonstandard use of continuation-passing style encountered in partial evaluation. Eta-expansion thus acts as a uniform binding-time coercion between values and contexts, be they of function type, product type, or disjoint-sum type. For the latter case, it enables “The Trick.” In this article, we extend Gomard and Jones' partial evaluator for the &lgr;-calculus, &lgr;-Mix, with products and disjoint sums; we point out how eta-expansion for (finite) disjoint sums enable The Trick; we generalize our earlier work by identifying the eta-expansion can be obtained in the binding-time analysis simple by adding two coercion rules; and we specify and prove the correctness of our extension to &lgr;-Mix.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
BARENDREGT, H. 1984. The Lambda Calculus Its Syntax and Semantics. North-Holland, Amsterdam, The Netherlands.
 
3
BERGER, W. AND SCHWICHTENBERG, H. 1991. An inverse of the evaluation functional for typed ~-calculus. In Proceedings of the 6th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alomitos, Calif., 203-211.
 
4
5
 
6
7
8
9
 
10
11
12
13
 
14
 
15
16
 
17
GOMARD, C. K. AND JONES, N. D. 1991. A partial evaluator for the untyped lambda-calculus. J. Funct. Program. 1, 1, 21-69.
 
18
 
19
 
20
HOLST, C. K. AND HUGHES, J. 1990. Towards binding-time improvement for free. In Functional Programming, Glasgow 1990, S. L. Peyton Jones, G. Hutton, and C. K. Hoist, Eds. Springer- Verlag, Berlin, 83-100.
 
21
JONES, N. D. 1988. Automatic program specialization: A re-examination from basic principles. In Partial Evaluation and Mimed Computation, D. Bjorner, A. P. Ershov, and N. D. Jones, Eds. North-Holland, Amsterdam, The Netherlands, 225-282.
 
22
 
23
JONES, N. D., SESTOFT, P., AND SONDERGAARD, H. 1989. MIX: A self-applicable partial evaluator for experiments in compiler generation. LISP Symbol. Comput. 2, 1, 9-50.
24
25
26
27
 
28
 
29
PALSBERG, J. 1993. Correctness of binding-time analysis. J. Funct. Program. 3, 3 (July}, 347-363.
 
30
31
 
32
REYNOLDS, J. C. 1983. Types, abstraction and parametric polymorphism. In Information Processing 83, R. E. A. Mason, Ed. IFIP, Montvale, N.J., 513-523.
 
33
34
 
35
36
 
37
WAND, M. 1993. Specifying the correctness of binding-time analysis. J. Funct. Program. 3, 3 (July), 365-387.
 
38



REVIEW

"R. Clayton : Reviewer"

Compile-time constant-expression evaluation is a form of partial evaluation. In fully realized form, partial evaluation precomputes all such compile-time, or static, expressions. The programs resulting from partial evaluation are desirable bec  more...

Collaborative Colleagues:
Olivier Danvy: colleagues
Karoline Malmkjær: colleagues
Jens Palsberg: colleagues