当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Statically Verified Refinements for Multiparty Protocols
arXiv - CS - Programming Languages Pub Date : 2020-09-14 , DOI: arxiv-2009.06541
Fangyi Zhou (1), Francisco Ferreira (1), Raymond Hu (2), Rumyana Neykova (3) and Nobuko Yoshida (1) ((1) Imperial College London, (2) University of Hertfordshire, (3) Brunel University London)

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\"ive implementation, while guaranteeing safety properties from the underlying theory.

中文翻译:

多方协议的静态验证改进

随着分布式计算在现代时代变得无处不在,安全的分布式编程是一个开放的挑战。为了解决这个问题,多方会话类型 (MPST) 为消息传递并发提供了类型规则,保证了通信安全属性,例如死锁自由。虽然最初 MPST 专注于通信方面,并为通信有效载荷采用简单的类型系统,但现实世界中的通信协议通常包含对有效载荷的约束。我们引入了改进的多方会话类型 (RMPST),它是 MPST 的扩展,它通过数据类型的改进类型来表达数据相关协议。我们在名为 Session* 的工具链中提供 RMPST 的实现,使用 Scribble,一个多方协议描述工具链,并针对 F*,一种面向验证的函数式编程语言。用户可以在 Scribble 中描述协议,并使用从协议生成的细化类型的 API 在 F* 中实现端点。F* 编译器然后可以静态验证改进。此外,我们使用一种新颖的回调式 API 生成方法,通过控制反转提供静态线性保证。我们用真实世界的例子评估了我们的方法,并表明与原始实现相比,它的开销很小,同时保证了基础理论的安全特性。通过控制反转提供静态线性保证。我们用真实世界的例子来评估我们的方法,并表明与原始实现相比,它的开销很小,同时保证了基础理论的安全特性。通过控制反转提供静态线性保证。我们用真实世界的例子来评估我们的方法,并表明与原始实现相比,它的开销很小,同时保证了基础理论的安全特性。
更新日期:2020-09-15
down
wechat
bug