论文标题

带有算术改进的会话类型及其在工作分析中的应用

Session Types with Arithmetic Refinements and Their Application to Work Analysis

论文作者

Das, Ankush, Pfenning, Frank

论文摘要

会话类型在静态规定消息通信过程的双向通信协议上,并在带有线性逻辑命题的咖喱途径中。但是,简单的会话类型无法指定超出交换消息类型之外的属性。在本文中,我们通过使用线性算术捕获数据结构和算法的固有属性的索引修补来扩展类型系统,以便我们可以使用基因计量类型表达和验证程序的摊销成本。我们表明,尽管Presburger算术具有可决定性,但类型相等,因此类型检查现在是不可决定的,这与功能性语言的类似依赖性精炼类型系统形成鲜明对比。我们还提出了类型平等的实用不完整算法和类型检查算法,该算法相对于类型相等的Oracle是完整的。这种明确的语言中的过程表达式相当冗长,因此我们还引入了一种隐性形式,以及一种重建明确程序的声音和完整算法,从探明焦点的证明理论技术中借用思想。最后,我们通过在实施中验证了各种示例来说明我们的系统和算法。

Session types statically prescribe bidirectional communication protocols for message-passing processes and are in a Curry-Howard correspondence with linear logic propositions. However, simple session types cannot specify properties beyond the type of exchanged messages. In this paper we extend the type system by using index refinements from linear arithmetic capturing intrinsic attributes of data structures and algorithms so that we can express and verify amortized cost of programs using ergometric types. We show that, despite the decidability of Presburger arithmetic, type equality and therefore also type checking are now undecidable, which stands in contrast to analogous dependent refinement type systems from functional languages. We also present a practical incomplete algorithm for type equality and an algorithm for type checking which is complete relative to an oracle for type equality. Process expressions in this explicit language are rather verbose, so we also introduce an implicit form and a sound and complete algorithm for reconstructing explicit programs, borrowing ideas from the proof-theoretic technique of focusing. We conclude by illustrating our systems and algorithms with a variety of examples that have been verified in our implementation.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源