首页    期刊浏览 2025年06月24日 星期二
登录注册

文章基本信息

  • 标题:Back to Direct Style II: First-Class Continuations
  • 本地全文:下载
  • 作者:Olivier Danvy ; Julia L. Lawall
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:1996
  • 卷号:3
  • 期号:20
  • 出版社:Aarhus University
  • 摘要:The direct-style transformation aims at mapping continuation-passing programs back to direct style, be they originally written in continuation-passing style or the result of the continuation-passing-style transformation. In this paper, we continue to investigate the direct-style transformation by extending it to programs with first-class continuations. First-class continuations break the stack-like discipline of continuations in that they are sent results out of turn. We detect them syntactically through an analysis of continuation-passing terms. We conservatively extend the direct-style transformation towards call-by-value functional terms (the pure lambda-calculus) by translating the declaration of a first-class continuation using the control operator call/cc, and by translating an occurrence of a first-class continuation using the control operator throw. We prove that our extension and the corresponding extended continuation-passing-style transformation are inverses.
国家哲学社会科学文献中心版权所有