多方消息传递协议的改进:与规范无关的理论与实现

Vassor Martin, Yoshida Nobuko
{"title":"多方消息传递协议的改进:与规范无关的理论与实现","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":"{\"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}","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

摘要

众所周知,多方消息传递协议很难设计,因为交互不匹配会导致死锁等错误。现有的协议规范格式(如多方会话类型(MPST))就是为防止此类错误而开发的。为了进一步约束协议,可以用细化(即根据先前交换的值来控制协议行为的逻辑谓词)来扩展规范。本文提出了一个具有细化功能的多方消息传递协议框架及其在 Rust 中的实现。我们的工作将细化的正确性与底层计算模型解耦,从而产生了一个与规范无关的框架。我们的贡献有三方面。首先,我们引入了一个描述有效精炼轨迹的轨迹系统,即与精炼相关的正确的发送和接收操作序列。其次,我们给出了一个正确的计算模型,命名为精炼通信系统(RCS),它是具有精炼的通信自动机系统的扩展。我们证明了 RCS 只产生有效的细化轨迹。我们展示了如何从主流协议规范格式生成 RCS,如精炼多方会话类型(RMPST)或精炼编排自动机。第三,我们通过开发静态分析技术和改进的动态细化评估计算模型,展示了框架的灵活性。最后,我们为去中心化的 RMPST 提供了一个 Rust 工具链,用一组文献中的基准来评估我们的实现,并观察到细化开销微不足道。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Refinements for Multiparty Message-Passing Protocols: Specification-agnostic theory and implementation
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Memory Consistency and Program Transformations No Saved Kaleidosope: an 100% Jitted Neural Network Coding Language with Pythonic Syntax Towards Quantum Multiparty Session Types The Incredible Shrinking Context... in a decompiler near you Scheme Pearl: Quantum Continuations
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1