arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.09106cs.PL
收藏

多参与方消息传递协议的精化:规范无关的理论与实现

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

Vassor Martin, Yoshida Nobuko

AI总结:

本文提出规范无关的多参与方消息传递协议精化框架及Rust实现,通过精化迹系统和RCS计算模型解耦正确性与规范格式,并验证其灵活性与低开销。

摘要:

多参与方消息传递协议因交互不匹配而导致死锁等错误,设计难度众所周知。现有的协议规范格式(例如多参与方会话类型(MPST))已被开发出来以防止此类错误。为了进一步约束协议,规范可以通过精化进行扩展,即使用逻辑谓词根据先前交换的值来控制协议的行为。不幸的是,现有的精化理论和实现与规范格式紧密耦合。本文提出了一个带精化的多参与方消息传递协议框架及其在Rust中的实现。我们的工作将精化的正确性与底层计算模型解耦,从而得到一个规范无关的框架。我们的贡献有三方面。第一,我们引入了一个迹系统,用于刻画有效的精化迹,即相对于精化而言正确的发送和接收动作序列。第二,我们给出了一个正确的计算模型,称为精化通信系统(RCS),它是带精化的通信自动机系统的扩展。我们证明了RCS只产生有效的精化迹。我们展示了如何从主流协议规范格式(如精化多参与方会话类型(RMPST)或精化编排自动机)生成RCS。第三,我们通过开发一种静态分析技术和一种用于动态精化求值的改进计算模型,展示了该框架的灵活性。最后,我们为去中心化的RMPST提供了一个Rust工具链,使用文献中的一组基准测试评估了我们的实现,并观察到精化开销可以忽略不计。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑