arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.14767cs.PLcs.DC
收藏

使用Liquid Haskell验证因果广播

Verified Causal Broadcast with Liquid Haskell

Patrick Redmond, Gan Shen, Niki Vazou, Lindsey Kuper

摘要:

确保消息按因果顺序传递的协议是分布式系统的普遍构建块。例如,分布式数据存储系统可以使用因果有序消息传递来确保因果一致性,CRDT可以依赖于底层因果有序消息传递层的存在来简化其实现。因果传递协议确保当一个消息被传递到一个进程时,任何发送到同一进程的因果消息都已经被传递到它。虽然因果传递协议被广泛使用,但对其正确性的验证并不常见,更不用说关于可执行实现的机器检查证明了。我们在Haskell中实现了一个标准的因果广播协议,并使用Liquid Haskell求解器辅助验证系统来表达和机械地证明消息永远不会以违反因果关系的顺序传递给进程。我们表示此属性使用细化类型,并证明它持有我们的实现,利用液体Haskell的底层SMT求解器自动化部分证明,并使用其手动定理证明功能的休息。然后,我们将我们验证过的因果广播实现作为分布式键值存储的基础。

英文摘要:

Protocols to ensure that messages are delivered in causal order are a ubiquitous building block of distributed systems. For instance, distributed data storage systems can use causally ordered message delivery to ensure causal consistency, and CRDTs can rely on the existence of an underlying causally-ordered messaging layer to simplify their implementation. A causal delivery protocol ensures that when a message is delivered to a process, any causally preceding messages sent to the same process have already been delivered to it. While causal delivery protocols are widely used, verification of their correctness is less common, much less machine-checked proofs about executable implementations. We implemented a standard causal broadcast protocol in Haskell and used the Liquid Haskell solver-aided verification system to express and mechanically prove that messages will never be delivered to a process in an order that violates causality. We express this property using refinement types and prove that it holds of our implementation, taking advantage of Liquid Haskell's underlying SMT solver to automate parts of the proof and using its manual theorem-proving features for the rest. We then put our verified causal broadcast implementation to work as the foundation of a distributed key-value store.

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

↑