Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/73141.74837acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Reasoning about continuations with control effects

Published: 21 June 1989 Publication History

Abstract

We present a new static analysis method for first-class continuations that uses an effect system to classify the control domain behavior of expressions in a typed polymorphic language. We introduce two new control effects, goto and comefrom, that describe the control flow properties of expressions. An expression that does not have a goto effect is said to be continuation following because it will always call its passed return continuation. An expression that does not have a comefrom effect is said to be continuation discarding because it will never preserve its return continuation for later use. Unobservable control effects can be masked by the effect system. Control effect soundness theorems guarantee that the effects computed statically by the effect system are a conservative approximation of the dynamic behavior of an expression.
The effect system that we describe performs certain kinds of control flow analysis that were not previously feasible. We discuss how this analysis can enable a variety of compiler optimizations, including parallel expression scheduling in the presence of complex control structures, and stack allocation of continuations. The effect system we describe has been implemented as an extension to the FX-87 programming language.

References

[1]
Abramsky, C., and Itankin, C. T. Eds. Abstract Interpretation for Declaralive Languages. J. Wiley and Sons, 1987.
[2]
Bawden, A. Submission to the Scheme electronic mailing list scheme~mc.lcs.mit.edu. March 2, 1989.
[3]
Clark, R. L. A Linguistic Contribution to GOTO-Less Programming. Dalamat~on, December 1973, 62-63. Reprinted in Communications of the A CM ~, 27 (1984), 349-350.
[4]
Cousot, P., and Cousot, R. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction and Approximation of Fixed Points. In Proceedings of the ~ih Ann~tal A CM Conference on Principles of Programming Languages. ACM, New York, 1977, pp. 238- 252.
[5]
Clinger, W. D., Hartheimer, A. H., and Ost, E. O. Implementation Strategies for Continuations. in Proceedings of the 1988 A CM Conference on Lisp and Functional Programming. ACM, New York, 1988, pp. 124-131.
[6]
Danvy, O., and Filinski, A. A Funciional Abstraction of Typed Conlezts. DIKU Report 89/5, University of Copenhagen, 1989,
[7]
Friedman, D. P., and Haynes, C. T. Constraining Control. In Proceedings of the 12ih Annual A CM Conference on Principles of Programming Languages. ACM, New York, 1985, pp. 245-254.
[8]
Felleisen, M. A-v-CS: An Extended A-CalcuIus for Scheme. In Proceedings of the 1988 A CM Conference on Lisp and Functional Programming. ACM, New York, 1988, pp. 72-85.
[9]
Felleisen, M. The Theory and Practice of First- Class Prompts. In Proceedings of ~he 15th Annual A CM Conference on Principles of Programming Languages. ACM, New York, 1988, pp. 180- 190.
[10]
Gifford, D. K., Jouvelot, P., Lucassen, J. M., and Sheldon, M. A. The FX-37 Reference Manual. MIT/LCS/TR-407, 1987.
[11]
Hughes, J. Strictness Analysis by Abstract Interpretation of Continuations. In {AH87}.
[12]
Haynes, C. T., and Friedman, D. P. Embedding Continuations in Procedural Objects. A CM Trans. on Prog. Lang. and $yst. 9, 4 (1987), 582-598.
[13]
Haynes, C. T., Friedman, D. P., and Wand, M. Obtaining Coroutines with Continuations. Comput. Lang. 11, 3/4 (1986), 143-153.
[14]
Jouvejot, P. and Gifford, D. K. The FX-87 Interpreter. In Proceedings of the ~nd IEEE International Conference on Computer Languages. IEEE, New York, 1988, pp. 65-72.
[15]
Jouvetot, P. and Gifford, D. K. Parallel Functional Programming: The FX-87 Project. To appear in Proceedings of the International Workshop on Parallel and Distributed Algorithms. North Holland, Amsterdam, 1989.
[16]
Jouvelot, P. and Gifford, D. K. Communication Effects for Message-Based Concurrency. MIT/LCS/TM-386, 1989.
[17]
Lucassen, j. M. Types and Effects: Towards the Integration of Functional and Imperative Programming. PhD Dissertation, MIT/LCS/TR-408, 1987.
[18]
Lucassen, J. M., and Gifford, D. K. Polymorphic Effect Systems. In Proceedings of the 15th Annual A CM Conference on Principles of Programming Languages. ACM, New York, 1988, pp. 47- 57.
[19]
Moon, D. MacLISP Reference Manual, Revision 0. MIT Project MAC, 1974.
[20]
McCracken, N. J. An Investigation of a Programming Language with a Polymorphic Type Structure. PhD Dissertation, Syracuse University, 1979.
[21]
Meyer, A. R., and Riecke, J. Continuations May Be Unreasonable. In Proceedings of the 1988 A CM Conference on Lisp and Functional Programming. ACM, New York, 1988, pp. 63-71.
[22]
Rees, J. A., and Clinger, W. Eds. The Reviseaa Report on the Algorilhmic Language Scheme. MIT/AI Memo 848a, 1986.
[23]
Steele, G. L., and Sussman, G. J. The Art of the Interpreter or, The Modularity Complez (Parts Zero, One and Two). MIT/AI Memo 453, 1978.
[24]
Schmidt, D. A. Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, 1986.
[25]
Sussman, G. J., and McDermott, D. From PLANNER to CONNIVER - A Genetic Approach. In Proceedings of the Fall Joint Computer Conference. AFIPS Press, Reston, 1972, pp 1171-1179.
[26]
Wand, M. Continuation-based Multiprocessing. In Proceedings of the 1980 A CM Conference on Lisp and Functional Programming. ACM, New York, 1980, pp. 19-28.

Cited By

View all
  • (2022)Profile inference revisitedProceedings of the ACM on Programming Languages10.1145/34987146:POPL(1-24)Online publication date: 12-Jan-2022
  • (2022)Oblivious algebraic data typesProceedings of the ACM on Programming Languages10.1145/34987136:POPL(1-29)Online publication date: 12-Jan-2022
  • (2022)Induction duality: primal-dual search for invariantsProceedings of the ACM on Programming Languages10.1145/34987126:POPL(1-29)Online publication date: 12-Jan-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '89: Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation
June 1989
355 pages
ISBN:089791306X
DOI:10.1145/73141
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 24, Issue 7
    Proceedings of the SIGPLAN '89 symposium on Interpreters and interpretive techniques
    July 1989
    355 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/74818
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 June 1989

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI89
Sponsor:
PLDI89: Programming Language Design & Implementation
June 19 - 23, 1989
Oregon, Portland, USA

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)111
  • Downloads (Last 6 weeks)17
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Profile inference revisitedProceedings of the ACM on Programming Languages10.1145/34987146:POPL(1-24)Online publication date: 12-Jan-2022
  • (2022)Oblivious algebraic data typesProceedings of the ACM on Programming Languages10.1145/34987136:POPL(1-29)Online publication date: 12-Jan-2022
  • (2022)Induction duality: primal-dual search for invariantsProceedings of the ACM on Programming Languages10.1145/34987126:POPL(1-29)Online publication date: 12-Jan-2022
  • (2022)Truly stateless, optimal dynamic partial order reductionProceedings of the ACM on Programming Languages10.1145/34987116:POPL(1-28)Online publication date: 12-Jan-2022
  • (2022)Static prediction of parallel computation graphsProceedings of the ACM on Programming Languages10.1145/34987086:POPL(1-31)Online publication date: 12-Jan-2022
  • (2022)From enhanced coinduction towards enhanced inductionProceedings of the ACM on Programming Languages10.1145/34986796:POPL(1-29)Online publication date: 12-Jan-2022
  • (2016)Command injection attacks, continuations, and the Lambek calculusElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.212.6212(81-96)Online publication date: 19-Jun-2016
  • (2015)Effect Systems Revisited--Control-Flow Algebra and SemanticsEssays Dedicated to Hanne Riis Nielson and Flemming Nielson on the Occasion of Their 60th Birthdays on Semantics, Logics, and Calculi - Volume 956010.1007/978-3-319-27810-0_1(1-32)Online publication date: 1-Oct-2015
  • (2014)Semantical interprocedural parallelizationACM International Conference on Supercomputing 25th Anniversary Volume10.1145/2591635.2667163(143-150)Online publication date: 10-Jun-2014
  • (2007)Specializing continuations a model for dynamic join pointsProceedings of the 6th workshop on Foundations of aspect-oriented languages10.1145/1233833.1233840(45-57)Online publication date: 13-Mar-2007
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media