ReferenceTools
Stress, shrinking and laws
The normative description of each tool.
Normative text from spec/tools/stress.md.
Status: draft for 0.3.0. The library side is lib/random-stress.md.
cpl stress d builds the checked program, finds every @alt, @gen,
@check and @interactor, and runs rounds:
- Generate an input from
@genor from the program's reads. - Run the program and each applicable alt (whole-program alts compare output; inner alts are substituted at call sites and compared there).
- Apply the relation and unary checkers; sample laws of operation
values the run built; for
@cachefields, rerun with caches cold and compare. - On failure, shrink the recorded
genchoices to a minimal input that still fails, then report it, each implementation's output, the first differing line, and the first part whose alt disagrees, with values in the file's base. Save it tod.tests/stress-<seed>.in.
Options: --time, --threads, --seed, --max-size, --laws=off.
Runs are deterministic per seed and parallel across threads. cpl locate is stress plus part-level bisection on a given failing input.