Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Representing control in the presence of one-shot continuations

Published: 01 May 1996 Publication History
  • Get Citation Alerts
  • Abstract

    Traditional first-class continuation mechanisms allow a captured continuation to be invoked multiple times. Many continuations, however, are invoked only once. This paper introduces one-shot continuations, shows how they interact with traditional multi-shot continuations, and describes a stack-based implementation of control that handles both one-shot and multi-shot continuations. The implementation eliminates the copying overhead for one-shot continuations that is inherent in multi-shot continuations.

    References

    [1]
    Andrew W. Appel and David B. MacQueen. Standard ML of New Jersey. In Proceedings of the Third International Symposium on Programming Language Implementation and Logic Programming, pages 1-13, August 1991.
    [2]
    Andrew W. Appel and Zhong Shao. An empirical and analytical study of stack vs. heap cost for languages with closures. Technical Report CS-TR-450-94, Princeton University, March 1994. Revised version to appear in Journal of Functional Programming.
    [3]
    J. Michael Ashley and R. Kent Dybvig. An efficient implementation of multiple return values in scheme. In Proceedings o/the 199~ A CM Conference on Lisp and Functional Programming, pages 140-149, July 1994.
    [4]
    Robert G. Burger, Oscar Waddell, and R. Kent Dybvig. Register allocation using lazy saves, eager restores, and greedy shuffling, in Proceedings o/the SIGPLAN '95 Conference on Programming Language Design and Implementation, pages 130-138, June 1995.
    [5]
    William Clinger, Jonathan A. Rees, et al. The revised4 report on the algorithmic language Scheme. LiSP Pointers, 4(3), 1991.
    [6]
    William F. Clocksin and Christopher S. Mellish. Pro. gramming in Prolog. Springer-Verlag, second edition, 1984.
    [7]
    Christopher T. Haynes Daniel P. Friedman and Mitchell Wand. Obtaining coroutines with continuations. Computer Languages, 11(3/4):143-153, 1986.
    [8]
    R. Kent Dybvig. The Scheme Programming Language. Prentice Hall, second edition, 1996.
    [9]
    R. Kent Dybvig and Robert Hieb. Engines from continuations. Computer Languages, 14(2):109-123, 1989.
    [10]
    Mathias Felleisen. Transliterating Prolog into Scheme. Technical Report 182, Indiana University, October 1985.
    [11]
    Richard P. Gabriel. Performance and Evaluation of LISP Systems. MIT Press, Cambridge, MA, 1985.
    [12]
    Emden R. Gansner and John H. Reppy. A multithreaded higher-order user interface toolkit. In User Interface Software. John Wiley & Sons Ltd, 1993.
    [13]
    Paul Haahr. Montage: Breaking windowing into small pieces. In USENIX Summer Conference, pages 289- 297, Anaheim, June 1990.
    [14]
    Christopher T. Haynes. Logic continuations. LISP Pointers, pages 157-176, 1987.
    [15]
    Christopher T. Haynes and Daniel P. Friedman. Abstracting timed preemption with engines. Computer Languages, 12(2):109-121, 1987.
    [16]
    Robert Hieb, R. Kent Dybvig, and Carl Bruggeman. Representing control in the presence of first-class continuations. In Proceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation, pages 66-77, June 1990.
    [17]
    Robin Milner, Mads Tofte, and Robert Harper. The Definition o/Standard ML. MIT Press, Cambridge, 1990.
    [18]
    Simon L. Peyton-Jones. private communication, December 1991.
    [19]
    Simon L. Peyton-Jones and Jon Salkild. The spineless tagless G-machine. In Proceedings of the Fourth Conference on Functional Programming and Computer Architecture, pages 184-201, September 1989.
    [20]
    R. Pike. A concurrent window system. Computing Systems, 2(2):133-153, 89.
    [21]
    John H. Reppy. CML: A higher-order concurrent language. In Proceedings of the 8IGP~AN '9i Conference on Programming Language Design and implementation, pages 293-305, Toronto, June 1991.
    [22]
    Gerald J. Sussman and Guy L. Steele Jr. Scheme: An interpreter for extended lambda calculus. AI Memo 349, Massachusetts Institute of Technology Artificial Intelligence Lab, 1975.
    [23]
    Oscar WaddeU. The Scheme Widget Library User's Manual. indiana University, Bloomington, Indiana, 1995.

    Cited By

    View all
    • (2023)Continuing WebAssembly with Effect HandlersProceedings of the ACM on Programming Languages10.1145/36228147:OOPSLA2(460-485)Online publication date: 16-Oct-2023
    • (2021)Kotlin coroutines: design and implementationProceedings of the 2021 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3486607.3486751(68-84)Online publication date: 20-Oct-2021
    • (2021)Reachability types: tracking aliasing and separation in higher-order functional programsProceedings of the ACM on Programming Languages10.1145/34855165:OOPSLA(1-32)Online publication date: 15-Oct-2021
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 31, Issue 5
    May 1996
    300 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/249069
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '96: Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
      May 1996
      300 pages
      ISBN:0897917952
      DOI:10.1145/231379
    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 May 1996
    Published in SIGPLAN Volume 31, Issue 5

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)130
    • Downloads (Last 6 weeks)32

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Continuing WebAssembly with Effect HandlersProceedings of the ACM on Programming Languages10.1145/36228147:OOPSLA2(460-485)Online publication date: 16-Oct-2023
    • (2021)Kotlin coroutines: design and implementationProceedings of the 2021 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3486607.3486751(68-84)Online publication date: 20-Oct-2021
    • (2021)Reachability types: tracking aliasing and separation in higher-order functional programsProceedings of the ACM on Programming Languages10.1145/34855165:OOPSLA(1-32)Online publication date: 15-Oct-2021
    • (2021)Contextual modal types for algebraic effects and handlersProceedings of the ACM on Programming Languages10.1145/34735805:ICFP(1-29)Online publication date: 22-Aug-2021
    • (2021)Real-time MLton: A Standard ML runtime for real-time functional programsJournal of Functional Programming10.1017/S095679682100017431Online publication date: 31-Aug-2021
    • (2020)From folklore to fact: comparing implementations of stacks and continuationsProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3385994(75-90)Online publication date: 11-Jun-2020
    • (2020)One-Shot Algebraic Effects as CoroutinesTrends in Functional Programming10.1007/978-3-030-57761-2_8(159-179)Online publication date: 18-Aug-2020
    • (2016)Liberating effects with rows and handlersProceedings of the 1st International Workshop on Type-Driven Development10.1145/2976022.2976033(15-27)Online publication date: 18-Sep-2016
    • (2008)Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and SystemsObject-Oriented Technology. ECOOP 2007 Workshop Reader10.1007/978-3-540-78195-0_6(50-64)Online publication date: 2008
    • (2003)From control effects to typed continuation passingACM SIGPLAN Notices10.1145/640128.60414438:1(139-149)Online publication date: 15-Jan-2003
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media