On this page
veradic check
Check source syntax, names, types, initialization, effects, and ownership without attempting proof or running the program. Use this command for a quick editing loop and as the first gate in an automated build.
Examples use the source projects included with these manuals. Run repository-relative examples from the repository root; in your own project, use its corresponding paths.
Synopsis
veradic [--colour auto|always|never] [--diagnostics human|json|sarif]
check [--project FILE] [--show-flow] [--dump-bir] [FILES...]
The shared command parser also accepts proof and code-generation options listed under Option applicability. They do not make check prove or compile a program.
What the command establishes
Verada loads the requested units and their dependencies, parses their syntax, resolves names, and checks types and language legality. It then lowers the checked program to Verada Core and performs flow analysis, including initialization, global effects and dependencies, ghost restrictions, aliasing, ownership, and applicable concurrency rules.
A stage runs only if the preceding stage supplied a valid program and no blocking errors. Diagnostics can therefore describe the first problem that prevents further analysis; a clean syntax check alone does not establish that later stages will succeed.
| Stage | Performed by check? |
|---|---|
| Load units, parse, resolve names, and check types | Yes |
| Lower to Core and analyze flow and ownership | Yes |
| Generate and solve verification conditions | No |
| Compile or link native code | No |
| Execute a main program or package elaboration | No |
Success means the requested program passes these language and flow checks. It does not establish its contracts, absence of arithmetic or index failures, termination, or a correct result. Run veradic prove for proof; strict veradic build and veradic run also attempt proof before producing or running code. For example, a well-typed addition that can overflow may pass check and fail prove.
Inputs and project selection
Pass one or more source files, or select a project. Vada files use .vads and .vadb, Varc files use .va, and Vibe files use .vb. Dependencies can use a different supported syntax from the requesting file.
veradic check src/main.vadb
veradic check src/main.va
veradic check src/main.vb
veradic check --project verada.tomlIf --project FILE is absent, Verada uses verada.toml in the current directory when it exists. It does not search parent directories. Paths in that file's source-dirs and c-sources are relative to the project file. Explicit command line filenames are relative to the shell's current directory.
When filenames are supplied, they select the initial units; Verada also loads the units they depend on, specifications and bodies, from the search directories below. When no filenames are supplied, Verada enumerates supported source files directly inside the project's source-dirs. It does not walk subdirectories recursively. An omitted source-dirs defaults to ["."] relative to the project file. A project containing no selected source files, or an invocation with neither files nor an available project, reports an error.
Verada searches input-file directories, project source directories, and the embedded predefined library for required units. Use conventional unit filenames and avoid two files that define the same unit. Each example below includes a complete project file with its source directory already selected.
Examples in the three syntaxes
The included Bounded.Increment examples return a natural number one greater than their argument. The repaired version requires an argument below the largest natural number, so the increment can be proved safe.
Vada. The package specification declares the precondition and postcondition; the body implements the addition. Check the body to load both parts:
veradic check docs/manuals/examples/first-proof/vada/after/bounded.vadbThe source is in bounded.vads and bounded.vadb. To include the application's main procedure:
veradic check --project docs/manuals/examples/first-proof/vada/after/verada.tomlVarc. The package's public contract and implementation share one file:
veradic check docs/manuals/examples/first-proof/varc/after/bounded.va
veradic check --project docs/manuals/examples/first-proof/varc/after/verada.tomlSee bounded.va.
Vibe. The module's typed function uses requires(...) and ensures(...):
veradic check docs/manuals/examples/first-proof/vibe/after/bounded.vb
veradic check --project docs/manuals/examples/first-proof/vibe/after/verada.tomlSee bounded.vb.
Each command above should succeed without printing output in the default human diagnostic mode. The corresponding before projects also pass check: their missing precondition is a proof issue. Compare one directly:
veradic check --project docs/manuals/examples/first-proof/varc/before/verada.toml
veradic prove --project docs/manuals/examples/first-proof/varc/before/verada.tomlThe first command succeeds; the second fails because the addition can overflow and the declared result cannot be established for every natural-number input. The repaired after project is the version to prove and run.
Option applicability
Place global options before check, as shown in the synopsis. Place command-specific options after it. veradic check --help lists all options accepted by the shared parser, including options that have no operational effect on this command.
| Option | Meaning for check |
|---|---|
--project FILE |
Select the project file; otherwise use verada.toml in the current directory when present. |
--show-flow |
Print the inferred Global and Depends contracts of user subprograms to stdout. |
--dump-bir |
Print the program's lowered Core representation to stdout. The option retains its historical bir name. |
--diagnostics human|json|sarif |
Global option. Choose human diagnostics on stderr, a JSON array on stdout, or a SARIF 2.1.0 log on stdout; default human. |
--colour auto|always|never |
Global option. Choose human-diagnostic color; default auto, which observes terminal detection and NO_COLOR. |
-h, --help |
Show command help and exit successfully. |
The following accepted options do not invoke their associated operations during check:
| Accepted options | Why they have no operational effect |
|---|---|
--no-prove, --advisory |
check never attempts proof. Advisory mode does not relax its syntax, semantic, or flow errors. |
--dump-vcs, --stats, -j/--jobs, --z3, --solver-interface, --proof-budget, --certificates, --stability |
No verification conditions or solver sessions are run, no proof statistics are printed, and no certificates are read or written. |
-o/--output, --emit, --cc, -g/--debug |
No native output, linking, or execution occurs. |
--no-cache |
This command does not consult or update the persistent proof cache or native object cache. |
Accepted values are still parsed, and project proof settings and budget names are validated before analysis. Consequently, an invalid solver-interface choice or proof-budget name can reject an invocation even though no solver would run. Prefer the small set of options in the synopsis for ordinary checks.
Output and exit status
| Result | Stdout | Stderr | Exit status |
|---|---|---|---|
| Clean success, default options | Empty | Empty | 0 |
| Warnings only, human mode | Empty | Human-readable warnings | 0 |
| A language, flow, file, or project error, human mode | Empty | Human-readable diagnostics | 1 |
| JSON mode without inspection flags | One JSON array, followed by a newline | Empty | 0 or 1, according to diagnostic severity |
--show-flow or --dump-bir, after successful lowering |
Requested text before any JSON diagnostics | Human diagnostics, if selected | 0 or 1 |
Warnings do not become errors merely because the command is used in CI. A clean JSON check produces []; the absence of diagnostics is distinct from an absent or malformed JSON report. No proof summary is printed.
For an automation step, capture JSON separately from the shell's exit status:
veradic --diagnostics json check --project verada.toml > diagnostics.jsonCheck the command's exit status as well as the report. Do not combine --show-flow or --dump-bir with JSON when a consumer expects a single JSON document: their text also goes to stdout. Use a separate human-readable inspection invocation.
The JSON diagnostic schema includes codes, severity, phase, source labels, notes, fixes, and advice. check does not supply solver counterexamples because it does not attempt proof. An invalid command line is reported as B7003 in human form on stderr, whatever --diagnostics says, so check the exit status before reading the JSON.
Dependencies and filesystem effects
Use a runnable installed veradic and make the source files, dependencies, and project file readable. check does not start Z3, a fallback prover, or a C compiler. The compiler itself still needs its installed shared libraries to load; this command is not a way to bypass an incomplete installation.
check leaves sources unchanged and does not create an executable, object files, proof-cache entries, .bli files, certificate files, or VC dumps. It does not compile the project's c-sources. Shell redirection, as in the JSON example, creates the file requested by the shell.
The command can validate declarations for a library package without an executable entry point. Success does not establish that a chosen main procedure can subsequently be linked or that external C implementations meet their contracts.
Troubleshooting
| Symptom | Action |
|---|---|
| Nothing to check | Pass source filenames, or run from the directory containing the intended verada.toml; with --project, verify its source-dirs and that the directories contain supported source files. |
| A library unit cannot be found | Check its unit name and conventional filename, add its containing directory to source-dirs, and check project-relative versus shell-relative paths. |
| The wrong project seems to be loaded | Use --project FILE explicitly. Automatic discovery checks the current directory only. |
check succeeds but prove fails |
Inspect the reported proof obligation. Add a justified contract or invariant, or repair the implementation; passing the type and flow checks is only the first stage. |
--advisory does not allow a flow error |
Repair the initialization, effect, aliasing, or ownership violation. Advisory mode changes proof handling, not these legality requirements. |
| A budget/configuration error occurs without a prover | Correct the invalid option or project proof setting. Those values are validated even for check. |
| A JSON consumer rejects the output | Remove inspection flags, inspect exit status and stderr, and ensure the invocation itself was accepted. |
| The compiler cannot start | Repair installation or shared-library lookup. Solver and linker troubleshooting is unnecessary until a command actually invokes those tools. |
Keep the diagnostic code, complete command, project layout, and the output of veradic --version when reporting a problem. Reduce the example while preserving its required files and the same diagnostic. Use veradic explain Bxxxx for the explanation of a reported code.