|
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
|
H. Abelson , R. K. Dybvig , C. T. Haynes , G. J. Rozas , N. I. Adams, IV , D. P. Friedman , E. Kohlbecker , G. L. Steele, Jr. , D. H. Bartley , R. Halstead , D. Oxley , G. J. Sussman , G. Brooks , C. Hanson , K. M. Pitman , M. Wand , William Clinger , Jonathan Rees, Revised report on the algorithmic language scheme, ACM SIGPLAN Lisp Pointers, v.IV n.3, p.1-55, July, 1991
[doi> 10.1145/382130.382133]
|
 |
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
|
Yasuhiko Minamide , Greg Morrisett , Robert Harper, Typed closure conversion, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.271-283, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237791]
|
| |
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
|
Daniel Weise , Roland Conybeare , Erik Ruf , Scott Seligman, Automatic online partial evaluation, Proceedings of the 5th ACM conference on Functional programming languages and computer architecture, p.165-191, June 1991, Cambridge, Massachusetts, United States
|
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...
|