ACM Home Page
Please provide us with feedback. Feedback
A generic account of continuation-passing styles
Full text PdfPdf (1.41 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Portland, Oregon, United States
Pages: 458 - 471  
Year of Publication: 1994
ISBN:0-89791-636-0
Authors
John Hatcliff  Department of Computing and Information Sciences, Kansas State University, Manhattan, Kansas
Olivier Danvy  Department of Computer Science, Aarhus University, NY Munkegade, 8000 Aarhus C, Denmark
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 7,   Downloads (12 Months): 40,   Citation Count: 30
Additional Information:

abstract   references   cited by   index terms   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/174675.178053
What is a DOI?

ABSTRACT

We unify previous work on the continuation-passing style (CPS) transformations in a generic framework based on Moggi's computational meta-language. This framework is used to obtain CPS transformations for a variety of evaluation strategies and to characterize the corresponding administrative reductions and inverse transformations. We establish generic formal connections between operational semantics and equational theories. Formal properties of transformations for specific evaluation orders follow as corollaries. Essentially, we factor transformations through Moggi's computational m eta-language. Mapping &lgr;-terms into the meta-language captures computation properties (e.g., partiality, strictness) and evaluation order explicitly in both the term and the type structure of the meta-language. The CPS transformation is then obtained by applying a generic transformation from terms and types in the meta-language to CPS terms and types, based on a typed term representation of the continuation monad. We prove an adequacy property for the generic transformation and establish an equational correspondence between the meta-language and CPS terms. These generic results generalize Plotkin's seminal theorems, subsume more recent results, and enable new uses of CPS transformations and their inverses. We discuss how to aply these results to compilation.


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
Henk Barendregt. The Lambda Calculus -- Its Syntax and Semantics. North-Holland, 1984.
 
3
Geoffrey Burn and Daniel Le M~tayer. Proving the correctness of compiler optimisations based on a global program analysis. Technical report Doc 92/20, Department of Computing, Imperial College of Science, Technology and Medicine, London, England, 1992.
 
4
William Clinger, editor. Proceed, ngs of the 1992 A CM Conference on Lisp and Functional Programmzng, LISP Pointers, Vol. V, No. 1, San Francisco, California, June 1992. ACM Press.
 
5
Olivier Danvy. Three steps for the CPS transformation. Technical Report CIS-92-2, Kansas State University, Manhattan, Kansas, December 1991.
 
6
 
7
Olivier Danvy and Andrzej Filinski. Representing control, a study of the CPS transformation. In Wand {44}, pages 361-391.
8
 
9
10
 
11
Matthias Felleisen and Daniel P. Friedman. Control operators, the SECD machine, and the A-calculus. In M. Wirsing, editor, Formal Description of Programming Concepts III, pages 193-217. North-Holland, 1986.
12
13
14
 
15
 
16
John Hatcliff. PhD thesis, Department of Computing and Information Sciences, Kansas State University, Manhattan, Kansas, USA, March 1994. Forthcoming.
 
17
John Hatcliff and Ohvier Danvy. Thunks and the )~- calculus. Technical Report CIS-93-15, Kansas State University, Manhattan, Kansas, September 1993.
18
 
19
Jufia L. Lawall. PhD thesis, Computer Science Department, Indiana University, Bloomington, Indiana, USA, 1993. Forthcoming.
20
21
 
22
 
23
Eugenio Moggi. Computational lambda-calculus and monads. Report ECS-LFCS-88-66, University of Edinburgh, Edinburgh, Scotland, October 1988.
 
24
 
25
Eugenio Moggi. An abstract view of programming languages. Course notes ECS-LFCS-90-113, Laboratory for Foundations of Computer Science, Department of Computer Science, University of Edinburgh, Edinburgh, Scotland, April 1990.
 
26
27
 
28
 
29
30
 
31
Chris Okasaki, Peter Lee, and David Tarditi. Call-byneed and continuation-passing style. In Talcott {39}.
 
32
Gordon D. Plotkin. Call-by-name, call-by-value and the )~-calculus. Theoretical Computer Science, 1:125-159, 1975.
33
 
34
35
 
36
 
37
Amr Sabry and John Field. Reasoning about explicit and implicit representation of state. In Paul Hudak, editor, Proceedings of the A CM SIGPLAN Workshop on State in Programming Languages, pages 17-30, Copenhagen, Denmark, June 1993.
 
38
 
39
Carolyn L. Talcott, editor. Special issue on continuations, LISP and Symbolic Computation, Vol. 6, Nos. 3/4. Kluwer Academic Publishers, 1993.
 
40
41
42
 
43
 
44
Mitchell Wand, editor. Special issue on the 1990 A CM Conference on Lisp and Functional Programming, Mathematical Structures in Computer Science, Vol. 2, No. 4. Cambridge University Press, December 1992.

CITED BY  30

Collaborative Colleagues:
John Hatcliff: colleagues
Olivier Danvy: colleagues