论文标题

多部分协议的静态验证的改进

Statically Verified Refinements for Multiparty Protocols

论文作者

Zhou, Fangyi, Ferreira, Francisco, Hu, Raymond, Neykova, Rumyana, Yoshida, Nobuko

论文摘要

随着分布式计算在现代时代变得无处不在,安全分布式编程是一个开放的挑战。为了解决这个问题,多方会话类型(MPST)提供了一个打字纪律,以通过消息来召集并发,从而保证了沟通安全属性,例如死锁自由。 尽管最初将MPST专注于通信方面,并采用简单的打字系统来进行通信有效载荷,但现实世界中的通信协议通常包含有效负载的限制。我们介绍了MPST的扩展,介绍了精致的多方会话类型(RMPST),该类型通过数据类型的细化类型表达数据依赖性协议。 我们在使用涂鸦,多方协议描述工具链和目标f*(一种面向验证的功能编程语言)中提供了RMPST的实现,称为“会话”*的工具链*。用户可以在涂鸦中描述一个协议,并使用根据协议生成的细化型API在F*中实现端点。然后,F*编译器可以静态验证改进。此外,我们采用了一种新颖的回调API生成方法,可通过控制反转提供静态线性。我们通过现实世界的例子评估了我们的方法,并表明与幼稚的实施相比,它几乎没有开销,同时保证了基础理论的安全性。

With distributed computing becoming ubiquitous in the modern era, safe distributed programming is an open challenge. To address this, multiparty session types (MPST) provide a typing discipline for message-passing concurrency, guaranteeing communication safety properties such as deadlock freedom. While originally MPST focus on the communication aspects, and employ a simple typing system for communication payloads, communication protocols in the real world usually contain constraints on the payload. We introduce refined multiparty session types (RMPST), an extension of MPST, that express data dependent protocols via refinement types on the data types. We provide an implementation of RMPST, in a toolchain called Session*, using Scribble, a multiparty protocol description toolchain, and targeting F*, a verification-oriented functional programming language. Users can describe a protocol in Scribble and implement the endpoints in F* using refinement-typed APIs generated from the protocol. The F* compiler can then statically verify the refinements. Moreover, we use a novel approach of callback-styled API generation, providing static linearity guarantees with the inversion of control. We evaluate our approach with real world examples and show that it has little overhead compared to a naïve implementation, while guaranteeing safety properties from the underlying theory.

扫码加入交流群

加入微信交流群

微信交流群二维码

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