Lune

OOPSLA2023顶会

Back to Direct Style: Typed and Tight

Marius Müller, Philipp Schuster, Jonathan Immanuel Brachthäuser, Klaus Ostermann

摘要

Translating programs into continuation-passing style is a well-studied tool to explicitly deal with the control structure of programs. This is useful, for example, for compilation. In a typed setting, there also is a logical interpretation of such a translation as an embedding of classical logic into intuitionistic logic. A naturally arising question is whether there is an inverse translation back to direct style. The answer to this question depends on how the continuation-passing translation is defined and on the domain of the inverse translation. In general, translating programs from continuation-passing style back to direct style requires the use of control operators to account for the use of continuations in non-trivial ways.

We present two languages, one in direct style and one in continuation-passing style. Both languages are typed and equipped with an abstract machine semantics. Moreover, both languages allow for non-trivial control flow. We further present a translation to continuation-passing style and a translation back to direct style. We show that both translations are type-preserving and also preserve semantics in a very precise way, giving an operational correspondence between the two languages. Moreover, we show that the compositions of the translations are well-behaved. In particular, they are syntactic one-sided inverses on the full language and full syntactic inverses when restricted to trivial control flow.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper1

  1. From folklore to fact: comparing implementations of stacks and continuationsKavon Farvardin, John H. ReppyPLDI 2020 · 17 次引用

相关 Paper

  1. Compiling with continuations, correctlyZoe Paraskevopoulou, Anvay GroverOOPSLA 2021 · 10 次引用
  2. A calculus of expandable stores: Continuation-and-environment-passing style translationsHugo Herbelin, Étienne MiqueyLICS 2020 · 1 次引用
  3. The Duality of λ-AbstractionVikraman Choudhury, Simon J. GayPOPL 2025 · 2 次引用
  4. Consuming and Persistent Types for Classical LogicDelia Kesner, Pierre VialLICS 2020 · 11 次引用
  5. Operational Algorithmic Game SemanticsBenedict Bunting, Andrzej S. MurawskiLICS 2023 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖