ABSTRACT
Continuations, when available as first-class objects, provide a general control abstraction in programming languages. They liberate the programmer from specific control structures, increasing programming language extensibility. Such continuations may be extended by embedding them in functional objects. This technique is first used to restore a fluid environment when a continuation object is invoked. We then consider techniques for constraining the power of continuations in the interest of security and efficiency. Domain mechanisms, which create dynamic barriers for enclosing control, are implemented using fluids. Domains are then used to implement an unwind-protect facility in the presence of first-class continuations. Finally, we demonstrate two mechanisms, wind-unwind and dynamic-wind, that generalize unwind-protect.
- [1] Baker, Henry G., Jr., "Shallow Binding in Lisp 1.5", CACM 21, July 1978, pages 565-569. Google ScholarDigital Library
- [2] Burge, William H., Recursive Programming Techniques , Addison-Wealey, Reading MA, 1975.Google Scholar
- [3] Friedman, Daniel P., Christopher T. Haynes, and Eugene Kohlbecker, "Programming with Continuations," Program Transformation and Programming Environments , ed. P. Pepper, Springer-Verlag, 1984, pages 263-274.Google Scholar
- [4] Friedman, Daniel P., Christopher T. Haynes, Eugene Kohlbecker, and Mitchell Wand. "The Scheme 84 Reference Manual," Indiana University Computer Science Department Technical Report No. 153, May, 1984.Google Scholar
- [5] Hanson, Chris, and John Lamping, "Dynamic Binding in Scheme," unpublished manuscript, 1984.Google Scholar
- [6] Haynes, Christopher T., and Daniel P. Friedman, "Engines build process abstractions," Conf. Rec. of the 1984 ACM Symposium on Lisp and Functional Programming , 1984, pages 18-24. Google ScholarDigital Library
- [7] Haynes, Christopher T., Daniel P. Friedman, and Mitchell Wand "Continuations and Coroutines," Conf. Rec. of the 1984 ACM Symposium on Lisp and Functional Programming, 1984, pages 293-298. Google ScholarDigital Library
- [8] Hewitt, Carl, "Viewing control structures as patterns of passing messages," Artif. Intell. 8, 1977, pages 323- 363. Also in Winston and Brown [ed], Artificial Intel-Ligence: an MIT Perspective, MIT Press, 1979.Google ScholarDigital Library
- [9] Landin, Peter, "A correspondence between ALGOL 60 and Church's Lambda Notation", CACM 8, 2-3, February and March 1965, pages 89-101 and 158-165. Google ScholarDigital Library
- [10] Rees, Jonathan A., and Norman I. Adams IV, "T: A dialect of Lisp or, LAMBDA: The ultimate software tool," Conf. Rec. of the 1982 ACM Symposium on Lisp and Functional Programming, pages 114-122. Google ScholarDigital Library
- [11] Reynolds, John, "GEDANKEN-A simple typeless language based on the princple of completeness and the reference concept," CACM 13, May 1970, pages 308-319. Google ScholarDigital Library
- [12] Reynolds, John, "Definitional interpreters for higher order programming languages," Proceedings ACAM Conference 1972, pages 717-740. Google ScholarDigital Library
- [13] Steele, Guy Lewis, Jr., "Macaroni is better than spaghetti," Conf. Rec. of the Symposium on Artifical Intelligence and Programming Languages, SIGPLAN Notices 12, 8 and SIGART Newsletter 64, August, 1977, pages 60-66. Google ScholarDigital Library
- [14] Steele, Guy L., Common Lisp: The Language, Digital Press, Bedford MA, 1984. Google ScholarDigital Library
- [15] Sussman, Gerald Jay, and Drew Vincent McDermott, "From PLANNER to CONNIVER-A genetic approach", Proceedings of Joint Computer Conference 41, part II, AFIPS press, NJ, (1973) pages 1171-1179.Google Scholar
- [16] Sussman, Gerald Jay, and Guy Lewis Steele, Jr., "Scheme: an interpreter for extended lambda calculus", MIT Artificial Intelligence Memo 349, December, 1975. Google ScholarDigital Library
- [17] Wand, Mitchell. "Continuation-based multiprocessing", Conf. Record of the 1980 Lisp Conference, August 1980, pages 19-28. Google ScholarDigital Library
Index Terms
- Constraining control
Recommendations
Constraining delimited control with contracts
ESOP'13: Proceedings of the 22nd European conference on Programming Languages and SystemsMost programming languages provide abstractions for non-local control flow and access to the stack by using continuations, coroutines, or generators. However, their unrestricted use breaks the local reasoning capability of a programmer. Gradual typing ...
Comments