TLA +中一致性协议的组合模型检验
Compositional Model Checking of Consensus Protocols Specified in TLA+ via Interaction-Preserving Abstraction
摘要:
一致性协议广泛应用于构建可靠的分布式软件系统,其正确性至关重要。TLA+是一种轻量级的形式化规约语言,它能够精确地描述系统设计,并在不需要任何人工努力的情况下对设计进行详尽的检查。TLA+的特性使其在学术界和工业界广泛用于共识协议的规范和模型检验。然而,TLA+在模型检验中的状态爆炸问题限制了其应用。虽然组合模型检验是解决状态爆炸问题的关键,但现有的组合检验技术没有充分考虑TLA+的特点。在这项工作中,我们提出了交互保持抽象(IPA)框架,它利用TLA+的功能,并使实用和有效的组成模型检验的共识协议中指定的TLA+。IPA框架将系统规范划分为多个模块,每个模块又分为内部部分和交互部分。交互保持抽象的基本思想是省略每个模块的内部部分,这样另一个模块就无法区分它是与原始模块还是粗化的抽象模块交互。我们使用IPA框架对两个一致性协议Raft和CableRaft的TLA+规范进行了成分检查。Raft协议是一种最初在学术界发展起来的共识协议,后来在工业界得到了广泛的应用。PolarFS是商业数据库Alibaba PoloarDB的分布式文件系统。我们证明,IPA框架是易于使用的现实场景,并在同一时间显着降低了模型检验成本。
英文摘要:
Consensus protocols are widely used in building reliable distributed software systems and its correctness is of vital importance. TLA+ is a lightweight formal specification language which enables precise specification of system design and exhaustive checking of the design without any human effort. The features of TLA+ make it widely used in the specification and model checking of consensus protocols, both in academia and industry. However, the application of TLA+ is limited by the state explosion problem in model checking. Though compositional model checking is essential to tame the state explosion problem, existing compositional checking techniques do not sufficiently consider the characteristics of TLA+. In this work, we propose the Interaction-Preserving Abstraction (IPA) framework, which leverages the features of TLA+ and enables practical and efficient compositional model checking of consensus protocols specified in TLA+. In the IPA framework, system specification is partitioned into multiple modules, and each module is divided to the internal part and the interaction part. The basic idea of the interaction-preserving abstraction is to omit the internal part of each module, such that another module cannot distinguish whether it is interacting with the original module or the coarsened abstract one. We use the IPA framework to the compositional checking of the TLA+ specification of two consensus protocols Raft and ParallelRaft. Raft is a consensus protocol which is originally developed in the academia and then widely used in industry. ParallelRaft is the replication protocol in PolarFS, the distributed file system for the commercial database Alibaba PoloarDB. We demonstrate that the IPA framework is easy to use in realistic scenarios and at the same time significantly reduces the model checking cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。