Skip to main content Accessibility help
×
Home
Hostname: page-component-768dbb666b-t89mg Total loading time: 0.49 Render date: 2023-02-07T13:05:17.537Z Has data issue: true Feature Flags: { "useRatesEcommerce": false } hasContentIssue true

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

HTML view is 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Felleisen, M. (1991) On the expressive power of programming languages. Sci. Comput. Program. 17 (1–3), 3575.CrossRefGoogle 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.CrossRefGoogle Scholar
Felleisen, M. & Hieb, R. (1992) The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci. 103 (2), 235271.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle Scholar
Moggi, E. (1989) Computational lambda-calculus and monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science (IEEE), pp. 1423.CrossRefGoogle Scholar
Moggi, E. (1991) Notions of computation and monads. Inf. Comput. 93 (1), 5592.CrossRefGoogle Scholar
Moreau, L. (1998) A syntactic theory of dynamic binding. Higher Order Symb. Comput. 11 (3), 233279.CrossRefGoogle 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.CrossRefGoogle Scholar
Plotkin, G. D. (1975) Call-by-name, call-by-value, and the λ-calculus. Theor. Comput. Sci. 1, 125159.CrossRefGoogle 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.CrossRefGoogle 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.CrossRefGoogle 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.
You have Access
3
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Delimited control and computational effects
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Delimited control and computational effects
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Delimited control and computational effects
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *