MoRDor
A weak memory explorer for C-like programs
MoRDor is a weak memory explorer for C-like programs, with a CLI and a web UI. Given a concurrent program as a litmus test, it computes the program’s justified executions: the ways its reads and writes can resolve under relaxed memory, each backed by justifications of what every write depends on. A memory model then decides which executions are coherent. Because every execution carries the justifications it was built from, MoRDor shows not only which outcomes a model allows but why.
MoRDor checks executions against more than forty memory models, from sMRD, RC11 and SC to OCaml and the promising semantics, and compares models execution by execution. It also decides episodicity of unbounded loops and finds use-after-free.
MoRDor also runs in the browser, with nothing to install: the MoRDor playground is the web UI with MoRDor and its SMT solver, Z3, compiled to run in the page itself, without a server. It gives the same answers as the native build, and the first visit downloads about 5 MB.
The same analysis runs from the command line:
It is a reference implementation of Symbolic Modular Relaxed Dependencies (sMRD), following “Symbolic MRD: Dynamic Memory, Undefined Behaviour, and Extrinsic Choice” by Jay Richards, Daniel Wright, Simon Cooksey, and Mark Batty (OOPSLA 2025).
Memory models
A litmus test names its model in the annotation of its assertion, for example
allow (r1 = 1) [RC11]; a test that names none runs under sMRD. Every model
but the promising semantics checks the executions sMRD derives, and every model
links to its entry in the Relaxed Memory Model Zoo.
The best known are listed below (tbl1).
| Model | Annotation | Description |
|---|---|---|
| sMRD | smrd |
Symbolic MRD (Richards et al., OOPSLA 2025), the default: dependencies, preserved program order, release/acquire synchronisation and lock order. |
| RC11 | rc11 |
Repaired C11 (Lahav et al., PLDI 2017). |
| C11, C++17, C++20 | c11, c17, c20 |
The C and C++ standards, out-of-thin-air executions included. |
| IMM | imm |
The Intermediate Memory Model (Podkopaev et al., POPL 2019). |
| SC | sc |
Sequential consistency. |
| x86-TSO | tso, x86-tso |
Total store order. |
| OCaml | ocaml |
The OCaml memory model (Dolan et al., PLDI 2018). |
| Promising 1.0, 2.0 | ps1, ps2 |
Promising semantics (Kang et al., POPL 2017; Lee et al., PLDI 2020), computed operationally from promises, certification and per-thread views. |
MoRDor also supports:
- C/C++ variants: RC17, RC11z, ORC11, RAR, CRC and the Ou–Demsky criterion OD-LSO.
- Dependency models: MRD, on programs that access only named globals.
- Java and the web: Java Access Modes, the Buffered Memory Model and WebAssembly.
- Data-race-free models: DRFx, DeNovoSync and Volatile-by-Default.
- Hardware and coherence: ClightTSO and cache coherence.
- The release-acquire family: RA, SRA and WRA.
- Distributed consistency: processor consistency, PRAM, causal, weak causal, per-object causal, slow and local consistency, and the session guarantees read-your-writes, monotonic reads, monotonic writes and writes-follow-reads.