Multiparty session types are designed to abstractly capture the structure of communication protocols and verify behavioural properties. One important such property is progress, i.e., the absence of deadlock. Distributed algorithms often resemble multiparty communication protocols. But proving their properties, in particular termination that is closely related to progress, can be elaborate. Since distributed algorithms are often designed to cope with faults, a first step towards using session types to verify distributed algorithms is to integrate fault-tolerance. We extend multiparty session types to cope with system failures such as unreliable communication and process crashes. Moreover, we augment the semantics of processes by failure patterns that can be used to represent system requirements (as, e.g., failure detectors). To illustrate our approach we analyse a variant of the well-known rotating coordinator algorithm by Chandra and Toueg.
翻译:多方会话类型旨在抽象地捕捉通信协议的结构并验证行为属性。其中一项重要的属性是进展性,即不存在死锁。分布式算法通常类似于多方通信协议,但证明其属性,特别是与进展性密切相关的终止性,可能较为复杂。由于分布式算法通常设计用于应对故障,将会话类型用于验证分布式算法的第一步是集成容错能力。我们扩展了多方会话类型,以应对诸如不可靠通信和进程崩溃等系统故障。此外,我们通过故障模式增强了进程的语义,这些模式可用于表示系统需求(例如,故障检测器)。为说明我们的方法,我们分析了Chandra和Toueg提出的著名旋转协调器算法的一个变体。