用混合选择状态型态建模分布式应用
Modelling Distributed Applications with Mixed-Choice Stateful Typestates
AI总结:
本文提出一种概率运行时解决方案,扩展状态型态以支持量化约束、混合会话和预期比率,用于验证分布式协议的正确性。
摘要:
分布式系统在软件行业日益普及。由于其内在复杂性,许多研究聚焦于验证其行为。行为模型(如会话类型或状态型)允许静态验证。正确设计分布式协议并不容易,其通信行为通常通过异步消息处理隐式定义,导致错误难以在执行时检测。虽然状态型可以简化设计过程,但它们在两个方面存在不足:缺乏定义分布式协议量化约束的表达能力(如多数确认数);且假设操作严格顺序,无法捕捉状态中的并发输入/输出操作。此外,运行时网络故障无法静态验证。本文提出一种概率运行时解决方案,通过内部可变状态、混合会话和预期比率扩展状态型,以支持量化约束、并发操作和运行时监控。
英文摘要:
Distributed systems have become increasingly prevalent in the software industry. Due to their intrinsic complexity, much research has focused on the verification of their behaviour. An active research line is around behaviour models that capture these protocols - e.g., session types, or typestates - allowing their static verification. Correctly designing distributed protocols is not trivial. Their communication behaviour is typically implicitly defined via asynchronous message handlers, making errors harder to detect until execution. While typestates can ease the design process by explicitly defining correct sequences of operations, they struggle in two ways: they lack the expressiveness to define quantitative constraints that govern distributed protocols (i.e., number of acknowledgements for a quorum); and they assume strict sequencing of operations, failing to capture concurrent input/output actions in a state, typical of the distributed setting. Furthermore, runtime network failures cannot be statically verified. We present a probabilistic runtime solution extending typestates with: (i) an internal mutable state for the expression of quantitative constraints; (ii) mixed sessions to represent concurrent input and output actions; (iii) expected ratios for the number of actions in a state, with monitoring semantics to detect deviations from an expected behaviour at runtime. We demonstrate the suitability of our solution with two examples that motivated our approach: an acknowledgement protocol with a participant that sends several messages while waiting for a response, effectively modelling input and output operations in a state; and a voting protocol whose participants try to achieve consensus on a single bit using a quorum, thus, requiring an internal mutable state, while respecting a pre-defined distribution for the volume of exchanged messages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。