四种定界控制算子的类型系统
Type System for Four Delimited Control Operators
AI总结:
针对四种定界控制算子缺乏统一关联类型系统、control0无对应类型系统的问题,基于CPS解释器推导统一单态类型系统,在Agda中验证其类型保持性与演算终止性,并明确其与已有三类算子类型系统的关联。
摘要:
过去几十年间,控制算子的操作行为已得到全面研究,但其类型系统的研究却并未如此。shift、control、shift0 各自拥有独立的类型系统,彼此间无关联,且目前尚无直接对应 control0 的类型系统。本文通过为这四种控制算子构建统一的类型系统,弥补了这一空白。我们遵循 Danvy 和 Filinski 的方法,从定义四种控制算子操作语义的 CPS(续体传递风格)解释器推导出一个单态类型系统。通过在 Agda 中实现带类型的 CPS 解释器,我们证明了 CPS 翻译具有类型保持性,且包含全部四种控制算子的演算具有终止性。此外,我们还阐明了本文提出的类型系统与此前 shift、control、shift0 各自类型系统之间的关联。
英文摘要:
The operational behavior of control operators has been studied comprehensively in the past few decades, but type systems of control operators have not. There are distinct type systems for shift, control, and shift0 without any relationship between them, and there has not been a type system that directly corresponds to control0. This paper remedies this situation by giving a uniform type system for all the four control operators. Following Danvy and Filinski's approach, we derive a monomorphic type system from the CPS interpreter that defines the operational semantics of the four control operators. By implementing the typed CPS interpreter in Agda, we show that the CPS translation preserves types and that the calculus with all the four control operators is terminating. Furthermore, we show the relationship between our type system and the previous type systems for shift, control, and shift0.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。