Skip to content

Commit abc2c40

Browse files
authored
Merge pull request #859 from goblint/svcomp23
SV-COMP 2023 setup
2 parents 67e8da6 + bd42cc1 commit abc2c40

File tree

10 files changed

+154
-14
lines changed

10 files changed

+154
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ goblint.bc.js
5252
*.orig
5353
*.rej
5454

55+
lib/
5556
sv-comp/goblint.zip
5657

5758
privPrecCompare

conf/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
svcomp.json
99
svcomp21.json
1010
svcomp22.json
11+
svcomp23.json
1112
; no way to glob here...
1213
)
1314
)

conf/svcomp.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"ana": {
3-
"base": {
4-
"arrays": {
5-
"domain": "partitioned"
6-
}
7-
},
83
"sv-comp": {
94
"enabled": true,
105
"functions": true
@@ -23,8 +18,10 @@
2318
"mutexEvents",
2419
"mutex",
2520
"access",
21+
"race",
2622
"escape",
2723
"expRelation",
24+
"assert",
2825
"mhp",
2926
"var_eq",
3027
"symb_locks",
@@ -53,15 +50,16 @@
5350
"ldv_xzalloc",
5451
"ldv_calloc"
5552
]
53+
},
54+
"base": {
55+
"arrays": {
56+
"domain": "partitioned"
57+
}
5658
}
5759
},
5860
"exp": {
5961
"region-offsets": true
6062
},
61-
"witness": {
62-
"id": "enumerate",
63-
"unknown": false
64-
},
6563
"solver": "td3",
6664
"sem": {
6765
"unknown_function": {
@@ -73,5 +71,9 @@
7371
"null-pointer": {
7472
"dereference": "assume_none"
7573
}
74+
},
75+
"witness": {
76+
"id": "enumerate",
77+
"unknown": false
7678
}
77-
}
79+
}

conf/svcomp21.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
"mutexEvents",
1818
"mutex",
1919
"access",
20+
"race",
2021
"escape",
2122
"expRelation",
23+
"assert",
2224
"var_eq",
2325
"symb_locks",
2426
"region",

conf/svcomp22.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
"mutexEvents",
1818
"mutex",
1919
"access",
20+
"race",
2021
"escape",
2122
"expRelation",
23+
"assert",
2224
"var_eq",
2325
"symb_locks",
2426
"region",

conf/svcomp23.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"ana": {
3+
"sv-comp": {
4+
"enabled": true,
5+
"functions": true
6+
},
7+
"int": {
8+
"def_exc": true,
9+
"enums": false,
10+
"interval": true
11+
},
12+
"float": {
13+
"interval": true
14+
},
15+
"activated": [
16+
"base",
17+
"threadid",
18+
"threadflag",
19+
"threadreturn",
20+
"mallocWrapper",
21+
"mutexEvents",
22+
"mutex",
23+
"access",
24+
"race",
25+
"escape",
26+
"expRelation",
27+
"mhp",
28+
"assert",
29+
"var_eq",
30+
"symb_locks",
31+
"region",
32+
"thread"
33+
],
34+
"context": {
35+
"widen": false
36+
},
37+
"malloc": {
38+
"wrappers": [
39+
"kmalloc",
40+
"__kmalloc",
41+
"usb_alloc_urb",
42+
"__builtin_alloca",
43+
"kzalloc",
44+
45+
"ldv_malloc",
46+
47+
"kzalloc_node",
48+
"ldv_zalloc",
49+
"kmalloc_array",
50+
"kcalloc",
51+
52+
"ldv_xmalloc",
53+
"ldv_xzalloc",
54+
"ldv_calloc"
55+
]
56+
},
57+
"base": {
58+
"arrays": {
59+
"domain": "partitioned"
60+
}
61+
},
62+
"autotune": {
63+
"enabled": true,
64+
"activated": [
65+
"singleThreaded",
66+
"mallocWrappers",
67+
"noRecursiveIntervals",
68+
"enums",
69+
"arrayDomain",
70+
"octagon",
71+
"wideningThresholds"
72+
]
73+
}
74+
},
75+
"exp": {
76+
"region-offsets": true
77+
},
78+
"solver": "td3",
79+
"sem": {
80+
"unknown_function": {
81+
"spawn": false
82+
},
83+
"int": {
84+
"signed_overflow": "assume_none"
85+
},
86+
"null-pointer": {
87+
"dereference": "assume_none"
88+
}
89+
},
90+
"witness": {
91+
"id": "enumerate",
92+
"unknown": false
93+
}
94+
}

make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rule() {
2525
cp _build/default/$TARGET.exe goblint
2626
;; release)
2727
eval $(opam config env)
28-
dune build --profile release $TARGET.exe &&
28+
dune build --profile=release $TARGET.exe &&
2929
rm -f goblint &&
3030
cp _build/default/$TARGET.exe goblint
3131
# alternatives to .exe: .bc (bytecode), .bc.js (js_of_ocaml), see https://dune.readthedocs.io/en/stable/dune-files.html#executable

src/autoTune.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ let disableIntervalContextsInRecursiveFunctions () =
135135
(*escape is also still enabled, because otherwise we get a warning*)
136136
(*does not consider dynamic calls!*)
137137

138-
let notNeccessaryThreadAnalyses = ["deadlock"; "maylocks"; "symb_locks"; "thread"; "threadflag"; "threadid"; "threadJoins"; "threadreturn"]
138+
let notNeccessaryThreadAnalyses = ["race"; "deadlock"; "maylocks"; "symb_locks"; "thread"; "threadid"; "threadJoins"; "threadreturn"]
139139
let reduceThreadAnalyses () =
140140
let hasThreadCreate () =
141141
ResettableLazy.force functionCallMaps

sv-comp/archive.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@
33
# must have goblint checked out into goblint not analyzer directory
44

55
make clean
6-
make
6+
7+
git tag -m "SV-COMP 2023" svcomp23
8+
9+
dune build --profile=release src/goblint.exe
10+
rm -f goblint
11+
cp _build/default/src/goblint.exe goblint
12+
chmod +w goblint
13+
# must replace absolute apron runpath to C library with relative
14+
chrpath -r '$ORIGIN/lib' goblint
15+
# copy just necessary apron C libraries
16+
mkdir -p lib/
17+
cp _opam/share/apron/lib/libapron.so lib/
18+
cp _opam/share/apron/lib/liboctD.so lib/
19+
cp _opam/share/apron/lib/libboxD.so lib/
20+
cp _opam/share/apron/lib/libpolkaMPQ.so lib/
21+
cp _opam/.opam-switch/sources/apron/COPYING lib/LICENSE.APRON
722

823
# done outside to ensure archive contains goblint/ directory
924
cd ..
@@ -12,7 +27,14 @@ rm goblint/sv-comp/goblint.zip
1227

1328
zip goblint/sv-comp/goblint.zip \
1429
goblint/goblint \
15-
goblint/conf/svcomp22.json \
30+
goblint/lib/libapron.so \
31+
goblint/lib/liboctD.so \
32+
goblint/lib/libboxD.so \
33+
goblint/lib/libpolkaMPQ.so \
34+
goblint/lib/LICENSE.APRON \
35+
goblint/conf/svcomp23.json \
36+
goblint/includes/assert.h \
37+
goblint/includes/goblint.h \
1638
goblint/includes/stdlib.c \
1739
goblint/includes/pthread.c \
1840
goblint/includes/sv-comp.c \
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SKIP PARAM: --set ana.activated[+] apron --set ana.activated[-] threadflag
2+
// Minimized from sv-benchmarks/c/systemc/pipeline.cil-1.c
3+
#include <assert.h>
4+
5+
int main_clk_pos_edge;
6+
int main_in1_req_up;
7+
8+
int main()
9+
{
10+
// main_clk_pos_edge = 2; // TODO: uncomment to unskip apron test
11+
if (main_in1_req_up == 1) // TODO: both branches are dead
12+
assert(0); // TODO: uncomment to unskip apron test, FAIL (unreachable)
13+
else
14+
assert(1); // reachable
15+
return (0);
16+
}

0 commit comments

Comments
 (0)