The engines had no tests of their own in the course repository; this
repository now owns them, so a change to solver.js or vcgen.js needs
something to answer to besides the end-to-end tests.
tests/engine-solver.test.mjs holds:
- a table of goals the solver must prove (transitivity, integer
tightening, case splits, congruence on positions, DIV and MOD by a
constant, lengths at least 0) and goals it must leave unknown (a false
step, FLOAT tightening, products of unknowns, rounded FLOAT addition,
different positions); one known gap, 2X == 1 not seen as impossible, is
recorded so an improvement shows up;
- 400 random linear integer formulas with DIV, MOD, if-then-else and
boolean structure; every one the solver proves is checked against all
729 assignments of X, Y, Z in [-4, 4];
- programs whose obligations must come out proved or not: a counting loop
with its invariant, an index one past the end, a division that needs a
REQUIRE, FILL and RANDINT arguments, and the int-model note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FgvbRdoEheAHqsRmr2WuKZ