带故障的分布式系统的函数式推理
Functional Reasoning for Distributed Systems with Failures
AI总结:
针对分布式系统非正式推理的不可靠性,提出基于Sync和Async双语言的函数式组合形式化推理方法,将异步系统归约为同步系统进行Hoare风格验证,并在Rocq中验证了BOSCO和SeqPaxos协议的安全性。
摘要:
分布式系统理论文献通常使用非正式的、类似Hoare风格的推理来论证正确性。虽然这些论证很直观,但并非全部都万无一失,且它们是否能直接对应形式化证明仍存疑问。我们对这种推理进行形式化基础构建,并通过语言设计和元分析将其与标准形式化方法联系起来,从而为包括拜占庭故障在内的一类分布式系统提出了一种函数式组合形式化推理风格。我们方法的核心是双语言:Sync和Async,它们形式化了分布式系统理论中的洞见,即在特定条件下,异步系统可归约为同步系统以进行更直接的推理。Sync将分布式系统描述为单个同步的数据并行程序。它在语法上限制程序,并具有适合Hoare风格形式化推理的函数式指称语义。Async将分布式系统建模为交互式monadic程序的集合,系统中每个非故障节点对应一个程序。它具有标准的基于迹的操作语义,通过交错对异步性进行建模。Sync编译为Async,随后可被提取以生成可执行代码。我们证明了在Sync程序的指称语义中证明的任何安全性属性,在其编译后的Async程序的操作语义中均得到保持。我们在Rocq中实现了双语言,并验证了两个容错共识协议的安全性属性:BOSCO和SeqPaxos。
英文摘要:
Distributed system theory literature often argues for correctness using an informal, Hoare-like style of reasoning. While these arguments are intuitive, they have not all been foolproof, and whether they directly correspond to formal proofs is in question. We formally ground this kind of reasoning and connect it to standard formal approaches through language design and meta-analysis, which leads to a functional style of compositional formal reasoning for a class of distributed systems, including cases involving Byzantine faults. The core of our approach is twin languages: Sync and Async, which formalize the insight from distributed system theory that an asynchronous system can be reduced to a synchronous system for more straightforward reasoning under certain conditions. Sync describes a distributed system as a single, synchronous, data-parallel program. It restricts programs syntactically and has a functional denotational semantics suitable for Hoare-style formal reasoning. Async models a distributed system as a collection of interacting monadic programs, one for each non-faulty node in the system. It has a standard trace-based operational semantics, modeling asynchrony with interleaving. Sync compiles to Async and can then be extracted to yield executable code. We prove that any safety property proven for a Sync program in its denotational semantics is preserved in the operational semantics of its compiled Async programs. We implement the twin languages in Rocq and verify the safety properties of two fault-tolerant consensus protocols: BOSCO and SeqPaxos.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。