consistency_model 0.0.0

A tester for distributed system consistency properties like linearizability and sequential consistency.
Documentation
  • Coverage
  • 65.52%
    19 out of 29 items documented0 out of 4 items with examples
  • Size
  • Source code size: 51.19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.64 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jonnadal/fibril
    6 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jonnadal

This library provides code to define and verify the correctness of an object or system based on how it responds to a collection of potentially concurrent (i.e. partially ordered) operations.

Defining Correctness Via A Reference Implementation

[SequentialSpec] is a trait for defining correctness via a "reference implementation" (e.g. "this system should behave like a queue"). This library includes reusable implementations such as [Register] for register-like semantics and for the standard library's [Vec] for stack-like semantics. Implementing the trait yourself is also straightforward -- just define two enums for invocations and returns. Then associate these (as [SequentialSpec::Op] and [SequentialSpec::Ret] respectively) with a state type that implements [SequentialSpec::invoke].

Verifying Concurrent System Implementations

A concurrent system can be verified against an implementation of the [SequentialSpec] trait by using a [ConsistencyTester] for an expected consistency model, such as [LinearizabilityTester]. In that case, operations are sequential (think blocking I/O) with respect to an abstract thread-like caller, which is identified by a distinct "thread ID" (sometimes called a "process ID" in the literature, but these are assumed to be single-threaded, so thread ID arguably provides better intuition for most developers).

Additional Reading

For more background on specifying the semantics of concurrent systems, see publications such as: