Advertisement

LISP and Symbolic Computation

, Volume 7, Issue 1, pp 83–109 | Cite as

Subcontinuations

  • Robert Hieb
  • R. Kent Dybvig
  • Claude W. AndersonIII
Article

Abstract

Continuations have proven to be useful for implementing a variety of control structures, including exception handling facilities and breadth-first searching algorithms. However, traditional continuations are not useful in the presence of concurrency, because the notion of the rest of the computation represented by a continuation does not in general make sense. Traditional continuations can also be difficult to use in nonconcurrent settings, since their global nature is sometimes problematic. This article presents a new type of continuation, called asubcontinuation. Just as a traditional continuation represents the rest of a computation ¿from a given point in the computation, a subcontinuation represents the rest of asubcomputation ¿from a given point in the subcomputation. Subcontinuations may be used to control tree-structured concurrency by allowing nonlocal exits to arbitrary points in a process tree and allowing the capture of a subtree of a computation as a composable continuation for later use. In the absence of concurrency the localized control achievable with subcontinuations makes them more useful than traditional continuations.

Keywords

Continuations Control Structure Control Delimiters Concurrency Engines Scheme 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bartley, David H. and Jensen, John C. The implementation of PC Scheme. InProceedings of the 1986 ACM Conference on Lisp and Functional Programming (August 1986) 86–93.Google Scholar
  2. 2.
    Clinger, William, Rees, Jonathan A.,et al. The revised4 report on the algorithmic language Scheme.LISP Pointers, 4, 3 (1991).Google Scholar
  3. 3.
    Clinger, William D. and Ost, Eric M. Implementation strategies for continuations. InProceedings of the 1988 ACM Conference on Lisp and Functional Programming (July 1988) 124–131.Google Scholar
  4. 4.
    Dybvig, R. Kent.The Scheme Programming Language. Prentice Hall (1987).Google Scholar
  5. 5.
    Dybvig, R. Kent.Three Implementation Models for Scheme. PhD thesis, University of North Carolina, Chapel Hill (April 1987).Google Scholar
  6. 6.
    Dybvig, R. Kent and Hieb, Robert. Engines from continuations.Computer Languages, 14, 2 (1989) 109–123.Google Scholar
  7. 7.
    Felleisen, Matthias. The theory and practice of first-class prompts. InConference Record of the Fifteenth Annual ACM Symposium on Principles of Programming Languages (January 1988) 180–190.Google Scholar
  8. 8.
    Felleisen, Matthias and Hieb, Robert. The revised report on the syntactic theories of sequential control and state.Theoretical Computer Science, 103 (1992) 235–271.Google Scholar
  9. 9.
    Felleisen, Matthias, Friedman, Daniel P., Duba, Bruce, and Merrill, John.Beyond Continuations. Technical Report 216, Indiana University Computer Science Department (1987).Google Scholar
  10. 10.
    Felleisen, Matthias, Wand, Mitchell, Friedman, Daniel P., and Duba, Bruce F. Abstract continuations: A mathematical semantics for handling full functional jumps. InProceedings of the 1988 ACM Conference on Lisp and Functional Programming (July 1988) 52–62.Google Scholar
  11. 11.
    Friedman, Daniel P., Haynes, Christopher T., and Wand, Mitchell. Obtaining coroutines with continuations.Computer Languages, 11, 3/4 (1986) 143–153.Google Scholar
  12. 12.
    Halstead, Jr., Robert H. Multilisp: A language for concurrent symbolic computation.ACM Transactions on Programming Languages and Systems, 7, 4 (October 1985) 501–538.Google Scholar
  13. 13.
    Haynes, Christopher T. and Friedman, Daniel P. Abstracting timed preemption with engines.Computer Languages, 12, 2 (1987) 109–121.Google Scholar
  14. 14.
    Haynes, Christopher T. and Friedman, Daniel P. Embedding continuations in procedural objects.ACM Transactions on Programming Languages and Systems, 9, 4 (1987) 582–598.Google Scholar
  15. 15.
    Hieb, Robert and Dybvig, R. Kent. Continuations and concurrency. InProceedings of the Second ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (March 1990) 128–136.Google Scholar
  16. 16.
    Hieb, Robert, Dybvig, R. Kent, and Bruggeman, Carl. Representing control in the presence of first-class continuations. InProceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation (June 1990) 66–77.Google Scholar
  17. 17.
    Johnson, Gregory F. and Duggan, Dominic. Stores and partial continuations as first-class objects in a language and its environment. InConference Record of the Fifteenth Annual ACM Symposium on Principles of Programming Languages (January 1988) 158–168.Google Scholar
  18. 18.
    Katz, Morry and Weise, Daniel. Continuing into the future: on the interaction of futures and first-class continuations. InProceedings of the 1990 ACM Conference on Lisp and Functional Programming (June 1990) 176–184.Google Scholar
  19. 19.
    McCarthy, John. A basis for a mathematical theory of computation. In Braffort, P. and Hirschberg, D., editors,Computer Programming and Formal Systems, North Holland (1963) 33–70.Google Scholar
  20. 20.
    Miller, James S.MultiScheme: A Parallel Processing System Based on MIT Scheme. PhD thesis, Massachusetts Institute of Technology (September 1987).Google Scholar
  21. 21.
    Queinnec, Christian and Serpette, Bernard. A dynamic extent control operator for partial continuations. InConference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages (January 1991) 174–184.Google Scholar
  22. 22.
    Sitaram, Dorai and Felleisen, Matthias. Control delimiters and their hierarchies.Lisp and Symbolic Computation, 3, 1 (January 1990) 67–99.Google Scholar
  23. 23.
    Springer, George and Friedman, Daniel P.Scheme and the Art of Computer Programming. MIT Press and McGraw-Hill (1989).Google Scholar
  24. 24.
    Steele Jr., Guy L.Common Lisp, the Language. Digital Press, second edition (1990).Google Scholar
  25. 25.
    Stoy, Joseph E.Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press (1977).Google Scholar

Copyright information

© Kluwer Academic Publishers 1994

Authors and Affiliations

  • Robert Hieb
    • 1
  • R. Kent Dybvig
    • 1
  • Claude W. AndersonIII
    • 2
  1. 1.Indiana University Computer Science DepartmentBloomington
  2. 2.Rose-Hulman Institute of Technology Computer Science DepartmentTerre Haute

Personalised recommendations