On this page
B8003: precondition can never hold
Catalog status: active. Default severity: warning. Stable name: precondition-unsatisfiable. Family: Warnings and assumptions.
The prover showed that no inputs satisfy this precondition. Every call of the subprogram would fail its precondition check, and every check in its body is proved only because it is never reached: the proof says nothing about the code.
The question is asked once, with a small effort (a twentieth of the resource limit), under every proof budget: a contradiction too deep to find within that is not reported, so the absence of B8003 does not show that a precondition can hold.
Example (Vada)
procedure Reset (X : in out Integer)
with Pre => X > 10 and X < 5; -- no X is bothExample (Varc)
fn reset(x: inout Integer)
requires x > 10 && x < 5; // no x is both
What to do (Vada)
Correct the precondition: usually and was meant to be or, or a bound is the wrong way round.
What to do (Varc)
Correct the precondition: usually && was meant to be ||, or a bound is the wrong way round.
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.