RELINCHE: Automatically Checking Linearizability under Relaxed Memory Consistency
Concurrent libraries implement standard data structures, such as stacks and queues, in a thread-safe manner, typically providing an atomic interface to the data structure. They serve as building blocks for concurrent programs, and incorporate advanced synchronization mechanisms to achieve good performance.
In this paper, we are concerned with the problem of verifying correctness of such libraries under weak memory consistency in a fully automated fashion. To this end, we develop a model checker, RELINCHE, that verifies atomicity and functional correctness of a concurrent library implementation in any client program that invokes the library methods up to some bounded number of times. Our tool establishes refinement between the concurrent library implementation and its atomic specification in a fully parallel client, which it then strengthens to capture all possible other more constrained clients of the library.
RELINCHE scales sufficiently to verify correctness of standard concurrent library benchmarks for all client programs with up to 9 library method invocations, and finds minimal counterexamples with 4–7 method calls of non-trivial linearizability bugs due to weak memory consistency.