On this page
Operating the prover
Run prove to check contracts and runtime conditions without generating code. This chapter covers effort, engines and evidence; specification techniques belong to the Verification Manual. Start by correcting a real counterexample or an inadequate invariant before increasing solver effort.
Budgets and precedence
veradic prove --proof-budget thorough --project verada.toml
veradic prove --no-cache -j 2 --stats --project verada.tomlBudget names are trimmed and case-folded. quick, the default, is one pass with Z3 (and Yices for the linear conditions it takes), after a first pass of Z3 alone under a twentieth of the resource limit that every budget makes and that changes no outcome; standard adds seeded retries and a first rung of Z3 and cvc5 with ten times the resource limit; thorough adds further seeds and solver configurations; heavy runs those with a hundred times the limit. Effort is counted in solver resource units, not time, so a budget's outcome does not depend on the machine's speed. Higher effort cannot turn an actual counterexample into a valid proof. B5115 means the budget did not establish the obligation, not that the program was found wrong.
The effective budget is a matching qualified-subprogram override, otherwise CLI --proof-budget, otherwise project proof.budget, otherwise quick. Overrides are matched case-insensitively. There is no per-source pragma to change this setting.
-j N/--jobs N selects concurrent solver sessions; the default is half the processor cores, or VERADA_JOBS when it is set, and a value below 1 counts as 1. The conditions are shared out over the sessions one at a time, so a slow condition does not hold up the others, and identical conditions are solved once. Record source, solver versions, engine availability, budget and relevant environment when comparing results: resource limits make results independent of machine speed, but time limits and tool versions still matter.
Engines and timeouts
Z3 is required for solver work (z3 on PATH, or --z3 PATH). The default --solver-interface pipe sends Verada's SMT-LIB directly. --solver-interface what4 selects the alternate interface and does not use the pipe fallback engine sequence.
The pipe path uses yices-smt2, when it is on PATH, for the linear conditions it takes, and cvc5 on PATH for the retry rungs of the larger budgets. If cvc5 is not on PATH, ~/.alire/libexec/spark/bin/cvc5 is used when it exists. These engines do not replace Z3, which every proof needs; installing one changes what a budget can prove.
Each solver call also has a time limit, 60000 ms by default. VERADA_SOLVER_TIMEOUT replaces it with an integer millisecond value, for a loaded machine. It does not change the resource-based budget. VERADA_PARALLEL_DIGESTS, when set, writes each subprogram's summary digest on all of the compiler's capabilities instead of one: after an edit of a large project, a fifth less wall time, the same digests. It is off by default until Verada is built with GHC 9.14.2, whose runtime fixes a race that parallel evaluation can meet on 9.12. An unavailable Z3 reports B7007; an undecided condition or exhausted budget has its own proof diagnostic. Do not mistake infrastructure failure for a failing execution.
Statistics and investigation
--stats adds proof timing/cache/statistics and, for applicable builds, object/library counts. Human run suppresses the proof summary, including statistics and stability lines; use prove for inspection or JSON run with its separate stderr summary. It can measure interface overhead by additional solver work; do not use it when comparing unqualified wall-clock benchmarks. --show-flow prints inferred user Global/Depends contracts. --dump-bir prints Core. --dump-vcs DIR writes verification conditions as SMT-LIB for inspection; these are debugging artifacts, not self-validating certificate files.
--only NAME (with prove, repeatable) proves only the subprograms of that name, its full dotted name or its last part (--only Find or --only Maps.Find), and relies on the others' contracts, as callers always do: for working on one subprogram while the rest of the project stays as it is. It proves less, not differently; a release proves everything.
--proof-warnings (with prove) also looks for dead code: each branch the program writes (of an if, a case, a loop's filter) is asked whether any path reaches it, and one that none does is reported as B8010. It costs one more query per branch, so it is off by default. Flow analysis's warnings of unused and ineffective code (B3025 to B3028) need no option: check and every later command give them.
--explain (with prove) goes further for each check that fails. It reports the inputs for which the check fails, and only those, as a condition over the subprogram's parameters and globals. The other values are eliminated by quantifier elimination, and what the inputs' subtypes and precondition already say is left out. When that condition's complement, used as the precondition, is proved to make the check hold, and contains no arithmetic that could itself fail, it is offered as the precondition. This works only when the failure involves integers and Booleans; otherwise the plain counterexample remains. It costs seconds per failed check, so it is on demand rather than part of every build.
--stability N asks solver-proved obligations again in fresh seeded sessions and reports answers that do not repeat the proof. A default value of 0 disables this. It is a proof-search stability probe, not a second proof calculus or a guarantee for arbitrary program changes. Use positive N; nonpositive values perform no extra seeded checks. Cached answers and certificate-rechecked obligations do not necessarily enter the newly solved obligation set that is probed; use --no-cache and disable certificates in a disposable project when the comparison must exercise fresh solving.
Proofs checked independently
veradic prove --no-cache --check-proofs --project test/corpus-gold/verada.tomlA proof is a solver's answer: "unsat", no counterexample exists. --check-proofs takes the solver's word out of it where it can. For each check that was proved, cvc5 proves its obligation again and writes the proof, every step of its reasoning, in the Alethe format, and Carcara, a proof checker written apart from any solver, checks each step. A check whose proof Carcara accepts whole rests on Carcara and the rewrite rules it is given (cvc5's own, and a few of Verada's, each checked by Z3: rules/README.md in the source), not on Z3, cvc5 or Yices.
proved 129 of 129 checks in 8 subprograms (59 statically, 70 by the solver)
checked independently: 113 of 129 proved checks (cvc5's proofs, checked by Carcara)
not checked, 7: cvc5 writes no Alethe proof of a query over records (datatypes)
not checked, 3: cvc5 writes no Alethe proof that divides by a value that may be zero
not checked, 2: Carcara could not follow the proof: the rule array-read-over-write-split was not found
not checked, 1: Carcara could not follow the proof: expected 1 number of premises, maybe you applied more arguments than needed
not checked, 1: Carcara could not follow the proof: sort error: expected 'Real', got 'Int'
not checked, 1: Carcara could not follow the proof: the rule mod-elim was not found
not checked, 1: cvc5 gave no proof within its time limit
Each check that is not checked says why, and the reasons are what the two tools can do today: cvc5 writes no Alethe proof of a query over records (Verada's records are SMT datatypes) or of floating-point arithmetic, nor of one that divides by a value that may be zero; it may not prove what Z3 proved; and Carcara may meet a step it takes on trust or a rule it cannot follow, or cvc5 may give no proof within its time limit, 20 seconds for each proof unless VERADA_PROOF_CHECK_SECONDS gives another (a loaded machine can need more: the test that compares this page's example sets 90). Those checks are proved as before; they rest on the solvers. The output above is the source tree's gold corpus (test/corpus-gold); the test suite runs the same command and compares its output with this page (Verada.Proof.CheckSpec). Integer and array code is mostly checked (the gold corpus, 113 of 129 checks); record-heavy code mostly not (the containers, almost none). The project's .verada/proof-checks.json records each check's outcome, and veradic trust reports the count. It takes about as long again as the proof, so it belongs in a release's evidence rather than every build.
Caches, cores and confidence
veradic prove --no-cache --certificates --project verada.tomlProof answers and certificate cores are different. The proof cache remembers proved conditions, failures with their counterexamples, and the conditions the solvers could not decide; an undecided answer is keyed by the solvers' versions, the budget and the compiler's revision, so it is reported at once on later runs while those stay the same. --no-cache asks every condition again and suppresses .bli writing, but still rechecks enabled certificates. Certificates are rechecked against newly generated obligations by a solver, not accepted on file presence. See artifacts for locations, clean runs and limitations of invalidation keys. Each certificate file names the solver that found its cores (its solver line, the version Z3 reports). veradic --version lists the compiler's version and source revision and each solver it finds, with its version and path; record that output with a release's evidence.
The embedded library is trusted at user compilation time: its implementations are not reproved by this command. Imported C contracts are assumptions, and B8002 can expose such trust boundaries. Review assumptions, unsatisfiable preconditions, specification adequacy, numeric models, termination scope and runtime resource limits independently of the proof summary. An “all checks proved” line describes generated obligations, not all imaginable properties of the application.