Skip to content

Commit 309e5b3

Browse files
Merge branch 'master' into malloc_uniqueness
2 parents 77c0423 + cfab02b commit 309e5b3

File tree

249 files changed

+3906
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+3906
-462
lines changed

.github/workflows/options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
sed -i 's|"$schema": "http://json-schema.org/draft-04/schema#",||' src/util/options.schema.json
3131
3232
- name: Validate conf
33-
run: ajv validate -s src/util/options.schema.json -d "conf/*.json"
33+
run: ajv validate -s src/util/options.schema.json -d "conf/**/*.json"
3434

3535
- name: Validate incremental tests
3636
run: ajv validate -s src/util/options.schema.json -d "tests/incremental/*/*.json"

conf/dune

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
(install
3+
(section (site (goblint conf)))
4+
(files
5+
(examples/large-program.json as examples/large-program.json) ; must repeat directory, otherwise gets stripped from target
6+
(examples/medium-program.json as examples/medium-program.json) ; must repeat directory, otherwise gets stripped from target
7+
(examples/very-precise.json as examples/very-precise.json) ; must repeat directory, otherwise gets stripped from target
8+
svcomp.json
9+
svcomp21.json
10+
svcomp22.json
11+
; no way to glob here...
12+
)
13+
)

conf/examples/large-program.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"ana": {
3+
"activated": [
4+
"base", "mallocWrapper","escape","mutex","mutexEvents","access"
5+
],
6+
"base": {
7+
"privatization": "none",
8+
"context": {
9+
"non-ptr": false
10+
}
11+
},
12+
"thread": {
13+
"domain": "plain",
14+
"include-node": false
15+
}
16+
},
17+
"exp": {
18+
"earlyglobs": true
19+
}
20+
}

conf/examples/medium-program.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"ana": {
3+
"int": {
4+
"def_exc": true,
5+
"enums": false,
6+
"interval": true
7+
},
8+
"activated": [
9+
"base",
10+
"threadid",
11+
"threadflag",
12+
"mallocWrapper",
13+
"mutexEvents",
14+
"mutex",
15+
"access",
16+
"escape",
17+
"expRelation",
18+
"var_eq",
19+
"symb_locks",
20+
"region",
21+
"thread"
22+
],
23+
"base": {
24+
"arrays": {
25+
"domain": "partitioned"
26+
}
27+
}
28+
}
29+
}

conf/examples/very-precise.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"ana": {
3+
"int": {
4+
"def_exc": true,
5+
"enums": true,
6+
"interval": true,
7+
"congruence": true,
8+
"refinement": "fixpoint",
9+
"interval_threshold_widening" : true,
10+
"def_exc_widen_by_join" : true
11+
},
12+
"path_sens" : [ "mutex", "malloc_null", "uninit","threadflag" ],
13+
"apron" : {
14+
"domain": "octagon",
15+
"threshold_widening": true,
16+
"privatization": "mutex-meet-tid-cluster12",
17+
"strengthening": true
18+
},
19+
"activated": [
20+
"base",
21+
"threadid",
22+
"threadflag",
23+
"mallocWrapper",
24+
"mutexEvents",
25+
"mutex",
26+
"access",
27+
"escape",
28+
"expRelation",
29+
"var_eq",
30+
"symb_locks",
31+
"region",
32+
"thread",
33+
"apron"
34+
],
35+
"context": {
36+
"widen": false
37+
},
38+
"malloc": {
39+
"wrappers": [
40+
"kmalloc",
41+
"__kmalloc",
42+
"usb_alloc_urb",
43+
"__builtin_alloca",
44+
"kzalloc",
45+
"ldv_malloc",
46+
"kzalloc_node",
47+
"ldv_zalloc",
48+
"kmalloc_array",
49+
"kcalloc"
50+
]
51+
},
52+
"base": {
53+
"arrays": {
54+
"domain": "partitioned"
55+
},
56+
"structs" : {
57+
"domain" : "combined-sk"
58+
}
59+
}
60+
},
61+
"exp": {
62+
"region-offsets": true
63+
},
64+
"solver": "td3"
65+
}

docs/user-guide/configuring.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Configuring
22

3-
## JSON conf files
3+
On top of passing options via the command line, Goblint can be configured with `json` files following the schema outlined in `/src/util/options.schema.json`
4+
or using one of the default configurations we provide.
5+
6+
# Example Configurations for Goblint
7+
8+
The repository contains some example configurations for the Goblint analyzer in the folder `conf/examples`. If Goblint is installed these can
9+
be accessed without the conf prefix, e.g. with `./goblint --conf examples/large-programs.json`.
10+
11+
- `very-precise.json`: Enables some of the more expensive abstract domains and features, especially useful for smaller programs
12+
- `medium-program.json`: Enables some costly features, but staying away from the very expensive ones. This is very close to, e.g. the configuration we use for SV-COMP
13+
- `large-programs.json`: Minimal configuration for larger programs, should run fast even for large programs, but usually needs to be made more precise by adding further features.
414

515
### JSON schema
616

docs/user-guide/running.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ For a list of all options and their possible configurations, run:
2525
./goblint --print_all_options
2626
```
2727

28+
To use one of the pre-defined configurations, run:
29+
30+
```console
31+
./goblint --conf path/to/config.json files
32+
```
33+
2834
## Analyzing Recursive Programs
2935
In some cases, when using the default configuration, Goblint might not terminate in reasonable time on recursive programs, or
3036
crash in a stack overflow (indicated by the error message `exception Stack overflow`). If the stack overflow occurs within a C function called by Goblint, it will result in the following error message: `Command terminated by signal 11`.

dune-project

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
(zarith (>= 1.8))
3131
(yojson (>= 2.0.0))
3232
qcheck-core
33-
(ppx_distr_guards (>= 0.2))
3433
ppx_deriving
3534
ppx_deriving_hash
3635
ppx_deriving_yojson
@@ -55,5 +54,5 @@
5554
apron
5655
z3
5756
)
58-
(sites (share includes))
57+
(sites (share includes) (share conf))
5958
)

g2html

goblint.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ depends: [
2626
"zarith" {>= "1.8"}
2727
"yojson" {>= "2.0.0"}
2828
"qcheck-core"
29-
"ppx_distr_guards" {>= "0.2"}
3029
"ppx_deriving"
3130
"ppx_deriving_hash"
3231
"ppx_deriving_yojson"

0 commit comments

Comments
 (0)