Abstract
This paper studies continuations by means of a polymorphic type system. The traditional call-by-name continuation passing style transform admits a typing in which some answer types are polymorphic, even in the presence of first-class control operators. By building on this polymorphic typing, and using parametricity reasoning, we show that the call-by-name transform satisfies the eta-law, and is in fact isomorphic to the more recent CPS transform defined by Streicher.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Berdine, J., O’Hearn, P.W., Reddy, U., Thielecke, H.: Linear continuation passing. Higher-order and Symbolic Computation 15(2/3), 181–208 (2002)
Danvy, O., Filinski, A.: Representing control, a study of the CPS transformation. Mathematical Structures in Computer Science 2(4), 361–391 (1992)
Danvy, O., Hatcliff, J.: A generic account of continuation-passing styles. In: ACM Symposium on Principles of Programming Languages, pp. 458–471 (1994)
Filinski, A.: Declarative continuations: an investigation of duality in programming language semantics. In: Dybjer, P., Pitts, A.M., Pitt, D.H., Poigné, A., Rydeheard, D.E. (eds.) Category Theory and Computer Science. LNCS, vol. 389, pp. 224–249. Springer, Heidelberg (1989)
Griffin, T.G.: A formulae-as-types notion of control. In: Principles of Programming Languages (POPL 1990), pp. 47–58. ACM, New York (1990)
Harper, R., Lillibridge, M.: Explicit polymorphism and CPS conversion. In: Principles of Programming Languages (POPL 1993), pp. 206–219. ACM, New York (1993)
Hatcliff, J., Danvy, O.: Thunks and the λ-calculus. Journal of Functional Programming 7(2), 303–319 (1997)
Hofmann, M., Streicher, T.: Continuation models are universal for λμ-calculus. In: LICS: IEEE Symposium on Logic in Computer Science (1997)
Jouvelot, P., Gifford, D.K.: Reasoning about continuations with control effects. In: Prgramming Language Design and Implementation (PLDI), pp. 218–226. ACM, New York (1988)
Kelsey, R., Clinger, W., Rees, J. (eds.): Revised5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computation 11(1), 7–105 (1998)
Laurent, O., Regnier, L.: About translations of classical logic into polarized linear logic. In: Proceedings of the eighteenth annual IEEE symposium on Logic in Computer Science, June 2003, pp. 11–20. IEEE Computer Society Press, Los Alamitos (2003)
Meyer, A.R., Wand, M.: Continuation semantics in typed lambdacalculi (summary). In: Parikh, R. (ed.) Logic of Programs 1985. LNCS, vol. 193, pp. 219–224. Springer, Heidelberg (1985)
Moggi, E.: Computational lambda calculus and monads. In: Proceedings, Fourth Annual Symposium on Logic in Computer Science, pp. 14–23 (1989)
O’Hearn, P.W., Reynolds, J.C.: From Algol to polymorphic linear lambda-calculus. Journal of the ACM 47, 167–223 (2000)
Pitts, A.M.: Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science 10, 321–359 (2000)
Plotkin, G.D.: Call-by-name, call-by-value, and the λ-calculus. Theoretical Computer Science 1(2), 125–159 (1975)
Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Mason, R.E.A. (ed.) Information Processing 1983, pp. 513–523. Elsevier Science Publishers B. V., North-Holland, Amsterdam (1983)
Streicher, T., Reus, B.: Classical logic: Continuation semantics and abstract machines. Journal of Functional Programming 8(6) (1998)
Thielecke, H.: Comparing control constructs by double-barrelled CPS. Higherorder and Symbolic Computation 15(2/3), 141–160 (2002)
Thielecke, H.: From control effects to typed continuation passing. In: 30th SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2003), pp. 139–149. ACM, New York (2003)
Wadler, P.: Theorems for free! In: 4’th International Conference on Functional Programming and Computer Architecture (FPCA 1989), pp. 347–359. ACM, New York (1989)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thielecke, H. (2004). Answer Type Polymorphism in Call-by-Name Continuation Passing. In: Schmidt, D. (eds) Programming Languages and Systems. ESOP 2004. Lecture Notes in Computer Science, vol 2986. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24725-8_20
Download citation
DOI: https://doi.org/10.1007/978-3-540-24725-8_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21313-0
Online ISBN: 978-3-540-24725-8
eBook Packages: Springer Book Archive