DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
B5105: assertion might fail
Catalog status: active. Default severity: error. Stable name: assertion. Family: Contracts and termination.
The prover could not show that the condition of pragma Assert holds at this point.
Example (Vada)
X := Cube (X / 25 - 7); -- Cube (-2) = -8
pragma Assert (X > 0);Example (Varc)
x = cube(x / 25 - 7); // cube(-2) == -8
assert x > 0;
What to do
Fix the code or the assertion. If the assertion is true but not provable, add facts the prover can use: a postcondition on a called subprogram, or an earlier assertion.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See contracts and termination, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.