论文标题

多党会话编程与全局协议组合器

Multiparty Session Programming with Global Protocol Combinators

论文作者

Imai, Keigo, Neykova, Rumyana, Yoshida, Nobuko, Yuen, Shoji

论文摘要

多方会话类型(MPST)是通信协议的打字学科。它确保缺乏通信错误和僵局的僵局。 MPST理论的最新实现依赖于(1)运行时线性检查以确保正确使用通信渠道,以及(2)用于指定和验证多方协议的外部域特异性语言。为了克服这些局限性,我们建议使用全局组合器编程的库,这是一组用于编写和验证OCAML中多方协议的功能。协议中所有过程的局部行为是从全局组合器立即推断出来的。我们正式化了全球组合者,并证明了全球组合者的合理性 - 全球组合型的一组本地类型,通过该类型,键入的端点程序可以确保类型和通信安全。我们的方法可以以相同的语言发生从协议规范到流程实现的整个协议的全静态验证和实现。我们将我们的实现与未效力和延续的风格实现进行了比较,并通过实施大量协议来展示其表现力。我们显示我们的库可以与现有库和服务,实现DNS(域名服务)协议和OAuth(开放身份验证)协议进行互操作。

Multiparty Session Types (MPST) is a typing discipline for communication protocols. It ensures the absence of communication errors and deadlocks for well-typed communicating processes. The state-of-the-art implementations of the MPST theory rely on (1) runtime linearity checks to ensure correct usage of communication channels and (2) external domain-specific languages for specifying and verifying multiparty protocols. To overcome these limitations, we propose a library for programming with global combinators -- a set of functions for writing and verifying multiparty protocols in OCaml. Local behaviours for all processes in a protocol are inferred at once from a global combinator. We formalise global combinators and prove a sound realisability of global combinators -- a well-typed global combinator derives a set of local types, by which typed endpoint programs can ensure type and communication safety. Our approach enables fully-static verification and implementation of the whole protocol, from the protocol specification to the process implementations, to happen in the same language. We compare our implementation to untyped and continuation-passing style implementations, and demonstrate its expressiveness by implementing a plethora of protocols. We show our library can interoperate with existing libraries and services, implementing DNS (Domain Name Service) protocol and the OAuth (Open Authentication) protocol.

扫码加入交流群

加入微信交流群

微信交流群二维码

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