MET: Model Checking-Driven Explorative Testing of CRDT Designs and Implementations

04/29/2022
by   Yuqi Zhang, et al.
0

Internet-scale distributed systems often replicate data at multiple geographic locations to provide low latency and high availability. The Conflict-free Replicated Data Type (CRDT) is a framework that provides a principled approach to maintaining eventual consistency among data replicas. CRDTs have been notoriously difficult to design and implement correctly. Subtle deep bugs lie in the complex and tedious handling of all possible cases of conflicting data updates. We argue that the CRDT design should be formally specified and model-checked to uncover deep bugs. The implementation further needs to be systematically tested. On the one hand, the testing needs to inherit the exhaustive nature of the model checking and ensures the coverage of testing. On the other hand, the testing is expected to find coding errors which cannot be detected by design level verification. Towards the challenges above, we propose the Model Checking-driven Explorative Testing (MET) framework. At the design level, MET uses TLA+ to specify and model check CRDT designs. At the implementation level, MET conducts model checking-driven explorative testing, in the sense that the test cases are automatically generated from the model checking traces. The system execution is controlled to proceed deterministically, following the model checking trace. The explorative testing systematically controls and permutes all nondeterministic message reorderings. We apply MET in our practical development of CRDTs. The bugs in both designs and implementations of CRDTs are found. As for bugs which can be found by traditional testing techniques, MET greatly reduces the cost of fixing the bugs. Moreover, MET can find subtle deep bugs which cannot be found by existing techniques at a reasonable cost. We further discuss how MET provides us with sufficient confidence in the correctness of our CRDT designs and implementations.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/12/2021

Verifying High-Level Latency-Insensitive Designs with Formal Model Checking

Latency-insensitive design mitigates increasing interconnect delay and e...
research
03/22/2021

Formal Verification for Node-Based Visual Scripts Using Symbolic Model Checking

Visual script languages with a node-based interface have commonly been u...
research
11/14/2021

Prognosis: Closed-Box Analysis of Network Protocol Implementations

We present Prognosis, a framework offering automated closed-box learning...
research
04/21/2021

Tutorial: Designing Distributed Software in mCRL2

Distributed software is very tricky to implement correctly as some error...
research
11/09/2021

Stateful Dynamic Partial Order Reduction for Model Checking Event-Driven Applications that Do Not Terminate

Event-driven architectures are broadly used for systems that must respon...
research
03/28/2018

Towards Efficient Data-flow Test Data Generation

Data-flow testing (DFT) checks the correctness of variable definitions b...
research
09/06/2021

Finding Counterexamples of Temporal Logic properties in Software Implementations via Greybox Fuzzing

Software model checking is a verification technique which is widely used...

Please sign up or login with your details

Forgot password? Click here to reset