This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// The recursive call's measure is compared with N as it is at the call
|
||||
// (N + 2), not with N as it was on entry. The run compares with entry.
|
||||
// MUST-NOT-PROVE: decreases-step@12
|
||||
// RUN-STOPS: decreases@7
|
||||
FUNCTION F(N : INTEGER) RETURNS INTEGER
|
||||
REQUIRE N >= 0
|
||||
DECREASES N
|
||||
IF N == 0 THEN
|
||||
RETURN 0
|
||||
ENDIF
|
||||
N <- N + 2
|
||||
RETURN F(N - 1)
|
||||
ENDFUNCTION
|
||||
|
||||
OUTPUT F(3)
|
||||
Reference in new issue
Block a user