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.
翻译:丹维和菲林斯基在他们的论文《打字背景的功能性抽象》中展示了如何从CPS语义学中产生一个单态的变换和重置操作员系统,并重置操作员。在本文中,我们展示了这种方法如何对Felleisen的控制和快速操作员进行控制。相比于转换和重置、控制和迅速展示一种更动态的行为,因为他们可以操纵一系列围绕援引先前捕获的延续物的背景。我们的主要观察是,通过对CPS语义学中的轨迹进行功能性描述,我们可以产生一种将CPS语义学中的所有和唯一的限制编码的型系统。