Skip to content

Quod 0.4.1

Choose a tag to compare

@github-actions github-actions released this 10 Nov 13:25
· 38 commits to main since this release

Quod 0.4.1: fixes from the review of 0.4.0. The Euclidean division in C# no longer throws where its result fits a long; a constant beyond long is refused by Quod; the limits depend less on the load of the machine, and a budget that runs out reports "not attempted", never a failed proof.

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

  • C#: / and % on int no longer throw when the result fits a long. _quod_mod(-1, long.MinValue), _quod_div(long.MinValue, 3) and _quod_div(-7, long.MinValue) raised OverflowException (an intermediate overflowed). They now use the form that does not overflow, as i32 and i64 already did; only long.MinValue / -1 throws. No wrong value was ever returned: 2009 edge cases of the review gave none.
  • C#: a constant beyond long is refused by Quod (not built: the literal 9223372036854775808 does not fit a long ...). It already failed to compile, with ulong messages of the C# compiler that did not name Quod.
  • A budget that runs out never gives a failed proof. When --budget (60 s by default through MCP) cut the limit of an obligation and the solver did not answer, the obligation was reported as not proved, a result that depended on the load. It is now counted as not attempted, and the diagnostic says the budget was used up. The wall-clock limit that follows the budget is exactly what is left of it.
  • The wall-clock limit of an obligation is 16 times its limit in solver operations, not 4 (review of 0.4.0, H3). On 2 cores, 9 of 14 builds of a published solution failed when run at once with 0.4.0. It is there only against a check that never ends. With 0.4.1, 40 builds at once of that solution on a 16-core machine all verified. With --budget 60, 20 builds at once gave the same answer each time: 117 obligations proved and 31 reported not attempted because the budget was used up, none as a failed proof.
  • The comment of the C# overload for int lists no longer says that the list is not copied.
  • The release notes of 0.4.0 said a verdict "no longer depends on the load"; it depends much less. Fixed in the repository, not on the page of that release.
  • The dead code that still emitted BigInteger fields is removed.
  • Reserves on the times of T9 and T10, and a note on T11 (its counts of BigInteger describe 0.3.2). The design note of the C# backend now describes long in checked.

Known

Those of 0.4.0.

  • The verdict can still depend on the load if a check meets the budget (--budget), which is wall time by nature: the obligations it cuts are reported not attempted, but which ones depends on the speed of the machine. The wall-clock limit of 16 times is not removed, only widened.
  • Names that compile in Quod and not in C#, each refused by the C# compiler, never silently wrong: a root type named like a module (Option and option.Option<int>), a module named system (its class hides the System namespace), an enum case named Match (it meets the helper method).
  • copy.deepcopy and pickle of Quod data in Python raise TypeError.
  • Not run: macOS and Linux binaries (built by CI only).