Skip to main content
QUICK REVIEW

[Paper Review] Compositional Model Checking of Consensus Protocols Specified in TLA+ via Interaction-Preserving Abstraction

Xiaosong Gu, Wei Cao|arXiv (Cornell University)|Feb 23, 2022
Service-Oriented Architecture and Web ServicesComputer Science5 citations
TL;DR

This paper proposes Interaction-Preserving Abstraction (IPA), a compositional model checking framework for TLA+ specifications of consensus protocols that reduces state explosion by abstracting internal logic while preserving inter-module interactions. The approach enables efficient, scalable verification of Raft and ParallelRaft, cutting model checking costs by over 4x in Raft and significantly reducing time in PRaft, with practical applicability in industrial settings.

ABSTRACT

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.

Motivation & Objective

  • Address the state explosion problem in TLA+ model checking of consensus protocols, which limits scalability and practical use.
  • Overcome the limitations of existing compositional techniques that do not account for TLA+’s unique specification style.
  • Enable efficient, scalable verification of industrial-strength consensus protocols like Raft and ParallelRaft using TLA+.
  • Develop a practical framework that integrates seamlessly into real-world protocol design and verification workflows.

Proposed method

  • Partition TLA+ specifications into modules, each with internal and interaction components.
  • Apply interaction-preserving abstraction by removing internal logic while ensuring external modules cannot distinguish the abstracted version from the original.
  • Leverage TLA+’s global state model and lightweight formalism to define abstractions that preserve essential behavioral interfaces.
  • Use the abstracted modules in a fully automatic compositional model checking process via TLC.
  • Select abstraction levels based on protocol complexity, focusing on minimizing state space without losing verification soundness.
  • Validate the framework on two real-world protocols: Raft (academic) and ParallelRaft (industrial, in PolarFS).

Experimental results

Research questions

  • RQ1Can compositional model checking be effectively applied to TLA+ specifications of consensus protocols while preserving correctness?
  • RQ2How can abstraction be applied to TLA+ modules in a way that maintains interaction fidelity across components?
  • RQ3To what extent does the IPA framework reduce model checking cost in realistic, complex consensus protocols?
  • RQ4Can the IPA framework be practically applied in industrial settings where TLA+ is used for protocol specification and verification?
  • RQ5How does the effectiveness of IPA vary between protocols with different design structures, such as Raft and ParallelRaft?

Key findings

  • The IPA framework significantly reduces model checking cost, with a cost ratio exceeding 4.3 for Raft, and likely much higher due to conservative time limits.
  • In the Raft case, direct model checking reached a 200-hour time limit, indicating that IPA enables feasible verification where direct checking fails.
  • For ParallelRaft, the cost ratio is around 3, reflecting the smaller proportion of abstractable internal logic due to performance optimizations.
  • Despite a lower cost ratio, IPA still provides substantial time savings in PRaft, making it highly practical for industrial use.
  • The abstraction process is intuitive and straightforward for developers familiar with the protocol design, enabling smooth integration into existing verification workflows.
  • The framework is effective not only for academic protocols like Raft but also for complex industrial protocols like ParallelRaft, demonstrating broad applicability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.