skip to main content
10.1145/2628136.2628147acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Compositional semantics for composable continuations: from abortive to delimited control

Published: 19 August 2014 Publication History

Abstract

Parigot's λμ-calculus, a system for computational reasoning about classical proofs, serves as a foundation for control operations embodied by operators like Scheme's callcc. We demonstrate that the call-by-value theory of the λμ-calculus contains a latent theory of delimited control, and that a known variant of λμ which unshackles the syntax yields a calculus of composable continuations from the existing constructs and rules for classical control. To relate to the various formulations of control effects, and to continuation-passing style, we use a form of compositional program transformations which preserves the underlying structure of equational theories, contexts, and substitution. Finally, we generalize the call-by-name and call-by-value theories of the λμ-calculus by giving a single parametric theory that encompasses both, allowing us to generate a call-by-need instance that defines a calculus of classical and delimited control with lazy evaluation and sharing.

References

[1]
Z. M. Ariola and M. Felleisen. The call-by-need lambda calculus. Journal of Functional Programmin, 7(3):265--301, 1997.
[2]
Z. M. Ariola and H. Herbelin. Control reduction theories: the benefit of structural substitution. Journal of Functional Programming, 18(3): 373--419, 2008.
[3]
Z. M. Ariola, H. Herbelin, and A. Sabry. A proof-theoretic foundation of abortive continuations. Higher-Order and Symbolic Computation, 20(4):403--429, 2007.
[4]
Z. M. Ariola, H. Herbelin, and A. Sabry. A type-theoretic foundation of delimited continuations. Higher-Order and Symbolic Computation, 22(3):233--273, 2009.
[5]
Z. M. Ariola, P. Downen, H. Herbelin, K. Nakata, and A. Saurin. Classical call-by-need sequent calculi: The unity of semantic artifacts. In FLOPS, pages 32--46, 2012.
[6]
P.-L. Curien and H. Herbelin. The duality of computation. In ICFP, pages 233--243, 2000.
[7]
O. Danvy and A. Filinski. A functional abstraction of typed contexts. Technical Report 89/12, DIKU, University of Copenhagen, Copenhagen, Denmark, 1989.
[8]
O. Danvy and A. Filinski. Abstracting control. In LISP and Functional Programming, pages 151--160, 1990.
[9]
R. David and W. Py. Lambda-mu-calculus and Böhm's theorem. Journal of Symbolic Logic, 66(1):407--413, 2001.
[10]
P. de Groote. On the relation between the λμ-calculus and the syntactic theory of sequential control. In LPAR, pages 31--43, 1994.
[11]
P. Downen and Z. M. Ariola. Delimited control and computational effects. Journal of Functional Programming, 24(1):1--55, 2014.
[12]
R. K. Dybvig, S. P. Jones, and A. Sabry. A monadic framework for delimited continuations. Journal of Functional Programming, 17(06): 687--730, 2007.
[13]
K. etsu Fujita. Explicitly typed λμ-calculus for polymorphism and call-by-value. In TLCA, pages 162--176, 1999.
[14]
M. Felleisen and R. Hieb. The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science, 103(2): 235--271, 1992.
[15]
A. Filinski. Representing monads. In POPL, pages 446--457, 1994.
[16]
T. Griffin. A formulae-as-types notion of control. In POPL, pages 47--58, 1990.
[17]
H. Herbelin and S. Ghilezan. An approach to call-by-name delimited continuations. In POPL, pages 383--394, 2008.
[18]
H. Herbelin and S. Zimmermann. An operational account of call-byvalue minimal and classical λ-calculus in "natural deduction" form. In TLCA, pages 142--156, 2009.
[19]
Y. Kameyama and M. Hasegawa. A sound and complete axiomatization of delimited continuations. In ICFP, pages 177--188, 2003.
[20]
M. Materzok. Axiomatizing subtyped delimited continuations. In CSL, pages 521--539, 2013.
[21]
M. Materzok and D. Biernacki. Subtyping delimited continuations. In ICFP, pages 81--93, 2011.
[22]
M. Materzok and D. Biernacki. A dynamic interpretation of the CPS hierarchy. In APLAS, pages 296--311, 2012.
[23]
E. Moggi. Computational λ-calculus and monads. In Logic in Computer Science, 1989.
[24]
C.-H. L. Ong and C. A. Stewart. A curry-howard foundation for functional computation with control. In POPL, pages 215--227, 1997.
[25]
M. Parigot. Lambda-my-calculus: An algorithmic interpretation of classical natural deduction. In LPAR, pages 190--201, 1992.
[26]
G. D. Plotkin. Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science, 1(2):125--159, 1975.
[27]
S. Ronchi Della Rocca and L. Paolini. The Parametric Lambda Calculus: A Metamodel for Computation. Texts in Theoretical Computer Science. An EATCS Series. Springer-Verlag, 2004.
[28]
A. Sabry. Note on axiomatizing the semantics of control operators. Technical Report CIS-TR-96-03, Department of Computer and Information Science, University of Oregon, 1996.
[29]
A. Sabry and M. Felleisen. Reasoning about programs in continuation-passing style. Lisp and Symbolic Computation, 6(3-4):289--360, 1993.
[30]
A. Sabry and P. Wadler. A reflection on call-by-value. ACM Transactions on Programming Languages and Systems, 19(6):916--941, 1997.
[31]
A. Saurin. Separation with streams in the λμ-calculus. In LICS, pages 356--365, 2005.
[32]
A. Saurin. Typing streams in the λμ-calculus. ACM Transactions on Computational Logic, 11(4), 2010.
[33]
C. Shan. Shift to control. In Workshop on Scheme and Functional Programming, page 99, 2004.

Cited By

View all
  • (2021)Reflecting Stacked Continuations in a Fine-Grained Direct-Style Reduction TheoryProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479399(1-13)Online publication date: 6-Sep-2021
  • (2020)A Computational Understanding of Classical (Co)RecursionProceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming10.1145/3414080.3414086(1-13)Online publication date: 8-Sep-2020

Index Terms

  1. Compositional semantics for composable continuations: from abortive to delimited control

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
    August 2014
    390 pages
    ISBN:9781450328739
    DOI:10.1145/2628136
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 19 August 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. continuation-passing style
    2. delimited control
    3. equational theory
    4. evaluation strategy
    5. program transformation

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    ICFP'14
    Sponsor:

    Acceptance Rates

    ICFP '14 Paper Acceptance Rate 28 of 85 submissions, 33%;
    Overall Acceptance Rate 333 of 1,064 submissions, 31%

    Upcoming Conference

    ICFP '25
    ACM SIGPLAN International Conference on Functional Programming
    October 12 - 18, 2025
    Singapore , Singapore

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)9
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 13 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2021)Reflecting Stacked Continuations in a Fine-Grained Direct-Style Reduction TheoryProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479399(1-13)Online publication date: 6-Sep-2021
    • (2020)A Computational Understanding of Classical (Co)RecursionProceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming10.1145/3414080.3414086(1-13)Online publication date: 8-Sep-2020

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media