- ../
- gen/
- site/
- worlds/
- .gitignore22 B
- README.md1.7 KB
- RaftTrace.tla4.5 KB
- deploy.json482 B
- explore.sh2.2 KB
- package.nix1.0 KB
- raft.nib21.7 KB
- tla.json1.2 KB
raft-nib
Raft leader election and log replication in nib: three nodes, each a fibre on
the simulated network, checked against a safety monitor by nib-tla.
| file | what it is |
|---|---|
raft.nib | the program; wires Main (Raft as stated), Mutant, Careless and Forgetful (each a known-wrong variant) |
RaftTrace.tla | the monitor: ElectionSafety, LogMatching, LeaderCompleteness, StateMachineSafety, Durability |
tla.json, worlds/ | what nib-tla verify areas/examples/raft-nib checks, in CI (repo:quint) |
explore.sh | runs a wire under many seeded worlds and keeps every refused run with the world file that reproduces it |
site/ | the public explainer at https://raft.app.jahfer.link (deploy name raft), served by nib-site's static server (package.nix) |
gen/ | build.py writes site/index.html from real runs: the two drawn runs, every refused sweep seed re-run, the verify table, code cut from the sources; check_site.py is the package's check |
The site is authoring-time output, committed. After a change to the program or
the monitor, rebuild it (needs nibc and nib-tla built, the grammar's
node_modules, and a checker as nib-tla finds one):
python3 areas/examples/raft-nib/gen/build.py # runs verify itself (~2 min)
python3 areas/examples/raft-nib/gen/build.py --verify-log verify.log
build.py refuses to write a page whose runs do not say what the page says:
the drawn correct run must be admitted, the drawn forgetful run refused at the
save the page explains, and every refused sweep seed refused again at the
entry verify reported.
Why it exists, what it showed, and what is still open: specs/nib-raft/INTENT.md.