
louise
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#1203 · main · 9 min 56 s
1Étoiles
0Forks
0Issues
Core: the optimiser checked against unoptimised runs (issue #219)
Both back ends run the optimised Core (ADR 0043), so the interpreter oracles the native backend, not the optimiser: a miscompilation shows the same in both, and only a `//>` expectation that prints the difference catches it — one that may itself have been copied from the optimised output. - `opt::Optimise` and `opt::run_with` take the choice as a value; `run_in` keeps reading `LOUISE_NO_OPT`. `Optimise::No` skips what the variable skips (evidence, the rounds, CPR) and still runs TRMC. `louise_codegen_c::generate_with` passes it through; `generate`, `generate_entries` and `generate_units` keep their signatures. (A test cannot set the variable: `set_var` is unsafe in edition 2024, and the other tests of the binary read it.) - Every `tests/run` program also runs unoptimised: in the interpreter with the unit tests, and natively in an ignored test that ci.sh runs. - The benchmarks, whose checksums predate the optimiser and which no CI step ran, are built natively optimised and unoptimised (an ignored test; ci.sh runs it, about 5 minutes). - ADR 0043 gains a note (Proposed) on what checks the optimiser, and what doesn't: a step-of-2 bug planted in the `fold ∘ range` loop was caught by tests/run alone, since no rewrite rule fires in any benchmark. Generated programs are left for later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents 44bdbbf
8 fichiers modifiés, 157 ajouts, 20 suppressions
crates/louise_codegen_c/src/lib.rs+40−2crates/louise_codegen_c/tests/native.rs+41−7crates/louise_core/src/opt/mod.rs+32−2crates/louise_interp/tests/run.rs+17−6crates/louise_testkit/src/lib.rs+7−2docs/adr/0043-a-core-optimiser.md+10−0scripts/ci.sh+9−0tests/bench/README.md+1−1