控制效果及其语义的组合与关联
Combining and Relating Control Effects and their Semantics
摘要:
结合本地异常和第一类延续导致程序具有复杂的控制流,以及表达强大的构造(如可扩展异常)的可能性。我们描述和比较游戏模型的程序设计语言,其中包括这些功能,以及高阶参考。它们是通过对比方法获得的:通过用“控制指针”注释移动序列,指示异常被抛出和捕获的位置,以及通过组成异常和延续单子。前一种方法允许一个明确的表示在游戏中的控制流的异常,因此一个简单的证明的可定义性(完全抽象)的因式分解,以及提供一个语义的方法来控制流分析的异常处理的可能性。然而,建立这样一个具体而复杂的模型的合理性是一个不平凡的问题。它可以通过建立与monad语义的对应关系来解决,基于擦除显式异常移动并用控制指针替换它们。
英文摘要:
Combining local exceptions and first class continuations leads to programs with complex control flow, as well as the possibility of expressing powerful constructs such as resumable exceptions. We describe and compare games models for a programming language which includes these features, as well as higher-order references. They are obtained by contrasting methodologies: by annotating sequences of moves with "control pointers" indicating where exceptions are thrown and caught, and by composing the exceptions and continuations monads. The former approach allows an explicit representation of control flow in games for exceptions, and hence a straightforward proof of definability (full abstraction) by factorization, as well as offering the possibility of a semantic approach to control flow analysis of exception-handling. However, establishing soundness of such a concrete and complex model is a non-trivial problem. It may be resolved by establishing a correspondence with the monad semantics, based on erasing explicit exception moves and replacing them with control pointers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。