Skip to content

Commit

Permalink
Add cram test for SV-COMP architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Sep 25, 2024
1 parent bcb15a1 commit f7e4462
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/regression/29-svcomp/36-svcomp-arch.c
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;
}
22 changes: 22 additions & 0 deletions tests/regression/29-svcomp/36-svcomp-arch.t
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

0 comments on commit f7e4462

Please sign in to comment.