Linearizability Testing
Linearizability asks whether concurrent operations admit a legal sequential explanation that respects real time. A history checker searches for that explanation and can identify a finite counterexample.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 1 min
In this article3 chapters
Real time restricts the candidate serializations
An operation occupies the interval from invocation \(i_A\) to response \(r_A\). Two operations that do not overlap obey the order
\[ r_A<i_B \quad\Longrightarrow\quad A<_H B. \]
Any linearization must extend this partial order and produce the observed results under the sequential specification. Overlapping operations may be ordered either way if the object’s semantics permits it. Pending operations require a specified completion rule before judging an incomplete history.
A linearization point relates an implementation step to an effect in the sequential model. Differential testing provides a complementary comparison with a reference on selected executions.
The same read result can be legal or illegal
Take a register initially zero. If a write of one completes before a read starts, a subsequent zero result is impossible without another intervening write. If those operations overlap, a zero read may linearize before the write and is legal. The timestamps alone do not answer the question. They determine the order constraints, while the register transition system determines whether the recorded outputs are possible.
Searching efficiently still needs a good history
A checker can choose a ready operation, apply it to the model state, compare its result and backtrack on failure. Memoizing repeated combinations of remaining operations and model state avoids repeated work. Independent keys can be checked separately only when the specification supports decomposition. Fault-injection testing such as Jepsen-style experiments can generate diverse histories, but passing finite tests is evidence about those histories rather than a universal protocol proof. Compare distributed consensus, transaction isolation, and specifications in concurrent separation logic.[1][2]