-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #796 from goblint/yaml-witness-unassume
Unassume witness invariants during solving
- Loading branch information
Showing
110 changed files
with
4,802 additions
and
887 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,50 @@ | ||
(** Benchmark calculation of powers of 2 with Zarith. | ||
Originally for https://github.com/goblint/cil/pull/115. | ||
dune exec bench/zarith/benchZarith.exe -- -a *) | ||
|
||
open Benchmark | ||
open Benchmark.Tree | ||
|
||
|
||
let () = | ||
let pow2_pow n = Big_int_Z.power_int_positive_int 2 n in | ||
let pow2_lsl n = Big_int_Z.shift_left_big_int Big_int_Z.unit_big_int n in | ||
|
||
|
||
register ( | ||
"pow2" @>>> [ | ||
"8" @> lazy ( | ||
let arg = 8 in | ||
throughputN 1 [ | ||
("pow", pow2_pow, arg); | ||
("lsl", pow2_lsl, arg); | ||
] | ||
); | ||
"16" @> lazy ( | ||
let arg = 16 in | ||
throughputN 1 [ | ||
("pow", pow2_pow, arg); | ||
("lsl", pow2_lsl, arg); | ||
] | ||
); | ||
"32" @> lazy ( | ||
let arg = 32 in | ||
throughputN 1 [ | ||
("pow", pow2_pow, arg); | ||
("lsl", pow2_lsl, arg); | ||
] | ||
); | ||
"64" @> lazy ( | ||
let arg = 64 in | ||
throughputN 1 [ | ||
("pow", pow2_pow, arg); | ||
("lsl", pow2_lsl, arg); | ||
] | ||
); | ||
] | ||
) | ||
|
||
|
||
let () = | ||
run_global () |
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,4 @@ | ||
(executable | ||
(name benchZarith) | ||
(optional) ; TODO: for some reason this doesn't work: `dune build` still tries to compile if benchmark missing (https://github.com/ocaml/dune/issues/4065) | ||
(libraries benchmark zarith)) |
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,76 @@ | ||
{ | ||
"ana": { | ||
"int": { | ||
"def_exc": true, | ||
"enums": false, | ||
"interval": true | ||
}, | ||
"activated": [ | ||
"expRelation", | ||
"base", | ||
"threadid", | ||
"threadflag", | ||
"threadreturn", | ||
"escape", | ||
"mutexEvents", | ||
"mutex", | ||
"access", | ||
"mallocWrapper", | ||
"mhp", | ||
"assert", | ||
"unassume" | ||
], | ||
"malloc": { | ||
"wrappers": [ | ||
"kmalloc", | ||
"__kmalloc", | ||
"usb_alloc_urb", | ||
"__builtin_alloca", | ||
"kzalloc", | ||
|
||
"ldv_malloc", | ||
|
||
"kzalloc_node", | ||
"ldv_zalloc", | ||
"kmalloc_array", | ||
"kcalloc", | ||
|
||
"ldv_xmalloc", | ||
"ldv_xzalloc", | ||
"ldv_calloc" | ||
] | ||
}, | ||
"widen": { | ||
"tokens": true | ||
} | ||
}, | ||
"witness": { | ||
"enabled": false, | ||
"invariant": { | ||
"loop-head": true, | ||
"after-lock": true, | ||
"other": false | ||
} | ||
}, | ||
"sem": { | ||
"unknown_function": { | ||
"invalidate": { | ||
"globals": false | ||
}, | ||
"spawn": true | ||
}, | ||
"builtin_unreachable": { | ||
"dead_code": true | ||
}, | ||
"int": { | ||
"signed_overflow": "assume_none" | ||
} | ||
}, | ||
"pre": { | ||
"cppflags": [ | ||
"-DGOBLINT_NO_PTHREAD_ONCE", | ||
"-DGOBLINT_NO_QSORT", | ||
"-DGOBLINT_NO_BSEARCH" | ||
] | ||
} | ||
} |
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,78 @@ | ||
{ | ||
"ana": { | ||
"int": { | ||
"def_exc": true, | ||
"enums": false, | ||
"interval": true | ||
}, | ||
"activated": [ | ||
"expRelation", | ||
"base", | ||
"threadid", | ||
"threadflag", | ||
"threadreturn", | ||
"escape", | ||
"mutexEvents", | ||
"mutex", | ||
"access", | ||
"mallocWrapper", | ||
"mhp", | ||
"assert" | ||
], | ||
"malloc": { | ||
"wrappers": [ | ||
"kmalloc", | ||
"__kmalloc", | ||
"usb_alloc_urb", | ||
"__builtin_alloca", | ||
"kzalloc", | ||
|
||
"ldv_malloc", | ||
|
||
"kzalloc_node", | ||
"ldv_zalloc", | ||
"kmalloc_array", | ||
"kcalloc", | ||
|
||
"ldv_xmalloc", | ||
"ldv_xzalloc", | ||
"ldv_calloc" | ||
] | ||
} | ||
}, | ||
"witness": { | ||
"enabled": false, | ||
"yaml": { | ||
"enabled": true | ||
}, | ||
"invariant": { | ||
"exact": false, | ||
"exclude-vars": [ | ||
"tmp\\(___[0-9]+\\)?", | ||
"cond", | ||
"RETURN" | ||
] | ||
} | ||
}, | ||
"sem": { | ||
"unknown_function": { | ||
"invalidate": { | ||
"globals": false | ||
}, | ||
"spawn": true | ||
}, | ||
"builtin_unreachable": { | ||
"dead_code": true | ||
}, | ||
"int": { | ||
"signed_overflow": "assume_none" | ||
} | ||
}, | ||
"pre": { | ||
"cppflags": [ | ||
"-DGOBLINT_NO_PTHREAD_ONCE", | ||
"-DGOBLINT_NO_QSORT", | ||
"-DGOBLINT_NO_BSEARCH" | ||
] | ||
} | ||
} |
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,94 @@ | ||
{ | ||
"ana": { | ||
"sv-comp": { | ||
"enabled": true, | ||
"functions": true | ||
}, | ||
"int": { | ||
"def_exc": true, | ||
"enums": false, | ||
"interval": true | ||
}, | ||
"float": { | ||
"interval": true | ||
}, | ||
"activated": [ | ||
"base", | ||
"threadid", | ||
"threadflag", | ||
"threadreturn", | ||
"mallocWrapper", | ||
"mutexEvents", | ||
"mutex", | ||
"access", | ||
"race", | ||
"escape", | ||
"expRelation", | ||
"mhp", | ||
"assert", | ||
"var_eq", | ||
"symb_locks", | ||
"region", | ||
"thread", | ||
"threadJoins", | ||
"unassume" | ||
], | ||
"context": { | ||
"widen": false | ||
}, | ||
"malloc": { | ||
"wrappers": [ | ||
"kmalloc", | ||
"__kmalloc", | ||
"usb_alloc_urb", | ||
"__builtin_alloca", | ||
"kzalloc", | ||
|
||
"ldv_malloc", | ||
|
||
"kzalloc_node", | ||
"ldv_zalloc", | ||
"kmalloc_array", | ||
"kcalloc", | ||
|
||
"ldv_xmalloc", | ||
"ldv_xzalloc", | ||
"ldv_calloc" | ||
] | ||
}, | ||
"base": { | ||
"arrays": { | ||
"domain": "partitioned" | ||
} | ||
}, | ||
"autotune": { | ||
"enabled": false | ||
}, | ||
"widen": { | ||
"tokens": true | ||
} | ||
}, | ||
"exp": { | ||
"region-offsets": true | ||
}, | ||
"witness": { | ||
"enabled": false, | ||
"invariant": { | ||
"loop-head": true, | ||
"after-lock": false, | ||
"other": false | ||
} | ||
}, | ||
"solver": "td3", | ||
"sem": { | ||
"unknown_function": { | ||
"spawn": false | ||
}, | ||
"int": { | ||
"signed_overflow": "assume_none" | ||
}, | ||
"null-pointer": { | ||
"dereference": "assume_none" | ||
} | ||
} | ||
} |
Oops, something went wrong.