19d0ff7366
Added 3 new TLA+ specs: - gossip.tla — SWIM gossip membership & failure detection - deadlock.tla — wait-for graph deadlock detection - sharding.tla — consistent hashing shard assignment Improved existing 4 specs: - raft.tla: added CommittedIndexValid invariant - twopc.tla: added CoordinatorConsistency, NoDecideWithoutConsensus, ParticipantStateValid; increased to MaxTxnId=3 - mvcc.tla: added CommittedMustStart, CommittedVersionsUnique - replication.tla: added AppliedLteCurrent, SemiSyncQuorum Infrastructure: - VERSION file (1.0.0) - CHANGELOG.md - ANALYSIS.md (weak spots & improvement plan) - run_all.sh script for batch TLC verification - CI verify job in GitHub Actions - Updated README with new specs and properties Total: 7 specs, 26 invariants, 11.6M states checked, 0 errors
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# BaraDB Formal Verification Suite — Run All TLC Model Checks
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
JAR="$SCRIPT_DIR/tla2tools.jar"
|
|
|
|
if [ ! -f "$JAR" ]; then
|
|
echo "ERROR: tla2tools.jar not found at $JAR"
|
|
echo "Download from https://github.com/tlaplus/tlaplus/releases"
|
|
exit 1
|
|
fi
|
|
|
|
run_tlc() {
|
|
local spec="$1"
|
|
local cfg="$2"
|
|
echo "=============================================="
|
|
echo " TLC: $spec (cfg: $cfg)"
|
|
echo "=============================================="
|
|
java -cp "$JAR" tlc2.TLC -config "$cfg" "$spec" 2>&1 | tail -5
|
|
echo ""
|
|
}
|
|
|
|
echo "=============================================="
|
|
echo " BaraDB Formal Verification Suite v1.0.0"
|
|
echo " Running TLC model checker on all specs"
|
|
echo "=============================================="
|
|
echo ""
|
|
|
|
run_tlc "$SCRIPT_DIR/raft.tla" "$SCRIPT_DIR/models/raft.cfg"
|
|
run_tlc "$SCRIPT_DIR/twopc.tla" "$SCRIPT_DIR/models/twopc.cfg"
|
|
run_tlc "$SCRIPT_DIR/mvcc.tla" "$SCRIPT_DIR/models/mvcc.cfg"
|
|
run_tlc "$SCRIPT_DIR/replication.tla" "$SCRIPT_DIR/models/replication.cfg"
|
|
run_tlc "$SCRIPT_DIR/gossip.tla" "$SCRIPT_DIR/models/gossip.cfg"
|
|
run_tlc "$SCRIPT_DIR/deadlock.tla" "$SCRIPT_DIR/models/deadlock.cfg"
|
|
run_tlc "$SCRIPT_DIR/sharding.tla" "$SCRIPT_DIR/models/sharding.cfg"
|
|
|
|
echo "All verification runs completed."
|