-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudit_universe.py
More file actions
74 lines (62 loc) · 2.69 KB
/
Copy pathaudit_universe.py
File metadata and controls
74 lines (62 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
"""
audit_universe.py
Master audit runner for the A=1 discrete causal lattice framework.
Runs all experiments in sequence and reports pass/fail status.
A row in the audit table (audit_table.tex) should only be marked
PASS when the corresponding experiment passes here.
Usage:
python audit_universe.py # run all experiments
python audit_universe.py --list # list experiments without running
"""
import sys
import traceback
EXPERIMENTS = [
("exp_00", "src.experiments.exp_00_causal_cone", "run_causal_cone_audit"),
("exp_01", "src.experiments.exp_01_inertia", "run_inertia_audit"),
("exp_02", "src.experiments.exp_02_gravity_clock_density","run_gravity_clock_density_audit"),
("exp_03", "src.experiments.exp_03_interference", "run_interference_audit"),
("exp_04", "src.experiments.exp_04_decoherence", "run_decoherence_audit"),
("exp_05", "src.experiments.exp_05_observer_clock", "run_observer_clock_audit"),
("exp_06", "src.experiments.exp_06_path_counting", "run_path_counting_audit"),
("exp_07", "src.experiments.exp_07_clock_conservation", "run_clock_conservation_audit"),
("exp_08", "src.experiments.exp_08_vacuum_twist", "run_vacuum_twist_audit"),
("exp_09", "src.experiments.exp_09_harmonics", "run_harmonics_audit"),
("exp_10", "src.experiments.exp_10_hydrogen_spectrum", "run_hydrogen_spectrum_audit"),
]
def run_all():
results = []
print("=" * 60)
print("A=1 DISCRETE CAUSAL LATTICE -- UNIVERSE AUDIT")
print("=" * 60)
for exp_id, module_path, function_name in EXPERIMENTS:
print(f"\n[{exp_id}] {function_name}")
try:
import importlib
module = importlib.import_module(module_path)
func = getattr(module, function_name)
func()
results.append((exp_id, "PASS"))
print(f" --> PASS")
except NotImplementedError:
results.append((exp_id, "STUB"))
print(f" --> STUB (not yet implemented)")
except Exception as e:
results.append((exp_id, "FAIL"))
print(f" --> FAIL: {e}")
traceback.print_exc()
print("\n" + "=" * 60)
print("AUDIT SUMMARY")
print("=" * 60)
for exp_id, status in results:
print(f" {exp_id} {status}")
passed = sum(1 for _, s in results if s == "PASS")
total = len(results)
print(f"\n{passed}/{total} experiments passing.")
return passed == total
if __name__ == "__main__":
if "--list" in sys.argv:
for exp_id, _, fn in EXPERIMENTS:
print(f" {exp_id} {fn}")
else:
success = run_all()
sys.exit(0 if success else 1)