Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Statically verified refinements for multiparty protocols

Published: 13 November 2020 Publication History

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.
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 toolchain for multiparty protocols, 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 naive implementation, while guaranteeing safety properties from the underlying theory.

Supplementary Material

Auxiliary Presentation Video (oopsla20main-p87-p-video.mp4)
In this video, we provide an overview of the refined multiparty session types and our toolchain, Session*, for implementing refined multiparty protocols.

Cited By

View all
  • (2024)Behavioural Types for Heterogeneous Systems (Position Paper)Electronic Proceedings in Theoretical Computer Science10.4204/EPTCS.401.4401(37-48)Online publication date: 6-Apr-2024
  • (2024)Discourje: Run-Time Verification of Communication Protocols in Clojure — Live at LastFormal Methods10.1007/978-3-031-71177-0_11(158-166)Online publication date: 13-Sep-2024
  • (2024)Deciding Subtyping for Asynchronous Multiparty SessionsProgramming Languages and Systems10.1007/978-3-031-57262-3_8(176-205)Online publication date: 6-Apr-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 4, Issue OOPSLA
November 2020
3108 pages
EISSN:2475-1421
DOI:10.1145/3436718
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 November 2020
Published in PACMPL Volume 4, Issue OOPSLA

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Code Generation
  2. Distributed Programming
  3. F*
  4. Multiparty Session Types (MPST)
  5. Refinement Types

Qualifiers

  • Research-article

Funding Sources

  • NCSS/EPSRC VeTSS
  • EPSRC

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)219
  • Downloads (Last 6 weeks)25
Reflects downloads up to 21 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Behavioural Types for Heterogeneous Systems (Position Paper)Electronic Proceedings in Theoretical Computer Science10.4204/EPTCS.401.4401(37-48)Online publication date: 6-Apr-2024
  • (2024)Discourje: Run-Time Verification of Communication Protocols in Clojure — Live at LastFormal Methods10.1007/978-3-031-71177-0_11(158-166)Online publication date: 13-Sep-2024
  • (2024)Deciding Subtyping for Asynchronous Multiparty SessionsProgramming Languages and Systems10.1007/978-3-031-57262-3_8(176-205)Online publication date: 6-Apr-2024
  • (2024)Programming Language Implementations with Multiparty Session TypesActive Object Languages: Current Research Trends10.1007/978-3-031-51060-1_6(147-165)Online publication date: 29-Jan-2024
  • (2023)Dependent Session Protocols in Separation Logic from First Principles (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36078567:ICFP(768-795)Online publication date: 31-Aug-2023
  • (2023)Intrinsically Typed Sessions with Callbacks (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36078547:ICFP(711-739)Online publication date: 31-Aug-2023
  • (2023)Oven: Safe and Live Communication Protocols in Scala, using Synthetic Behavioural Type AnalysisProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3604926(1511-1514)Online publication date: 12-Jul-2023
  • (2023)Hybrid Multiparty Session Types: Compositionality for Protocol Specification through Endpoint ProjectionProceedings of the ACM on Programming Languages10.1145/35860317:OOPSLA1(112-142)Online publication date: 6-Apr-2023
  • (2023)Multiparty Session Typing in Java, DeductivelyTools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-031-30820-8_3(19-27)Online publication date: 22-Apr-2023
  • (2022)A Type Discipline for Message Passing Parallel ProgramsACM Transactions on Programming Languages and Systems10.1145/355251944:4(1-55)Online publication date: 21-Dec-2022
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media