Advertisement

LISP and Symbolic Computation

, Volume 3, Issue 1, pp 67–99 | Cite as

Control delimiters and their hierarchies

  • Dorai Sitaram
  • Matthias Felleisen
Article

Abstract

Since control operators for theunrestricted transfer of control are too powerful in many situations, we propose thecontrol delimiter as a means for restricting control manipulations and study its use in Lisp- and Scheme-like languages. In a Common Lisp-like setting, the concept of delimiting control provides a well-suited terminology for explaining different control constructs. For higher-order languages like Scheme, the control delimiter is the means for embedding Lisp control constructs faithfully and for realizing high-level control abstractions elegantly. A deeper analysis of the examples suggests a need for an entirecontrol hierarchy of such delimiters. We show how to implement such a hierarchy on top of the simple version of a control delimiter.

Keywords

Scheme Control structure Continuations Control delimiters Engines 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    O.J. Dahl and C.A.R. Hoare. Hierarchical program structure. In O.-J. Dahl, E. Dijkstra, and C.A.R. Hoare, editors,Structured Programming, Academic Press, 1972.Google Scholar
  2. 2.
    R.K. Dybvig and R. Hieb. Engines from continuations.Journal of Computer Languages (Pergamon Press), 14(2), 1989.Google Scholar
  3. 3.
    M. Felleisen. A calculus for assignments in higher-order languages.Proc. 14th ACM Symposium on Principles of Programming Languages, 314–325, 1987.Google Scholar
  4. 4.
    M. Felleisen. The theory and practice of first-class prompts.Proc. 15th ACM Symposium on Principles of Programming Languages, 180–190, 1988.Google Scholar
  5. 5.
    M. Felleisen, M. Wand, D.P. Friedman, and B.F. Duba. Abstract continuations: a mathematical semantics for handling full functional jumps.Proc. Conference on Lisp and Functional Programming, 52–62, 1988.Google Scholar
  6. 6.
    C.T. Haynes and D.P. Friedman. Abstracting timed preemption with engines.Journal of Computer Languages (Pergamon Press), 12(2):109–121, 1987.Google Scholar
  7. 7.
    C.T. Haynes and D.P. Friedman. Embedding continuations in procedural objects.ACM Transactions on Programming Languages and Systems, 9(4):245–254, 1987.Google Scholar
  8. 8.
    C.T. Haynes, D.P. Friedman, and M. Wand. Obtaining coroutines from continuations.Journal of Computer Languages (Pergamon Press), 11(3/4):109–121, 1986.Google Scholar
  9. 9.
    G.F. Johnson and D. Duggan. Stores and partial continuations as first-class objects in a language and its environment.Proc. 15th ACM Symposium on Principles of Programming Languages, 158–168, 1988.Google Scholar
  10. 10.
    E. Kohlbecker.Syntactic Extensions in the Programming Language Lisp. PhD thesis, Indiana University, 1986.Google Scholar
  11. 11.
    P.J. Landin. The next 700 programming languages.Communications of the ACM, 9(3):157–166, 1966.Google Scholar
  12. 12.
    C.D. Marlin.Coroutines—A Programming Methodology, a Language Design and an Implementation. Volume 95 ofLecture Notes in Computer Science, Springer-Verlag, Heidelberg, 1980.Google Scholar
  13. 13.
    J. McCarthy et al.Lisp 1.5 Programmer's Manual. The MIT Press, Cambridge, 2 edition, 1965.Google Scholar
  14. 14.
    J. Rees and W. Clinger. The revised3 report on the algorithmic language scheme.SIGPLAN Notices, 21(12):37–79, 1986.Google Scholar
  15. 15.
    J.C. Reynolds. Gedanken—a simple typeless language based on the principle of completeness and the reference concept.Communications of the ACM, 13(5):308–319, 1970.Google Scholar
  16. 16.
    G.L. Steele Jr.Common Lisp—The Language. Digital Press, 1984.Google Scholar
  17. 17.
    J.E. Stoy and C. Strachey. OS6: an operating system for a small computer.Comp. J., 15(2):117–124; 195–203, 1972.Google Scholar
  18. 18.
    G.J. Sussman and G.L. Steele Jr.Scheme: An interpreter for the extended lambda calculus. Memo 349, MIT AI Lab, 1975.Google Scholar

Copyright information

© Kluwer Academic Publishers 1990

Authors and Affiliations

  • Dorai Sitaram
    • 1
  • Matthias Felleisen
    • 1
  1. 1.Department of Computer ScienceRice UniversityHouston

Personalised recommendations