skip to main content
10.1145/1291151.1291178acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Adding delimited and composable control to a production programming environment

Published:01 October 2007Publication History

ABSTRACT

Operators for delimiting control and for capturing composable continuations litter the landscape of theoretical programming language research. Numerous papers explain their advantages, how the operators explain each other (or don't), and other aspects of the operators' existence. Production programming languages, however, do not support these operators, partly because their relationship to existing and demonstrably useful constructs - such as exceptions and dynamic binding - remains relatively unexplored.

In this paper, we report on our effort of translating the theory of delimited and composable control into a viable implementation for a production system. The report shows how this effort involved a substantial design element, including work with a formal model, as well as significant practical exploration and engineering.

The resulting version of PLT Scheme incorporates the expressive combination of delimited and composable control alongside dynamic-wind, dynamic binding, and exception handling. None of the additional operators subvert the intended benefits of existing control operators, so that programmers can freely mix and match control operators.

References

  1. Dariusz Biernacki, Olivier Danvy, and Chung-chieh Shan. On the static and dynamic extents of delimited continuations. Science of Computer Programming, 60 (3): 274--297, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. John Clements and Matthias Felleisen. A tail-recursive machine with stack inspection. ACM Transactions on Computing Systems, 26 (6): 1029--1052, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. John Clements, Matthew Flatt, and Matthias Felleisen. Modeling an algebraic stepper. In Proc. European Symposium on Programming, number 2028 in Lecture Notes in Computer Science, pages 320--334, April 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Olivier Danvy and Andrzej Filinski. Abstracting control. In Proc. ACM Conference on Lisp and Functional Programming, pages 151--160, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry. A monadic framework for delimited continuations. Journal of Functional Programming, 2006. To appear.Google ScholarGoogle Scholar
  6. Matthias Felleisen. The theory and practice of first-class prompts. In Proc. ACM Symposium on Principles of Programming Languages, pages 180--190, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Matthias Felleisen. On the expressive power of programming languages. Science of Compututer Programming, 17 (1-3): 35--75, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Andrzej Filinski. Representing monads. In Proc. ACM Symposium on Principles of Programming Languages, pages 446--457, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Robert Bruce Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. DrScheme: A programming environment for Scheme. Journal of Functional Programming, 12 (2): 159--182, March 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Matthew Flatt. PLT MzScheme: Language manual. Technical Report PLT-TR2007-1-v370, PLT Scheme, 2007.Google ScholarGoogle Scholar
  11. Daniel P. Friedman and Christopher T. Haynes. Constraining control. In Proc. ACM Symposium on Principles of Programming Languages, pages 245--254, January 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Martin Gasbichler and Michael Sperber.Final shift for call/cc: a direct implementation of shift and reset.In Proc. ACM International Conference on Functional Programming, pages 271--282, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Martin Gasbichler, Eric Knauel, Michael Sperber, and Richard A. Kelsey. How to add threads to a sequential language without getting tangled up. In Proc. Workshop on Scheme and Functional Programming, 2003.Google ScholarGoogle Scholar
  14. Carl Gunter, Didier R&3233;my, and Jon Riecke. A generalization of exceptions and control in ML-like languages. In Proc. ACM Conference on Functional Programming and Computer Architecture, pages 12--23, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. David Herman, Aaron Tomb, and Cormac Flanagan. Space-efficient gradual typing. In Proc. Trends in Functional Programming, 2007.Google ScholarGoogle Scholar
  16. Robert Hieb and R. Kent Dybvig. Continuations and concurrency. In Proc. ACM Symposium on Principles and Practice of Parallel Programming, pages 128--136, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Robert Hieb, Kent Dybvig, and Claude W. Anderson, III. Subcontinuations. Lisp and Symbolic Computation, 7 (1): 83--110, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Richard Kelsey, William Clinger, and J. Rees (Eds.). The revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices, 33 (9), September 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Richard A. Kelsey and Jonathan Rees. Scheme48, 2007. http://s48.org/Google ScholarGoogle Scholar
  20. Oleg Kiselyov. How to remove a dynamic prompt: static and dynamic delimited continuation operators are equally expressible. Technical Report TR611, Indiana University Computer Science, 2005a.Google ScholarGoogle Scholar
  21. Oleg Kiselyov. Generic implementation of all four *F* operators: from control0 to shift, 2005. http://okmij.org/ftp/Computation/Continuations.html#generic-control.Google ScholarGoogle Scholar
  22. Oleg Kiselyov, Chung-chieh Shan, and Amr Sabry. Delimited dynamic binding. In Proc. ACM International Conference on Functional Programming, pages 26--37, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Shriram Krishnamurthi, Peter Walton Hopkins, Jay McCarthy, Paul T. Graunke, Greg Pettyjohn, and Matthias Felleisen. Implementation and use of the PLT Scheme web server. Higher-Order and Symbolic Computation, 2007. To appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. James Laird. Exceptions, continuations and macro-expressiveness. In Proc. European Symposium on Programming, pages 133--146, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Jacob Matthews, Robert Bruce Findler, Matthew Flatt, and Matthias Felleisen. A visual environment for developing context-sensitive term rewriting systems. In Proc. International Conference on Rewriting Techniques and Applications, volume 3091 of Lecture Notes in Computer Science, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  26. Christian Queinnec and Bernard P. Serpette. A dynamic extent control operator for partial continuations. In Proc. ACM Symposium on Principles of Programming Languages, pages 174--184, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jon G. Riecke and Hayo Thielecke. Typed exceptions and continuations cannot macro-express each other. In Proc. International Colloquium on Automata, Languages and Programming, pages 635--644, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Chung-chieh Shan. Shift to control. In Proc. Workshop on Scheme and Functional Programming, pages 99--107, 2004.Google ScholarGoogle Scholar
  29. Dorai Sitaram. Handling control. In Proc. ACM Conference on Programming Language Design and Implementation, pages 147--155, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Dorai Sitaram and Matthias Felleisen. Control delimiters and their hierarchies. Lisp and Symbolic Computation, 3 (1): 67--99, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Michael Sperber (Ed.). The revised5.97 report on the algorithmic language Scheme, 2007.Google ScholarGoogle Scholar
  32. Hayo Thielecke. On exceptions versus continuations in the presence of state. In Proc. European Symposium on Programming, pages 397--411, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Adding delimited and composable control to a production programming environment

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
      October 2007
      346 pages
      ISBN:9781595938152
      DOI:10.1145/1291151
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 42, Issue 9
        Proceedings of the ICFP '07 conference
        September 2007
        331 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1291220
        Issue’s Table of Contents

      Copyright © 2007 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 October 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate333of1,064submissions,31%

      Upcoming Conference

      ICFP '23

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!