Skip to content

Quod 0.1.8

Choose a tag to compare

@github-actions github-actions released this 05 Nov 13:02
· 77 commits to main since this release

Quod 0.1.8: earlier versions could get a false "unsat" from z3, rarely. Please update.

Install

As for 0.1.0: download the package for
your system, unpack it, and run quod from that folder (z3 4.12.1 is inside). On macOS, run
xattr -d com.apple.quarantine quod z3 in the folder first. The MCP server:
claude mcp add quod -- /path/to/quod mcp, or see
docs/mcp.md. Quod.Build, attached, is a NuGet package:
see its README.

Fixed

  • A false "unsat" after a check stopped by its time limit. A proof rests on "unsat". On the six transpose files of the held-out tasks, 0.1.7 refused about 1 build in 300 for a reason
    that is false ("the requires allows a single length"), because z3 answered "unsat" to a satisfiable question, in 1 to 2 s, a few checks after a check stopped by its time limit. A fresh z3 does not repeat that answer. quod now replaces z3 after every check that times out.
    • What this means for earlier versions: we saw only false refusals, never a false proof. But a proof takes the same answer from the same solver, so a false proof is possible in principle after such a stop. We tested 0.1.7 only; the code is older, so earlier versions are probably concerned.
    • How sure we are of the cause: the dialogue with z3 was traced, and its answers are in order. The explanation by a solver left in a bad state fits, and the fix removes the symptom, but we did not isolate it inside z3. A contradiction in the generated axioms, reached only in that state, is not excluded.
  • The fix of the hang in 0.1.7 is better placed. The partial model of a check that timed out is no longer read at all. The limit of 5 s stays for the other "unknown" answers, and the read now keeps to the z3 it was started on: it could move on to the next one.
  • An input or output error with z3 is reported as an internal error (exit code 3).

Measured

All on the six transpose files, 3 builds at a time. There is no automated test of this: it depends on timing.

Builds False refusals Internal errors Hangs
0.1.7, as released 1000 3 1 0
0.1.8 1500 0 0 0

The internal error of 0.1.7 listed as unexplained did not come back either, which does not explain it.

  • 176 compiler tests pass.
  • Mutant bench: 57 of 64 mutants refuted, none unconfirmed or without a hint, the 7 survivors equivalent, none hung;
    quantified.quod 28 of 29. No verdict changed from 0.1.7.
  • The measure of the held-out tasks, recomputed after a review found faults in it: no accepted contract is unsound, with a larger pool of wrong results, and the measure still could not separate the arms. The check did refuse one contract that is really unsound.

Known

  • With no model to read after a timeout, a contract that z3 could have shown underspecified may end as "completeness not decided", a warning, unless another search finds the witness. A slow contract is thus treated more gently than a fast one.
  • If quod itself is killed while z3 is busy, z3 can stay behind until it finishes.