On this page
Guarantees, checks, and execution modes
A verified result is a statement about specific generated obligations under specific premises. Start by identifying the property and the command's policy, not by treating “the compiler accepted it” as one assurance level. The same source can be checked, proved, or run with some checks left to run time; those actions establish different things.
Four kinds of property
| Property | Meaning in Verada | What it does not establish |
|---|---|---|
| Language legality | Source resolves and satisfies types, supported constructs and static rules | All arithmetic, indexing and contracts are safe |
| Flow/ownership correctness | Initialization, effects, dependency, alias/move and tasking checks pass | Every functional requirement was specified |
| Discharged verification conditions | The generated safety/contract/progress conditions follow under their hypotheses | An unconditional theorem about arbitrary foreign callers, resources or the physical world |
| Adequate application specification | The written contracts capture the behavior the application actually requires | This requires human/domain review; the prover cannot infer unstated requirements |
The runtime conditions include overflow, range, index, divisor, alias, length, discriminant, predicate, null and tag checks. Preconditions, postconditions, assertions, contract cases, invariants, variants and exceptional contracts add obligations. The exact semantics are in contracts and the language types/expressions.
These conditions overlap: proving a postcondition may require proving its own arithmetic and indexes. A postcondition is not a free mathematical language in which an overflowing executable expression is silently interpreted as an unbounded integer.
Batch command policy
| Command and options | Analysis and proof | Code |
|---|---|---|
parse |
Syntax only | None |
check |
Legality, lowering, flow, ownership and structural checks | None |
prove |
Check stages plus proof of every verification condition | None; any unproved check is an error |
build, emit, and run without a project |
Check and prove first (--proof full) |
Built only when everything proves; proved checks are left out of the code |
run in a project |
--proof cached: no solver; the project's proof cache supplies the proofs |
Checks the cache knows are proved are left out; the others stay as run-time checks, and warning B8012 counts them |
Any code action with --proof cached |
As above | As above |
Any code action with --advisory |
Check and prove | Unproved checks become warnings and run-time checks; ghost code is compiled |
Any code action with --no-prove |
Check stages only | Every check is kept as a run-time check; ghost code is left out |
prove always proves: --advisory, --no-prove and --proof cached do not change it. --no-cache turns the cached mode off, so run --no-cache proves first. A cached run is as fresh as the last proof: run veradic prove (or let the editor's background prover do it) and the next run leaves out everything that proof established. A failure the cache remembers is reported by the cached run as a warning, and its check runs. See the complete check, prove, build, run and options references.
No mode relaxes type errors, invalid effects, use-after-move or other flow-stage errors. Some termination requirements are structural checks made during flow: a recursive function without a variant is rejected (B5108) before any proof policy matters.
SPARK_Mode does not choose proof policy
SPARK_Mode => Off does not turn proof off: Verada proves every unit, and warns (B8004) that the aspect has no effect. It is accepted so that code shared with other Ada tools reads the same. Verada's proof policy comes from the command and its options alone. See compatibility annotations.
What runtime checking actually covers
Proved checks are left out of generated code. An unproved check that stays in the code is evaluated when the program runs: scalar and array checks, assertions, invariants, and pre- and postconditions. Some properties are established only by proof and have no run-time form:
- Leak freedom (B6005) is proved, not monitored: a program run with an unproved leak obligation does not report the leak.
- Loop and subprogram variants are proved, not monitored: a loop whose variant does not decrease runs on.
pragma Assume(Varcassume, Vibeassume(...)) is a proof hypothesis, not a test. Every proof warns of it (B8002); see trust.- The predefined library's contracts are trusted by its clients, and its bodies are proved separately, so a client's build does not check the library's postconditions at run time.
- Ghost code is left out of a build without proof (
--no-prove) and of a cached build, so a contract that calls a ghost function is not checked when the program runs. B8007 names each such pre- and postcondition in a--no-provebuild, and B8012 says so for a cached build.--advisorycompiles ghost code and checks those contracts.
A passing run is therefore evidence for the inputs it ran, under that policy. Use prove for the claims a release depends on.
REPL policy and state
The REPL takes Vada, Varc or Vibe input, with advisory proof by default. :set proof strict rejects input that does not prove, :set proof advisory proves and warns, and :set proof off skips proof for later input. :prove proves every input so far in strict mode. Finish important work in source files and run the project commands, which have every budget, certificate and trust option. The REPL reference lists the commands.
Session objects are treated through their declared type and contract facts in later proofs, not as constants equal to their last printed values. Redeclarations introduce new versions rather than rewriting earlier compiled references. A failed input does not roll back effects already performed. Globals it may have written are poisoned and must be redeclared; :reset forgets every input, it does not undo effects.
Resource, environment, and termination scope
Functions, and procedures marked Always_Terminates, are proved to terminate, and so is every procedure they call. Other procedures need not terminate. Task shutdown, fairness, deadline response, OS scheduling and deadlock freedom in general are not consequences of proving a sequential contract.
Primary/secondary-stack, heap, thread and OS-resource exhaustion remain environmental failures. Foreign code can violate its trusted contracts or fault. The proof assumes the compiler, the solvers, and the backend and run-time behave as represented. The trust chapter explains these premises and how to record them.
Choose a mode for a purpose
Use check as the quick edit gate, prove to investigate specifications and obligations, run in a project for fast iteration on what is already proved, and advisory execution to observe incomplete work. Do not describe an advisory or cached binary as proved because its sample inputs passed. Before a release, prove the complete project with --no-assume, review warnings and specification adequacy, test the backends you ship, and record the compiler and solver versions (veradic --version).