tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

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>

olivier · il y a 1 mois · 0c70879e0ca7bb1b30b54230c30cd1aa41726fc3

Parents 44bdbbf

8 fichiers modifiés, 157 ajouts, 20 suppressions