SMT x86_64 TSO model checking and minimum fence synthesis
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-06 06:00:09 +00:00
cases feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00
media fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
smt feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00
src fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
test fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
.gitattributes fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
.gitignore feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00
dune-project feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00
Makefile fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
README.md fix(cli): reject invalid delays and surplus inputs 2026-11-06 06:00:09 +00:00
reorder.opam feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00
toolchain.json feat(core): initialise tso checking and fence synthesis 2026-10-16 14:37:18 +01:00

Reorder synthesises minimum fence placements for programs with two threads under a finite x86-TSO model, using SMT queries to find counterexamples and an independent OCaml interpreter to replay each execution before adding its fence constraint.

A replayed Peterson execution yields fence constraints whose minimum solution excludes every overlapping critical section

On the Peterson fixture it places mfence before each flag load and closes the complete graph of 365 reachable states without overlapping critical sections, while a separate SMT query excludes every cheaper placement among the declared candidate locations.

Example

dune exec reorder -- repair cases/peterson.sexp --out build/repair
dune exec reorder -- contrast build/repair/witness.sexp build/repair/repair.sexp --animate
dune exec reorder -- graph cases/peterson.sexp build/repair/repair.sexp --animate