| Solver | How to use | Strengths | Limits |
|---|---|---|---|
| Default (SMTInterpol, then Z3) | vary prove | Starts with the bundled SMTInterpol. What it leaves open is run again on Z3, and the report names the solver that answered | Same as SMTInterpol when Z3 cannot be loaded |
| SMTInterpol | vary prove --solver smtinterpol | Bundled and pure Java. Decides linear integer arithmetic, arrays, uninterpreted functions and datatypes | A product or division of two variables is approximated with sound bounding axioms and often comes back unknown. Float is reported unsupported with a hint |
| Z3 | vary prove --solver z3 | Decides nonlinear goals, adds native string theory and IEEE Float | Native code, so a very hard query can run past its budget; Vary abandons it and says so |
| cvc5 | vary prove --solver cvc5 | Decides nonlinear goals, adds native strings and Float | Optional download. Struggles with 128-bit multiplication |
Z3 is in the release archive for your platform, under lib/native/z3/. Vary checks the files against checksums built into it and loads them from there: nothing is downloaded and nothing is written to your home directory. On a platform with no bundled build, or a source build, the first --solver z3 run downloads the library into ~/.vary/z3/ instead. cvc5 is not bundled; the first --solver cvc5 run downloads it the same way and reuses it afterwards. Nothing is downloaded unless you ask.
By default Vary tries SMTInterpol first and runs only the obligations it leaves open on Z3. The default never makes an answer worse: a proven or refuted result is never replaced, and an unknown can only become proven or refuted. Set VARY_PROVE_Z3_RETRY=0 to turn the second step off.
For products of bounded variables the bundled solver now needs no help. A contract that bounds price and percent_off is enough for it to prove that price * percent_off cannot overflow and stays below price * 100. The report lists the layer of the nonlinear strategy that a proof relied on (nonlinear:bounds, nonlinear:cases, nonlinear:expand). What stays open is reasoning that needs real algebra, such as a sum of squares, and unbounded products that really can overflow; Z3 decides the first and refutes the second.
An unknown result is the sign that a different solver may help. The report says so when it knows. For example, price * percent_off is unknown on the bundled solver and proven on Z3. The answers never contradict each other: a solver can only turn an unknown into a proven or a refuted. Vary does not report proven unless the solver proves it.
| Construct | Bundled solver | Z3 or cvc5 |
|---|---|---|
a * b, a // b, a % b with two variables | Approximated, often unknown | Decided |
String indexing, slices, startswith, endswith, strip, lower, upper, contains, find, replace | Length and equality only. The rest is opaque | Native string theory |
Float | Unsupported, with a hint | IEEE double (the default run uses Z3 for it when Z3 ships with the install) |
| Quantified list properties | Works, some steps may stay undecided | Usually decides |
Int is a 64-bit wrapping integer on the JVM. By default the prover models it as an unbounded mathematical integer and adds an overflow obligation for every operation that could wrap. If all overflow obligations are proven, the model is exact.
For exact 64-bit reasoning, use vary prove --solver z3 --int-model bitvector. It is slower, but it decides nonlinear goals by bit-blasting. Use it with Z3.
--timeout-ms sets the budget per obligation. A timeout is reported as timeout, never as proven. The report names the quantifier that was being instantiated when time ran out, which usually tells you where to add a trigger or a lemma.
Z3 and cvc5 are native code and cannot always be interrupted. Vary runs each query on its own thread and abandons it once the budget plus a short grace period has passed. Each abandoned query leaves a thread behind, so after six of them a solver stops taking new queries and the rest come back unknown, with a note naming the limit. Rerun with a larger --timeout-ms, or with the other solver.
A proof is only as good as the solver and the encoder. Counterexamples are always replayed on the real program before they are reported as refuted, which guards against a wrong refutation. For a goal that SMT cannot settle at all, export it to Lean and import the checked proof back.