Hostname: page-component-5d59c44645-7l5rh Total loading time: 0 Render date: 2024-02-24T04:23:30.068Z Has data issue: false hasContentIssue false

Delimited control and computational effects

Published online by Cambridge University Press:  22 January 2014

PAUL DOWNEN
Affiliation:
University of Oregon, Eugene, OR, USA (e-mail: pdownen@cs.uoregon.edu, ariola@cs.uoregon.edu)
ZENA M. ARIOLA
Affiliation:
University of Oregon, Eugene, OR, USA (e-mail: pdownen@cs.uoregon.edu, ariola@cs.uoregon.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We give a framework for delimited control with multiple prompts, in the style of Parigot's λμ-calculus, through a series of incremental extensions by starting with the pure λ-calculus. Each language inherits the semantics and reduction theory of its parent, giving a systematic way to describe each level of control. For each language of interest, we fully characterize its semantics in terms of a reduction semantics, operational semantics, continuation-passing style transform, and abstract machine. Furthermore, the control operations are expressed in terms of fine-grained primitives that can be used to build well-known, higher-level control operators. In order to illustrate the expressive power provided by various languages, we show how other computational effects can be encoded in terms of these control operators.

Type
Articles
Copyright
Copyright © Cambridge University Press 2014 

References

Ariola, Z. M. & Herbelin, H. (2008) Control reduction theories: The benefit of structural substitution. J. Funct. Program. 18(May), 373419.Google Scholar
Ariola, Z. M., Herbelin, H., Herman, D. & Keith, D. (2011) A robust implementation of delimited control. In First International Workshop on the Theory and Practice of Delimited Continuations, Novi Sad, Serbia, p. 6.Google Scholar
Ariola, Z. M., Herbelin, H. & Sabry, A. (2009) A type-theoretic foundation of delimited continuations. Higher Order Symb. Comput. 22 (3), 233273.Google Scholar
Biernacka, M., Biernacki, D. & Danvy, O. (2005) An operational foundation for delimited continuations in the CPS hierarchy. Log. Methods Comput. Sci. 1 (2), 139.Google Scholar
Danvy, O. (2004) On evaluation contexts, continuations, and the rest of the computation. In ACM Sigplan Continuations Workshop, pp. 13–23.Google Scholar
Danvy, O. & Filinski, A. (1989) A Functional Abstraction of Typed Contexts. Tech. rept. 89/12. DIKU, University of Copenhagen, Copenhagen, Denmark.Google Scholar
Danvy, O. & Filinski, A. (1990) Abstracting control. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming. Pittsburgh, PA: ACM Press, pp. 151160.Google Scholar
Downen, P. & Ariola, Z. M. (2012) A systematic approach to delimited control with multiple prompts. In Procedings of the 21st European Symposium on Programming. Berlin, Germany: Springer, pp. 234253.Google Scholar
Dybvig, R. K., Jones, S. P. & Sabry, A. (2007) A monadic framework for delimited continuations. J. Funct. Program. 17 (6), 687730.Google Scholar
Felleisen, M. (1988) The theory and practice of first-class prompts. In Principles of Programming Languages '88, pp. 180–190.Google Scholar
Felleisen, M. (1991) On the expressive power of programming languages. Sci. Comput. Program. 17 (1–3), 3575.Google Scholar
Felleisen, M. & Friedman, D. P. (1987) A reduction semantics for imperative higher-order languages. In Parallel Architectures and Languages Europe (PARLE), Lecture Notes in Computer Science, vol. 259. Berlin, Germany: Springer, pp. 206223.CrossRefGoogle Scholar
Felleisen, M., Friedman, D. P., Kohlbecker, E. E. & Duba, B. F. (1987) A syntactic theory of sequential control. Theor. Comput. Sci. 52, 205237.Google Scholar
Felleisen, M. & Hieb, R. (1992) The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci. 103 (2), 235271.Google Scholar
Felleisen, M., Wand, M., Friedman, D. P. & Duba, B. F. (1988) Abstract continuations: A mathematical semantics for handling full jumps. In LISP and Functional Programming, Snowbird, UT, pp. 5262.Google Scholar
Filinski, A. (1994) Representing monads. In Principles of Programming Languages '94. Pittsburgh, PA: ACM, pp. 446457.Google Scholar
Filinski, A. (1999) Representing layered monads. In Principles of Programming Languages '99, pp. 175–188.Google Scholar
Flatt, M., Yu, G., Findler, R. B. & Felleisen, M. (2007) Adding delimited and composable control to a production programming environment. In Proceedings of the 12th ACM Sigplan International Conference on Functional Programming, vol. 1., pp. 165–176.Google Scholar
Gunter, C. A., Rémy, D. & Riecke, J. G. (1995) A generalization of exceptions and control in ML-like languages. In Functional Programming Languages and Computer Architecture '95. New York, NY: ACM, pp. 1223.Google Scholar
Kameyama, Y. & Hasegawa, M. (2003) A sound and complete axiomatization of delimited continuations. In Proceedings of the Eighth ACM Sigplan International Conference on Functional Programming (ICFP '03). New York, NY: ACM, pp. 177188.Google Scholar
Kiselyov, O. (2010) Delimited control in OCaml, abstractly and concretely: System description. In Functional and Logic. Programming, Lecture Notes in Computer Science vol. 6009. New York, NY: Springer, 304320.Google Scholar
Kiselyov, O., Shan, C.-C. & Sabry, A. (2006) Delimited dynamic binding. In Proceedings of the Eleventh ACM Sigplan International Conference on Functional Programming (ICFP '06). New York, NY: ACM, pp. 2637.Google Scholar
Materzok, M. & Biernacki, D. (2011) Subtyping delimited continuations. In Proceeding of the 16th ACM Sigplan International Conference on Functional Programming (ICFP '11). New York, NY: ACM, pp. 8193.Google Scholar
Materzok, M. & Biernacki, D. (2012) A dynamic interpretation of the CPS hierarchy. In 10th Asian Symposium on Programming Languages and Systems (APLAS 2012), pp. 296–311.Google Scholar
Moggi, E. (1989) Computational lambda-calculus and monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science (IEEE), pp. 1423.Google Scholar
Moggi, E. (1991) Notions of computation and monads. Inf. Comput. 93 (1), 5592.Google Scholar
Moreau, L. (1998) A syntactic theory of dynamic binding. Higher Order Symb. Comput. 11 (3), 233279.Google Scholar
Parigot, M. (1992) Lambda-my-calculus: An algorithmic interpretation of classical natural deduction. In Logic Programming and Automated Reasoning. New York, NY: Springer, pp. 190201.Google Scholar
Plotkin, G. D. (1975) Call-by-name, call-by-value, and the λ-calculus. Theor. Comput. Sci. 1, 125159.Google Scholar
Reynolds, J. C. (1972) Definitional interpreters for higher-order programming languages. In Proceedings of the 25th ACM National Conference. New York, NY: ACM, pp. 717740.Google Scholar
Shan, C.-C. (2007) A static simulation of dynamic delimited control. Higher Order Symb. Comput. 20 (4), 371401.Google Scholar
Sitaram, D. & Felleisen, M. (1990a) Control delimiters and their hierarchies. LISP Symb. Comput. 3 (1), 6799.Google Scholar
Sitaram, D. & Felleisen, M. (1990b) Reasoning with continuations II: Full abstraction for models of control. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming. New York, NY: ACM, pp. 161175.Google Scholar
Supplementary material: PDF

Downen and Ariola Supplementary Material

Appendix

Download Downen and Ariola Supplementary Material(PDF)
PDF 239 KB
Submit a response

Discussions

No Discussions have been published for this article.