-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cram test for SV-COMP architecture
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// CRAM | ||
#include <limits.h> | ||
|
||
int main() { | ||
long k = INT_MAX; | ||
long n = k * k; | ||
return 0; | ||
} |
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,22 @@ | ||
There should be overflow on ILP32: | ||
|
||
$ goblint --enable ana.sv-comp.enabled --set ana.specification "CHECK( init(main()), LTL(G ! overflow) )" --set exp.architecture 32bit 36-svcomp-arch.c | ||
[Info] Setting "ana.int.interval" to true | ||
[Info] SV-COMP specification: CHECK( init(main()), LTL(G ! overflow) ) | ||
[Warning][Integer > Overflow][CWE-190] Signed integer overflow (36-svcomp-arch.c:6:8-6:17) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 4 | ||
dead: 0 | ||
total lines: 4 | ||
SV-COMP result: unknown | ||
|
||
There shouldn't be an overflow on LP64: | ||
|
||
$ goblint --enable ana.sv-comp.enabled --set ana.specification "CHECK( init(main()), LTL(G ! overflow) )" --set exp.architecture 64bit 36-svcomp-arch.c | ||
[Info] Setting "ana.int.interval" to true | ||
[Info] SV-COMP specification: CHECK( init(main()), LTL(G ! overflow) ) | ||
[Info][Deadcode] Logical lines of code (LLoC) summary: | ||
live: 4 | ||
dead: 0 | ||
total lines: 4 | ||
SV-COMP result: true |