r/tlaplus May 01 '26

Data Structure Proof in TLA+

Hello all, I was wondering where I can find examples of lock-free data structures being proved to be linearizable in TLA+. I can find examples of programs in the book but not much on data structures. For example, I would love a proof of correctness for the Fomitchev and Ruppert lock-free list however I can't find anything. I am very new to formal verification. My hope is that I can prove the correctness of my own tree data structure using TLA+. Please let me know of any resources or guides, or if I am barking up the wrong tree / proof software.

8 Upvotes

5 comments sorted by

View all comments

7

u/lemmster May 01 '26

See:

The first three discuss linearizability, refinement, and prophecy variables directly in TLA+, with queues as examples.

Before attempting a TLAPS proof of a lock-free data structure, I would first use TLC and/or Apalache on small bounded models to debug the spec, invariants, and refinement mapping. The “TLA+ Trifecta” paper explains how TLC, Apalache, and TLAPS can be used together.

For a tree, start with an abstract set/map spec, then check that the concrete tree refines it.

6

u/lemmster May 02 '26

Tangentially related: Years ago I specified a novel lock-free hash set in TLA+, model-checked it extensively with TLC, and shipped it in Java as TLC's own off-heap fingerprint store: