DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B8009: a check justified by review, not proved

Catalog status: active. Default severity: warning. Stable name: check-justified. Family: Warnings and assumptions.

A check the prover could not prove has a reviewed justification: a pragma Annotate after the statement it is in, naming a pattern of the check's message and the reviewer's reason.

Example (Vada)

X := Table (I);
pragma Annotate (Verada, False_Positive, "index check", "I comes from Lookup, which only returns indices of Table");

Example (Varc)

X = Table[I];
@Annotate(Verada, False_Positive, "index check", "I comes from Lookup, which only returns indices of Table");

The check stays unproved: it is kept in the code and checked when the program runs, and nothing is assumed from it, so later checks are proved without it (unlike pragma Assume). The justification is reported on every build, and veradic trust lists it with the program's other assumptions. --no-assume makes it an error, as a release build should.

False_Positive says the check holds but the prover cannot show it; Intentional says it can fail and that is accepted. GNATprove is accepted in place of Verada, for code written for GNATprove.

What to do

Prove the check when you can (a stronger contract or loop invariant, an intermediate pragma Assert). Keep the justification's reason precise enough for a reviewer to check.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See warnings and assumptions, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.