-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deleted context gas from C, is just tracked in ctx.local; updated tes…
…tcases
- Loading branch information
Johanna Schinabeck
authored and
Johanna Schinabeck
committed
Feb 11, 2024
1 parent
3001590
commit a7bf70e
Showing
23 changed files
with
438 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
tests/regression/80-context_gas/01-basic_tests_bound_sens.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// PARAM: --enable ana.context.ctx_gas --enable ana.int.interval_set --set ana.context.ctx_gas_value 10 | ||
// Basic examples | ||
|
||
int f(int x, int y) | ||
{ | ||
if (x == 0) | ||
{ | ||
return y; | ||
} | ||
return f(x - 1, y - 1); | ||
} | ||
|
||
int main() | ||
{ | ||
__goblint_check(f(8, 8) == 0); // boundary (included) | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/regression/80-context_gas/02-basic_tests_bound_ins.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// PARAM: --enable ana.context.ctx_gas --enable ana.int.interval_set --set ana.context.ctx_gas_value 10 | ||
// Basic examples | ||
|
||
int f(int x, int y) | ||
{ | ||
if (x == 0) | ||
{ | ||
return y; | ||
} | ||
return f(x - 1, y - 1); | ||
} | ||
|
||
int main() | ||
{ | ||
__goblint_check(f(9, 9) == 0); // UNKNOWN //boundary (excluded) | ||
} |
73 changes: 0 additions & 73 deletions
73
tests/regression/80-context_gas/02-multiple_function_chain_tests.c
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// PARAM: --enable ana.context.ctx_gas --enable ana.int.interval_set --set ana.context.ctx_gas_value 15 | ||
// Checks if recursion in loops is handled properly | ||
#include <stdio.h> | ||
|
||
int f(int i); | ||
|
||
int g(int i) | ||
{ | ||
if (i == 0) | ||
{ | ||
return 1; | ||
} | ||
if (i > 0) | ||
{ | ||
return f(i + 1); | ||
} | ||
return 11; | ||
} | ||
|
||
int f(int i) | ||
{ | ||
if (i == 0) | ||
{ | ||
return 2; | ||
} | ||
if (i > 0) | ||
{ | ||
return g(i - 2) + g(i - 3); | ||
} | ||
return 12; | ||
} | ||
|
||
int main(void) | ||
{ | ||
__goblint_check(f(0) == 2); | ||
__goblint_check(f(7) == 101); | ||
__goblint_check(f(9) == 265); | ||
__goblint_check(f(10) == 429); | ||
|
||
__goblint_check(g(0) == 1); | ||
__goblint_check(g(3) == 25); | ||
__goblint_check(g(6) == 101); | ||
__goblint_check(g(8) == 265); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.