arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2009.06541cs.PLcs.DC
收藏

多方协议的静态验证改进

Statically Verified Refinements for Multiparty Protocols

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

摘要:

随着分布式计算在现代变得无处不在,安全的分布式编程是一个公开的挑战。为了解决这个问题,多方会话类型(MPST)为消息传递并发提供了一个类型规则,保证了通信安全属性,如死锁自由。虽然最初MPST集中在通信方面,并采用一个简单的类型系统的通信有效载荷,在现实世界中的通信协议通常包含的有效载荷的约束。我们介绍了改进的多方会话类型(RMPST),MPST的扩展,通过细化类型的数据类型表示数据相关的协议。我们提供了一个RMPST的实现,在一个工具链称为会话 *,使用Scribble,多方协议描述工具链,并针对F*,面向验证的功能程序设计语言。用户可以在Scribble中描述协议,并使用从协议生成的精炼类型的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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑