Formal: partitii de retea si view-change x certificat PQ dovedite la N=9, cu controale negative
partition_safety_smt.py (N=9 f=2 q=6): split-brain imposibil, starvatie clasificata, vindecare fara fork. anchor_viewchange_smt.py: o schimbare de runda pe ancora nu da doua certificate valide diferite, si unicitatea vine din legarea de bloc, nu din K=3 sigilii (< cvorum). Rulatorul cablat: 35 modele, 282 PROVED + 149 CEX, 0 FAILED.
This commit is contained in:
1 parent
0164207076
commit
a2f4d835a3
4 files changed
+656
-5
No files matched your search
@@ -20,7 +20,7 @@
|
||||
# (The quint/Apalache spec FalconQuorum.qnt is an OPTIONAL secondary cross-check;
|
||||
# see CONSENSUS-VERIFICATION-2026-07-12.md for the `quint run` commands.)
|
||||
# -----------------------------------------------------------------------------
|
||||
import subprocess, sys, os, re
|
||||
import subprocess, sys, os, re, time
|
||||
|
||||
# --- QBFT / Falcon consensus models (unchanged) ---
|
||||
CONSENSUS_MODELS = [
|
||||
@@ -33,6 +33,11 @@ CONSENSUS_MODELS = [
|
||||
("QBFT explicit-Prepare counting (2026-07-14 2nd-client bug+fix)", "qbft_prepare_counting_smt.py"),
|
||||
("QBFT digest-keyed vote tally (2026-07-14 Finding-A shipped fix)", "qbft_digest_keyed_smt.py"),
|
||||
("QBFT IBFT 2.0 locking, engine-role model (2026-07-14 Findings D/E)", "qbft_locking_smt.py"),
|
||||
("QBFT NETWORK-PARTITION safety/liveness (N=9 parametric: split-brain, starvation, heal)", "partition_safety_smt.py"),
|
||||
("Anchor x VIEW-CHANGE (no round change yields two valid PQ certificates, N=9)", "anchor_viewchange_smt.py"),
|
||||
("PqAnchor CEILING monotonicity (minSealsCeiling only lowers K; K_eff <= maxSeals)", "pqanchor_ceiling_monotonicity_smt.py"),
|
||||
("PQ anchor REGISTRY index binding (loader and seal rule read ONE mapping)", "registry_index_binding_smt.py"),
|
||||
("PQ anchor REGISTRY rotation coverage (every anchor height has exactly one registry)", "registry_rotation_coverage_smt.py"),
|
||||
]
|
||||
|
||||
# --- CONTRACT SMT models: fund-flow + registry + PQC-verifier invariants (wired in
|
||||
@@ -97,12 +102,15 @@ here = os.path.dirname(os.path.abspath(__file__))
|
||||
overall = True
|
||||
summary = []
|
||||
totals = {"PROVED": 0, "CEX-FOUND": 0, "FAILED": 0}
|
||||
suite_start = time.time()
|
||||
for label, fname in MODELS:
|
||||
path = os.path.join(here, fname)
|
||||
print("=" * 78)
|
||||
print(f"### {label} [{fname}]")
|
||||
print("=" * 78)
|
||||
t0 = time.time()
|
||||
r = subprocess.run([sys.executable, path], capture_output=True, text=True)
|
||||
dt = time.time() - t0
|
||||
sys.stdout.write(r.stdout)
|
||||
if r.stderr:
|
||||
sys.stderr.write(r.stderr)
|
||||
@@ -112,20 +120,25 @@ for label, fname in MODELS:
|
||||
totals[m.group(1)] += 1
|
||||
ok = (r.returncode == 0)
|
||||
overall = overall and ok
|
||||
summary.append((label, fname, ok))
|
||||
summary.append((label, fname, ok, dt))
|
||||
print(f" [{dt:6.2f}s] {'PASS' if ok else 'FAIL'} {fname}")
|
||||
print()
|
||||
suite_elapsed = time.time() - suite_start
|
||||
|
||||
print("#" * 78)
|
||||
print("### AERE FORMAL-VERIFICATION SUITE -- OVERALL (consensus + contract + application models)")
|
||||
print("#" * 78)
|
||||
for label, fname, ok in summary:
|
||||
print(f" {'PASS' if ok else 'FAIL'} {label:66} ({fname})")
|
||||
for label, fname, ok, dt in summary:
|
||||
print(f" {'PASS' if ok else 'FAIL'} [{dt:6.2f}s] {label:66} ({fname})")
|
||||
print()
|
||||
print(f" models run: {len(MODELS)} passed: {sum(1 for _,_,ok in summary if ok)}"
|
||||
print(f" models run: {len(MODELS)} passed: {sum(1 for _,_,ok,_ in summary if ok)}"
|
||||
f" ({len(CONSENSUS_MODELS)} consensus + {len(CONTRACT_MODELS)} contract"
|
||||
f" + {len(APPLICATION_MODELS)} application)")
|
||||
print(f" verdict lines: {totals['PROVED']} PROVED {totals['CEX-FOUND']} CEX-FOUND "
|
||||
f"{totals['FAILED']} FAILED")
|
||||
print(f" wall time: {suite_elapsed:6.2f}s total"
|
||||
+ (f" (slowest: {max(summary, key=lambda x: x[3])[1]} at "
|
||||
f"{max(s[3] for s in summary):.2f}s)" if summary else ""))
|
||||
print(f" coverage: {len(_wired & _present)} of {len(_present)} *_smt.py files in this"
|
||||
f" directory are wired into this run"
|
||||
+ (f" ({len(_INTENTIONALLY_UNWIRED)} intentionally unwired)"
|
||||
|
||||
Reference in new issue
Block a user