Commit d3ba3e9
committed
audit P1 #9-14: BENCH hooks + per-regime table + bib + LaTeX + setup-rand expansion
All six remaining P1 issues from the pre-submission audit fixed.
#9 — BENCH_N/SEED hooks for dataset test.c (scripts/bench_hooks.py NEW)
Compile-time source patcher that adds env-var overrides for problem
size (N) and random seed without modifying on-disk files. Patches
`#define N <int>` to a file-scope `static int N;` initialized from
getenv("BENCH_N") at the top of main(), and rewrites srand(<int>) to
honor getenv("BENCH_SEED"). Self-tested + verified end-to-end on
SR-1 (N=100 / N=1M / SEED=99 all produce different timings).
Wired into faithfulness/equivalence.py as new function
differential_equivalence_on_variant(): compiles the variant's slow.c,
fast.c, test.c (patched), optional helper.c as separate TUs and runs
under each of the 9 default configs. Falls back to single-config
canonical-input when bench_hooks can't patch (variants without
#define N) or when the multi-TU compile fails (function-rename edge
cases on patterns with multiple top-level functions).
evaluator.py dataset path now uses this, populating real
9-config differential equivalence into the 2x2 cell. Smoke-tested
on HR-2 (9/9 ✓ FAITHFUL), HO-CF-4 (9/9 ✓ FAITHFUL_ALTERNATIVE),
MI-4 (1/1 fallback ✓ FAITHFUL).
The abstract no longer claims this is a "documented limitation" —
it now describes the actual working implementation + fallback path.
#10 — Per-regime resistance table
docs/results.tex now has a per-regime breakdown:
-O0: 124/1244 non-resistant (10.0%) — expected
-O2: 0/1244 (0.0%)
-O3: 0/1244 (0.0%) ← headline
-O3 -ffast-math: 20/1244 (1.6%) — HO-DS-5/6, HR-2, SR-3
-O3 -flto: 18/1244 (1.4%) — HO-SR-1, SR-1, MI-2, HO-CF-2
ALL-5 regimes: 1096/1244 (88.1%)
Plus per-pattern attribution for the non-zero columns.
#11 — Setup-randomization expansion
Ran the protocol on 12 more patterns (SR-2/3, IS-1/3, CF-4, HR-3,
DS-1/2, MI-1/3, AL-1/2), bringing coverage from 6 to 18 of 27
base patterns. All 18 pass the lower-CI>1.0 gate. Median speedups
range from 1.5x (IS-1) to 11,901x (SR-3); CI widths from 1.1%
(AL-2, algorithmically dominated) to 102% (IS-3, microarch
sensitive). docs/results.tex updated with full 18-pattern table.
#12 — Bibliography consolidation
Stripped the duplicate \begin{thebibliography} block from
docs/implementation.tex (77 lines removed) — only docs/related_work.tex
now defines bib entries. Added 8 missing entries to related_work.tex
(livebench2024, swebenchlive2025, lbpp2024, swisstables, datasheets,
livecodebench2024, cormode2005cms, reparaz2017dudect). Fixed
introduction.tex to use existing keys (chen2021codex, austin2021mbpp)
instead of undefined aliases. Final audit: 42 cite keys, 42 defined,
0 missing, 0 duplicates, 0 unused.
#13 — LaTeX compile check
Installed tectonic (sudo-free alternative to mactex). Compiled
docs/paper.tex end-to-end into a 14-page, 147 KB PDF. Some
underfull/overfull hbox warnings on the wide tables (acceptable —
will tighten for final camera-ready); no errors, no undefined refs
or cites. .gitignore updated to exclude .aux/.log/.out
intermediates; paper.pdf committed.
#14 — Fine-tune jsonl regeneration
Re-ran fine_tune/prepare_finetune_data.py against the current
active dataset. Train + val totals unchanged (1872 + 208 = 2080)
but the underlying examples now reflect the 1244-variant active
set rather than the prior 1140 + held-out=36 split.
Verification:
- tectonic docs/paper.tex: PASS (14 pages, 147 KB, no errors)
- compileall pdob_core faithfulness scripts: PASS
- bench_hooks self-test: PASS
- bench_hooks on SR-1: PASS (N=100/1M and SEED variation observed)
- differential_equivalence_on_variant: 3/4 oracle tests pass
(HR-2, HO-CF-4, MI-4); SR-1 hits a multi-function-rename edge
case → falls back to canonical-input correctness, documented
- Bibliography: 42/42 keys defined, 0 missing, 0 dupes
- All 18 setup-randomization sweeps: gate PASS1 parent b7f4a28 commit d3ba3e9
23 files changed
Lines changed: 608 additions & 110 deletions
File tree
- docs
- faithfulness
- pdob_core
- scripts
- setup_randomization_results
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
147 | 171 | | |
0 commit comments