arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.07349cs.PL
收藏

类型化调用上下文的功能抽象

A Functional Abstraction of Typed Invocation Contexts

Youyou Cong, Chiaki Ishio, Kaho Honda, Kenichi Asai

AI总结:

本文扩展了 Danvy 和 Filinski 的方法,通过 CPS 语义中轨迹的功能表示,为 control 和 prompt 操作符推导出恰好编码 CPS 约束的类型系统。

摘要:

在论文《类型化上下文的功能抽象》中,Danvy 和 Filinski 展示了如何从 CPS 语义推导出 shift 和 reset 操作符的单态类型系统。在本文中,我们展示了这一方法如何扩展到 Felleisen 的 control 和 prompt 操作符。与 shift 和 reset 相比,control 和 prompt 表现出更动态的行为,因为它们可以操纵先前捕获的续延调用周围的上下文轨迹。我们的关键观察是,通过在 CPS 语义中采用轨迹的功能表示,我们可以推导出一个类型系统,该类型系统恰好编码了 CPS 语义所施加的所有约束,且仅编码这些约束。

英文摘要:

In their paper "A Functional Abstraction of Typed Contexts", Danvy and Filinski show how to derive a monomorphic type system of the shift and reset operators from a CPS semantics. In this paper, we show how this method scales to Felleisen's control and prompt operators. Compared to shift and reset, control and prompt exhibit a more dynamic behavior, in that they can manipulate a trail of contexts surrounding the invocation of previously captured continuations. Our key observation is that, by adopting a functional representation of trails in the CPS semantics, we can derive a type system that encodes all and only constraints imposed by the CPS semantics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑