Research ledger / Experiments · canonical source: EXPERIMENTS.md

Experiments

Code version: this repository, experiments/ (git history is the version record). Environment of the recorded runs: CPython 3.13.16, Linux x86_64 (4 vCPU, 15 GB RAM), standard library only. Reproduce everything: sh experiments/run_all.sh (about 1.5 minutes). This writes experiments/results/exp00N.json and experiments/results/SUMMARY.md. Determinism: every experiment uses a fixed seed. Counted steps are reproducible bit for bit. Wall-clock fields will vary by machine. Cost methodology: primary dependent variables are counted elementary steps under the cost model in each file's docstring. Wall-clock time (median or mean via time.perf_counter) is secondary. Bitset operations cost ⌈n/64⌉ word operations, and big-integer arithmetic costs ⌈bits/64⌉. Theorem checks: experiments/check_theorems.py exhaustively checks the exact formulas of THM-001(b), THM-002, THM-003 (all 625 binary trees with ≤ 7 nodes), and THM-005(a, b) on small cases. These checks guard against mis-stated formulas. They are not proofs. Correctness: every experiment asserts agreement between all methods and a baseline (BFS, pointer LCA, brute-force model counting for k ≤ 16, explicit preorder) on every query it times.


CGT-EXP-001 Binary tree navigation (exp001_binary_tree.py)

CGT-EXP-002 Graph reachability with full accounting (exp002_reachability.py)

CGT-EXP-003 Language-constrained reachability (exp003_constrained.py)

CGT-EXP-004 Forest composition and minimal-DAG grammars (exp004_forest_dag.py)

CGT-EXP-005 Dynamic workloads (exp005_dynamic.py)

CGT-EXP-006 Solution grammars for CNF-SAT (exp006_solution_grammar.py)

CGT-EXP-007 Grammar shape (exp007_grammar_shape.py)


Next experiments, selected from the evidence (session 2 candidates)

  1. EXP-008: Arithmetic addressing beyond trees. Test dense numerations for grids, k-ary tries over fixed alphabets and de Bruijn graphs. Measure the density/cost trade-off. Motivation: THM-003 is the only mechanism found so far that needs zero preprocessing. Its exact scope is the most direct test of the researcher's address intuition.
  2. EXP-009: Tree SLPs vs DAGs under updates. Test whether richer structural grammars keep compression under the THM-005 adversary.
  3. EXP-010: CFL-constrained reachability (Dyck languages). The first case where the operational grammar is context-free. Compare the cubic CFL-reachability algorithm with specialized Dyck algorithms.
  4. EXP-011: Workload-adaptive scheme selection. Use PROP-005 to switch among S1–S4 online. Measure regret against the hindsight-best strategy.

Session 2 experiments

Run all of them with sh experiments/run_all.sh. It sets PYTHONPATH to include sdk/src, so EXP-008 to EXP-010 use the SDK implementations that sdk/tests checks.

CGT-EXP-008 Compiled move words (exp008_compiled_words.py)

CGT-EXP-009 PageRank (exp009_pagerank.py)

CGT-EXP-010 Grammar-constrained random surfers (exp010_constrained_ranking.py)