Refinements for Multiparty Message-Passing Protocols: Specification-agnostic theory and implementation

Vassor Martin, Yoshida Nobuko
{"title":"Refinements for Multiparty Message-Passing Protocols: Specification-agnostic theory and implementation","authors":"Vassor Martin, Yoshida Nobuko","doi":"arxiv-2407.09106","DOIUrl":null,"url":null,"abstract":"Multiparty message-passing protocols are notoriously difficult to design, due\nto interaction mismatches that lead to errors such as deadlocks. Existing\nprotocol specification formats have been developed to prevent such errors (e.g.\nmultiparty session types (MPST)). In order to further constrain protocols,\nspecifications can be extended with refinements, i.e. logical predicates to\ncontrol the behaviour of the protocol based on previous values exchanged.\nUnfortunately, existing refinement theories and implementations are tightly\ncoupled with specification formats. This paper proposes a framework for\nmultiparty message-passing protocols with refinements and its implementation in\nRust. Our work decouples correctness of refinements from the underlying model\nof computation, which results in a specification-agnostic framework. Our\ncontributions are threefold. First, we introduce a trace system which\ncharacterises valid refined traces, i.e. a sequence of sending and receiving\nactions correct with respect to refinements. Second, we give a correct model of\ncomputation named refined communicating system (RCS), which is an extension of\ncommunicating automata systems with refinements. We prove that RCS only produce\nvalid refined traces. We show how to generate RCS from mainstream protocol\nspecification formats, such as refined multiparty session types (RMPST) or\nrefined choreography automata. Third, we illustrate the flexibility of the\nframework by developing both a static analysis technique and an improved model\nof computation for dynamic refinement evaluation. Finally, we provide a Rust\ntoolchain for decentralised RMPST, evaluate our implementation with a set of\nbenchmarks from the literature, and observe that refinement overhead is\nnegligible.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"37 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.09106","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Multiparty message-passing protocols are notoriously difficult to design, due to interaction mismatches that lead to errors such as deadlocks. Existing protocol specification formats have been developed to prevent such errors (e.g. multiparty session types (MPST)). In order to further constrain protocols, specifications can be extended with refinements, i.e. logical predicates to control the behaviour of the protocol based on previous values exchanged. Unfortunately, existing refinement theories and implementations are tightly coupled with specification formats. This paper proposes a framework for multiparty message-passing protocols with refinements and its implementation in Rust. Our work decouples correctness of refinements from the underlying model of computation, which results in a specification-agnostic framework. Our contributions are threefold. First, we introduce a trace system which characterises valid refined traces, i.e. a sequence of sending and receiving actions correct with respect to refinements. Second, we give a correct model of computation named refined communicating system (RCS), which is an extension of communicating automata systems with refinements. We prove that RCS only produce valid refined traces. We show how to generate RCS from mainstream protocol specification formats, such as refined multiparty session types (RMPST) or refined choreography automata. Third, we illustrate the flexibility of the framework by developing both a static analysis technique and an improved model of computation for dynamic refinement evaluation. Finally, we provide a Rust toolchain for decentralised RMPST, evaluate our implementation with a set of benchmarks from the literature, and observe that refinement overhead is negligible.
多方消息传递协议的改进:与规范无关的理论与实现
众所周知,多方消息传递协议很难设计,因为交互不匹配会导致死锁等错误。现有的协议规范格式(如多方会话类型(MPST))就是为防止此类错误而开发的。为了进一步约束协议,可以用细化(即根据先前交换的值来控制协议行为的逻辑谓词)来扩展规范。本文提出了一个具有细化功能的多方消息传递协议框架及其在 Rust 中的实现。我们的工作将细化的正确性与底层计算模型解耦,从而产生了一个与规范无关的框架。我们的贡献有三方面。首先,我们引入了一个描述有效精炼轨迹的轨迹系统,即与精炼相关的正确的发送和接收操作序列。其次,我们给出了一个正确的计算模型,命名为精炼通信系统(RCS),它是具有精炼的通信自动机系统的扩展。我们证明了 RCS 只产生有效的细化轨迹。我们展示了如何从主流协议规范格式生成 RCS,如精炼多方会话类型(RMPST)或精炼编排自动机。第三,我们通过开发静态分析技术和改进的动态细化评估计算模型,展示了框架的灵活性。最后,我们为去中心化的 RMPST 提供了一个 Rust 工具链,用一组文献中的基准来评估我们的实现,并观察到细化开销微不足道。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信