|
ABSTRACT
Binding-time improvements aim at making partial evaluation (a.k.a. program specialization) yield a better result. They have been achieved so far mostly by hand-transforming the source program. We observe that as they are better understood, these hand-transformations are progressively integrated into partial evaluators, thereby alleviating the need for source-level binding-time improvements.Control-based binding-time improvements, for example, follow this pattern: they have evolved from ad-hoc source-level rewrites to a systematic source-level transformation into continuation-passing style (CPS). Recently, Bondorf has explicitly integrated the CPS transformation into the specializer, thus partly alleviating the need for source-level CPS transformation. This CPS integration is remarkably effective but very complex and goes beyond a simple CPS transformation. We show that it can be achieved directly by using the control operators shift and reset, which provide access to the current continuation as a composable procedure.We automate, reproduce, and extend Bondorf's results, and describe how this approach scales up to hand-writing partial-evaluation compilers. The first author has used this method to bootstrap the new release of Consel's partial evaluator Schism. The control operators not only allow the partial evaluator to remain in direct style, but also can speed up partial evaluation significantly.
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
|
Lennart Beckman, Anders Haraldsson, Osten Oskarsson, and Erik Sandewall. A partial evaluator, and its use a~ a programming tool. Artificial Intelligence, 7(4)-319-s57, 19n.
|
| |
2
|
Lars Birkedal and Morten Welinder. Partial evaluation of Standard ML. Master's thesis, DIKU, Computer Science Department, University of Copenhagen, August 1993.
|
 |
3
|
|
| |
4
|
William Clinger, editor. Proceedings of the 1992 A CM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, San Francisco, California, June 1992. ACM Press.
|
 |
5
|
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]
|
 |
6
|
Will Clinger , Anne Hartheimer , Eric Ost, Implementation strategies for continuations, Proceedings of the 1988 ACM conference on LISP and functional programming, p.124-131, July 25-27, 1988, Snowbird, Utah, United States
[doi> 10.1145/62678.62692]
|
 |
7
|
|
 |
8
|
|
| |
9
|
|
| |
10
|
|
 |
11
|
|
 |
12
|
|
 |
13
|
|
| |
14
|
Olivier Danvy and Andrzej Filinski. Representing control, a study of the CPS transformation. Mathematical Structures in Computer Science, 2(4):361-391, December 1992.
|
 |
15
|
|
 |
16
|
|
 |
17
|
|
 |
18
|
|
| |
19
|
Daniel P. Friedman. Personal communication, e-mail 199309061544.aa14562@daimi.aau.dk, September 1993.
|
 |
20
|
|
 |
21
|
|
| |
22
|
Carsten K. Hoist and John Launchbury. Handwriting cogen to avoid problems with static typing. In Draft Proceedings, Fourth Annual Glasgow Workshop on Functional Programmzng, Skye, Scotland, pages 210-218. Glasgow University, 1991.
|
| |
23
|
|
| |
24
|
Neil D. Jones, Peter Sestoft, and Itarald S~ndergaard. MiX: A self-applicable partiM evalnator for experiments in compiler generation. LISP and Symbolic Computation, 2(1):9-50, 1989.
|
| |
25
|
Lionello A. Lombardi and Bertram Raphael. Lisp as the language for an incremental computer. In Edmund C. Berkeley and Daniel G. Bobrow, editors, The Programming Language Lssp: Its Operation and Applications, pages 204-219, Cambridge, Massachusetts, 1964. The MIT Press.
|
 |
26
|
|
| |
27
|
Karoline Malmkjaer, Nevin Heintze, and Olivier Danvy. ML partial evaluation using set-based analysis. Technical report CMU-CS-94-129, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, February 1994.
|
| |
28
|
Chethan R. Murthy. Control operators, hierarchies, and pseudo-classicM type systems' A-translation at work. In Olivier Danvy and Carolyn L. Talcott, editors, Proceedings of the ACM SIGPLAN Workshop on Continuations, Technical report STAN-CS-92-1426, Stanford University, pages 49-72, San Francisco, California, June 1992.
|
| |
29
|
|
 |
30
|
|
 |
31
|
|
 |
32
|
|
| |
33
|
|
 |
34
|
|
|