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

灵活多方会话协议的契约式设计--扩展版

Design-by-Contract for Flexible Multiparty Session Protocols -- Extended Version

Lorenzo Gheri, Ivan Lanese, Neil Sayers, Emilio Tuosto, Nobuko Yoshida

摘要:

编排模型支持分布式编程中的构造纠正原则。此外,它们能够根据所需系统行为的全局规范自动生成正确的基于消息的通信模式。在本文中,我们扩展了理论的编排自动机,编排模型的基础上,有限状态自动机,有两个关键功能。首先,我们允许参与者只在编排自动机描述的某些场景中行动。虽然这看起来很自然,但文献中的许多编排方法,特别是编排自动机,禁止这种行为。其次,我们为通信配备了约束可以通信的值的断言,从而实现按契约设计的方法。我们提供了一个工具链,允许利用上述理论为TypeScript Web编程生成API。通过生成的API进行通信的程序通过构造遵循规定的通信模式,并且没有诸如死锁之类的通信错误。

英文摘要:

Choreographic models support a correctness-by-construction principle in distributed programming. Also, they enable the automatic generation of correct message-based communication patterns from a global specification of the desired system behaviour. In this paper we extend the theory of choreography automata, a choreographic model based on finite-state automata, with two key features. First, we allow participants to act only in some of the scenarios described by the choreography automaton. While this seems natural, many choreographic approaches in the literature, and choreography automata in particular, forbid this behaviour. Second, we equip communications with assertions constraining the values that can be communicated, enabling a design-by-contract approach. We provide a toolchain allowing to exploit the theory above to generate APIs for TypeScript web programming. Programs communicating via the generated APIs follow, by construction, the prescribed communication pattern and are free from communication errors such as deadlocks.

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

↑