Files
Baradb/formal-verification/run_all.sh
T
dimgigov 54711d0190 FV-1, FV-13: Raft prevLogIndex/prevLogTerm + CI fix
- raft.tla: Add HasCompatiblePrefix check (prevLogIndex/prevLogTerm)
- raft.tla: Add RejectAppendEntries action for follower rejection
- raft.tla: Add conflict truncation + commitIndex/matchIndex adjustment
- raft.tla: Restore LogMatching invariant
- raft.tla: Guard AppendEntry to prevent term gaps in leader log
- models/raft.cfg: Add LogMatching to checked invariants
- .github/workflows/ci.yml: Replace container with setup-java + cache
- run_all.sh: Use -workers auto and -XX:+UseParallelGC
- Update PLAN.md, PLAN_DONE.md, ANALYSIS.md, README.md
2026-05-07 19:21:01 +03:00

39 lines
1.4 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 -XX:+UseParallelGC -cp "$JAR" tlc2.TLC -workers auto -config "$cfg" "$spec" 2>&1 | tail -5
echo ""
}
echo "=============================================="
echo " BaraDB Formal Verification Suite v1.1.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."