Issue #2507: The prover’s loop strategies add k-induction and guesses from test runs (ADR-361 D5 items 3-4)

Open and answer this issue on GitHub.

ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Part of #640

What it is

ADR-361 D5 grows the prover’s portfolio of loop-invariant strategies one by one: closed forms, intervals and octagons, k-induction, guess and check, PDR. Closed forms and intervals are built (8bfd1a0a), the first octagons and an assert in a loop’s body as a candidate invariant too (0b34e8120). This part adds the two strategies still missing before PDR: k-induction (D5 item 3) and guess and check with candidates from test runs (D5 item 4). Each candidate is checked by the three queries of ADR-361 D4, and a claim none of them proves stays a check at run time.

To build

  1. k-induction (ADR-361 D5 item 3). Test: a .nika in tests/compiler/tests/ with a loop claim the built strategies leave open and k-induction proves, its .stdout showing it proved through the loop (the builder chooses the program).
  2. Guess and check with candidates from test runs (ADR-361 D5 item 4). Test: a .nika in tests/compiler/tests/ whose loop claim is proved by a candidate taken from a test run and checked by D4 (the builder chooses the program and how the run’s values reach the prover).

Done when

The prover’s portfolio tries k-induction and guess-and-check candidates from test runs after the built strategies, each candidate checked by the three queries of ADR-361 D4, and each test above shows a claim proved that only that strategy proves; the last commit carries Fixes for this issue and the report has a Found: line per finding.

Split from #640 by Claude Code

Back to Open Issues