Statically Verified Refinements for Multiparty Protocols

Fangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova, Nobuko Yoshida
9/14/2020
cs.PLcs.DC

Official code: sessionstar/oopsla20-artifact (5 stars, F*, Apache-2.0, last commit 2021-02-01).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Artifact for "Statically Verified Refinements for Multiparty Protocols" (Accepted by OOPSLA '20)

50F*, MakefileAug 3, 20205 years agoApache-2.0

Similar Papers

Cite this paper

@article{zhou2020statically,
  title  = {Statically Verified Refinements for Multiparty Protocols},
  author = {Fangyi Zhou and Francisco Ferreira and Raymond Hu and Rumyana Neykova and Nobuko Yoshida},
  year   = {2020},
  eprint = {2009.06541},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2009.06541}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2009.06541.svg)](https://codeofpaper.com/paper/2009.06541)

Discussion