DEVELOPMENT EDITION · 769442725406
Toolchain Manual
On this page

veradic prove

Check and prove the selected units without generating native code or executing the program.

veradic [GLOBAL OPTIONS] prove [COMPILE OPTIONS] [FILES...]

Explicit files select initial units and their closure; otherwise sources come from the explicit or current-directory project. The command loads, parses, resolves/types, lowers, checks flow and ownership, then generates and attempts proof obligations. Language/flow errors block proof. Z3 is needed for nonstatic solver work; no linker/C compiler is started by proving C imports.

veradic prove --project docs/manuals/examples/first-proof/varc/after/verada.toml
veradic prove --no-cache --proof-budget thorough --project verada.toml
veradic --diagnostics json prove --project verada.toml > proof.json

Effective options

Project selection, flow/Core inspection, solver interface/path, budget/overrides, workers, statistics, dumps, proof cache, certificates and stability apply. Defaults: half the processor cores as workers (or VERADA_JOBS), pipe interface, the quick budget unless configured, the proof cache when a project is available, no certificates unless enabled by project or flag, no stability extras. --proof cached has no effect here: prove always proves. See all options for exact accepted aliases and prover operation for interpretation.

--no-prove is accepted but does not skip proof here. --advisory does not turn errors into warnings here. --cc, output path, emit kind and native debug do not produce/link code. Supplying an output path does not create a proof report file; redirect the desired stream.

Results and effects

Clean proof exits 0; errors, undecided/exhausted obligations and unavailable required solver exit 1. Assumption/unsatisfiable-precondition and other warnings can accompany exit 0; review them. Human output places the proof summary on stdout and diagnostics on stderr. JSON output places the array on stdout and proof summary/statistics on stderr. Inspection flags can still prepend text to stdout. An early language/flow error may have no proof summary.

With a project, proof updates .verada/proof-cache (and .verada/lib metadata, with --stats) even when some obligations fail: the cache remembers proved checks, failures with their counterexamples, and the checks the solvers could not decide (keyed by the solvers' versions, the budget and the compiler's revision), so a second run reports those at once without asking again. Loop-invariant suggestions are remembered too. A subprogram whose checks were all proved is not regenerated while nothing its conditions come from has changed, so re-proving a large unit after a small edit takes seconds. --no-cache disables that proof answer reuse and .bli writing, not enabled certificate processing. --certificates/project certificates may read/write cores; --dump-vcs creates files. Sources are unchanged and no application executes.

A confirmed counterexample is different from an unknown. Review the diagnostic's replay notes; a solver model can expose a weak loop invariant rather than a reachable failing input. A successful user proof trusts embedded library/import contracts; it does not re-prove library bodies or C implementations. For repairs see overflow investigation.