13 lines
334 B
Plaintext
13 lines
334 B
Plaintext
// The run checks DECREASES >= 0 on every call, the first one too. No
|
|
// obligation covers that check, so a unit with everything proved still stops.
|
|
// MUST-NOT-PROVE: decreases-bound@5
|
|
FUNCTION F(N : INTEGER) RETURNS INTEGER
|
|
DECREASES N
|
|
IF N <= 0 THEN
|
|
RETURN 0
|
|
ENDIF
|
|
RETURN F(N - 1)
|
|
ENDFUNCTION
|
|
|
|
OUTPUT F(-5)
|