by benjaminogles · 1w ago · 0 comments
I've always been curious whether there was a way to specify the behavior of a concurrent data structure in something like an LTL to prove it correct without having to implement a reference implementation or write an invariant checker. Although I guess the spec itself plays the role of a reference implementation if it is that sophisticated.
For non-concurrent code, the [state machine tests](https://github.com/nwtnni/arctic/blob/efad26c696f28cfdbeec11...) comparing arctic against std::collections::BTreeMap was invaluable for finding edge cases.
> I've always been curious whether there was a way to specify the behavior of a concurrent data structure in something like an LTL to prove it correct without having to implement a reference implementation or write an invariant checker.
I've toyed with [Alloy](https://alloytools.org/) to verify a small piece of lock-free code in the past, but am no expert. I think verification of lock-free data structures (esp. under weak memory models) is an area of active research.