Verified Causal Broadcast with Liquid Haskell

Patrick Redmond, Gan Shen, Niki Vazou, L. Kuper
{"title":"Verified Causal Broadcast with Liquid Haskell","authors":"Patrick Redmond, Gan Shen, Niki Vazou, L. Kuper","doi":"10.1145/3587216.3587222","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":318613,"journal":{"name":"Proceedings of the 34th Symposium on Implementation and Application of Functional Languages","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 34th Symposium on Implementation and Application of Functional Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3587216.3587222","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

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.
用Liquid Haskell验证因果广播
确保消息按因果顺序传递的协议是分布式系统中无处不在的构建块。例如,分布式数据存储系统可以使用因果顺序消息传递来确保因果一致性,而crdt可以依赖于底层因果顺序消息传递层的存在来简化其实现。因果传递协议确保在将消息传递给流程时,发送到同一流程的任何因果关系之前的消息都已经传递给该流程。虽然因果传递协议被广泛使用,但对其正确性的验证却不太常见,更不用说对可执行实现的机器检查证明了。我们在Haskell中实现了一个标准的因果广播协议,并使用Liquid Haskell求解器辅助验证系统来表达和机械地证明消息永远不会以违反因果关系的顺序传递给进程。我们使用细化类型来表达这个属性,并证明它符合我们的实现,利用Liquid Haskell的底层SMT求解器来自动化部分证明,并使用其手动定理证明功能来完成其余部分。然后,我们将经过验证的因果广播实现作为分布式键值存储的基础。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信