Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unassume witness invariants during solving #796

Merged
merged 141 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from 129 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
4cdb4bd
Hack apron unassume
sim642 Jul 25, 2022
b151c62
Use event to trigger unassume after each incoming edge
sim642 Jul 26, 2022
692eb84
Add MyCFG.current_cfg
sim642 Jul 26, 2022
48503c6
Add unassume analysis to read YAML witnesses
sim642 Jul 26, 2022
175cd53
Unassume witness invariants in apron analysis
sim642 Jul 26, 2022
99d51b4
Clean up unassume in Apron
sim642 Jul 26, 2022
f0f5d4d
Show warnings from Spec init
sim642 Jul 26, 2022
f6e6dd2
Forbid globals in Apron unassume
sim642 Jul 26, 2022
5d16198
Unassume witness invariants in base analysis
sim642 Jul 26, 2022
b53f9e6
Consider static in scope check
sim642 Jul 26, 2022
752f88a
Add witness unassume testing to update_suite.rb
sim642 Jul 26, 2022
94dadc2
Ignore unassumes with globals, exclude untracked in Apron
sim642 Jul 26, 2022
b5cb10e
Remove witness.yml files from update_suite.rb
sim642 Jul 26, 2022
10c28a0
Add info about unassuming
sim642 Jul 26, 2022
4c8a737
Emit Unassume from other transfer functions
sim642 Jul 27, 2022
e674f4f
Add preconditioned invariant unassuming
sim642 Jul 27, 2022
2b48d41
Fix precondition CIL parse errors in witness validation
sim642 Jul 27, 2022
557e12f
Replace unassume pre_invs assoc list with Hashtbl
sim642 Jul 27, 2022
b252258
Add script for checking evals count changes in regression tests with …
sim642 Jul 27, 2022
b1eb2eb
Fix update_suite.rb -w not checking anything
sim642 Jul 28, 2022
1007f57
Hack base unassume to not lose precision on non-first vars
sim642 Jul 28, 2022
a96aa0a
Add witness test for problematic base unassume invariant queries
sim642 Aug 8, 2022
048318b
Change base unassume invariant to delegate safe queries outside
sim642 Aug 8, 2022
e8bb6a2
Merge branch 'master' into yaml-witness-unassume
sim642 Aug 22, 2022
e4b5d9f
Make logical operator invariant result more precise
sim642 Aug 22, 2022
82e0e31
Add some TODO base unassume tests
sim642 Aug 30, 2022
df5030b
Extract base invariant to BaseInvariant module
sim642 Aug 31, 2022
342c23f
Fix witness invariant lines in tauto and contra tests
sim642 Aug 31, 2022
2bef780
Hack BaseInvariant for base unassume
sim642 Aug 31, 2022
8f2ed73
Use fixpoint for base unassume
sim642 Aug 31, 2022
5fd25c9
Add narrowing to base unassume
sim642 Aug 31, 2022
b00b2de
Move base unassume soundness join into fixpoint function
sim642 Sep 1, 2022
ed336aa
Extract LocalFixpoint module
sim642 Sep 1, 2022
be4a495
Use empty environment in base unassume
sim642 Sep 1, 2022
2d8c4f3
Add base unassume test with dereferenced invariant
sim642 Sep 1, 2022
0c307d1
Fix evals in base unassume mistakenly being used by refines
sim642 Sep 1, 2022
2983887
Fix base unassume with multiple same dereferenced variables in same i…
sim642 Sep 1, 2022
60f2485
Fix 36-apron/38-branch-global being too trivial
sim642 Sep 13, 2022
d6a6786
Add strengthening unassume example from paper
sim642 Sep 13, 2022
bb3e9f1
Implement strengthening unassume in apron
sim642 Sep 13, 2022
e534700
Add single-threaded apron global unassume test
sim642 Sep 14, 2022
d9c9b0d
Implement apron global unassume
sim642 Sep 14, 2022
6f89ebb
Add multi-threaded apron global unassume test
sim642 Sep 14, 2022
3cec958
Fix apron unassumed invariant info with globals
sim642 Sep 14, 2022
b132b67
Merge branch 'yaml-witness-unassume-base-empty-env' into yaml-witness…
sim642 Sep 14, 2022
d2da3e1
Allow globals in base unassume, force single-threaded mode for sets
sim642 Sep 14, 2022
b910b27
Remove side effects from base priv invariant write_global-s
sim642 Sep 13, 2022
3815cc1
Optimize and document base priv invariant write W
sim642 Sep 14, 2022
f01a9d2
Add multi-threaded base global unassume test
sim642 Sep 14, 2022
8a6b50b
Fix protection-based base priv V tracing
sim642 Sep 14, 2022
f5c44ff
Implement base global unassume
sim642 Sep 14, 2022
4517c1e
Add hacky widening tokens for unassume
sim642 Sep 14, 2022
a5ee11f
Add test for widening tokens on globals
sim642 Sep 15, 2022
415adf0
Add hacky widening tokens for base unassume globals
sim642 Sep 15, 2022
6a85ab1
Make local widening tokens reuse explicitly controlled
sim642 Sep 15, 2022
53adb3e
Fix octx' in MCP do_emits using wrong local
sim642 Sep 15, 2022
df6218f
Fix normal emits not run on splits
sim642 Sep 15, 2022
42c06d0
Use YAML witness entry UUIDs as widening tokens
sim642 Sep 15, 2022
cd6c9d2
Add widening tokens to apron unassume
sim642 Sep 15, 2022
d848519
Extract widening token domain functor, add leq
sim642 Sep 15, 2022
e4ec677
Merge branch 'master' into yaml-witness-unassume
sim642 Oct 4, 2022
5b16195
Fix BaseInvariant indentation
sim642 Oct 4, 2022
776c1f2
Add YAML unassume testing on SV-COMP
sim642 Sep 16, 2022
7283b35
Add option witness.invariant.exact
sim642 Sep 16, 2022
6655115
Disable GraphML witnesses in svcomp-yaml confs
sim642 Sep 16, 2022
a32bf8f
Filter unassume nodes according to options
sim642 Sep 16, 2022
8a5c099
Emit inexact invariants for top intervals
sim642 Sep 16, 2022
392b32c
Optimize base unassume queries with cache
sim642 Sep 16, 2022
a99b51d
Benchmark Zarith power of 2
sim642 Sep 16, 2022
b82d356
Optimize LocalFixpoint with narrowing reuse
sim642 Sep 16, 2022
79f7771
Add TODO about widening token domain equal
sim642 Sep 19, 2022
3a2ee42
Enable Stats call counting
sim642 Sep 19, 2022
c43cb80
Implement var_eq unassume to fix SV-COMP unassuming
sim642 Sep 19, 2022
f2622ef
Increase Yaml.to_string buffer size for long SV-COMP task names
sim642 Sep 19, 2022
9aa4281
Add data to typeOfError-s
sim642 Sep 19, 2022
73df4ca
Fix YAML witness precondition invariant TypeOfError-s
sim642 Sep 19, 2022
672d8a4
Add eloc fallback to loc
sim642 Sep 19, 2022
baf2497
Handle witness.invariant.exact in base address sets
sim642 Sep 19, 2022
a9a6a7a
Add regexes for filtering invariant variable names
sim642 Sep 19, 2022
c01a7a3
Fix unassume causing more evals on sv-benchmarks/c/loops-crafted-1/ne…
sim642 Sep 19, 2022
3375949
Add additional LDV invariant variable filters
sim642 Sep 20, 2022
d8ee00f
Add option witness.invariant.exclude-vars
sim642 Sep 20, 2022
922e91f
Emit def_exc range invariant if more precise than ikind range
sim642 Sep 20, 2022
7c3070a
Add bench-yaml confs
sim642 Sep 27, 2022
ca9db19
Optimize unassume to not emit during postsolving
sim642 Sep 27, 2022
3e11774
Fix widening tokens domain identity causing extra work
sim642 Sep 27, 2022
e5855ba
Fix BenchZarith indentation
sim642 Oct 4, 2022
b8716cd
Fix 56-witness/23-base-unassume-priv2 by reverting widening token lif…
sim642 Oct 4, 2022
9313c22
Fix YAML witness accessed lvals crash on sv-benchmarks/c/loops/bubble…
sim642 Oct 4, 2022
6c9a64a
Update YAML witness SV-COMP script
sim642 Oct 4, 2022
6c138dc
Clean up and document WideningTokens
sim642 Oct 4, 2022
b5de6e6
Fix test ID conflict 56/19
sim642 Oct 4, 2022
de6c681
Add option ana.widen.tokens
sim642 Oct 4, 2022
964bb7a
Fix 56-witness/12-apron-unassume-branch
sim642 Oct 4, 2022
1ea5997
Support witness.invariant.exact in apron
sim642 Oct 4, 2022
14d8320
Add option ana.base.invariant.unassume
sim642 Oct 5, 2022
6f31a88
Add option witness.invariant.inexact-type-bounds
sim642 Oct 5, 2022
e4a316a
Add option witness.yaml.entry-types
sim642 Oct 5, 2022
ce82c41
Make YAML witness generation context joining lazy
sim642 Oct 5, 2022
96db5d4
Merge branch 'master' into yaml-witness-unassume
sim642 Oct 7, 2022
1e981de
Remove temporary YAML BenchExec def
sim642 Oct 7, 2022
9426848
Fix 56-witness/10-apron-unassume-interval to not succeed because of o…
sim642 Oct 7, 2022
fa651e3
Fix base invariant not excluding interval bounds
sim642 Oct 7, 2022
73124ac
Add Miné tutorial examples for unassume
sim642 Oct 7, 2022
f3ff649
Add inc-dec unassume example from thread-witnesses
sim642 Oct 7, 2022
15e7a7e
Fix BaseInvariant indentation
sim642 Oct 7, 2022
d4687e4
Add unassume expression example from thread-witnesses
sim642 Oct 7, 2022
a816bb1
Refine by equality disjunction in base
sim642 Oct 7, 2022
bf25ca3
Refine addresses in base
sim642 Oct 7, 2022
8b307fe
Fix unassume inc-dec example on lockset-based privatizations
sim642 Oct 10, 2022
3ea59f7
Add option solvers.td3.remove-wpoint
sim642 Oct 12, 2022
20763b0
Add Halbwachs-Henry unassume examples
sim642 Oct 12, 2022
811f2af
Add Boutonnet-Halbwachs unassume examples
sim642 Oct 12, 2022
4b04fa1
Add Amato-Scozzari unassume example
sim642 Oct 12, 2022
b130b37
Merge branch 'master' into yaml-witness-unassume
sim642 Oct 25, 2022
26560c2
Deduplicate BaseInvariant refine_lv_fallback
sim642 Nov 8, 2022
f114a1f
Extract eval_rv_base_lval in base
sim642 Nov 8, 2022
312b8b4
Deduplicate BaseInvariant refine_lv
sim642 Nov 8, 2022
8915b01
Fix unconditional tracing in BaseInvariant
sim642 Nov 8, 2022
bc11ca7
Merge branch 'master' into yaml-witness-unassume
sim642 Nov 8, 2022
b1e0851
Unskip 56-witness/14-base-unassume-precondition
sim642 Nov 8, 2022
ceb280f
Merge branch 'yaml-witness-location' into yaml-witness-unassume-location
sim642 Nov 17, 2022
799cbd5
Support location_invariant in unassume
sim642 Nov 17, 2022
b96c0b2
Merge branch 'master' into yaml-witness-unassume
sim642 Dec 2, 2022
66b5b23
Add longer unassume analysis description
sim642 Dec 19, 2022
1631657
Add longer BenchZarith description
sim642 Dec 19, 2022
419fcec
Add WitnessUtil.Locator.clear
sim642 Dec 19, 2022
9109e44
Improve LocalFixpoint description
sim642 Dec 19, 2022
ed06c34
Merge branch 'master' into yaml-witness-unassume
sim642 Dec 19, 2022
cedb278
Update svcomp-yaml confs to svcomp conf, except autotune
sim642 Dec 22, 2022
abc47e6
Refactor YAML witness SV-COMP testing to use multiple run definitions
sim642 Dec 22, 2022
604b05c
Limit YAML witness SV-COMP testing to true verdicts
sim642 Dec 22, 2022
8ae3307
Fix YAML witness generation crash on preprocessed file
sim642 Dec 27, 2022
baa5b2d
Fix mutex analysis postsolving crash on smtprc_comb.c
sim642 Dec 27, 2022
4b6c4f2
Fix fixpoint error on thread creation wrapper with local access colle…
sim642 Dec 27, 2022
d19117e
Revert "Fix mutex analysis postsolving crash on smtprc_comb.c"
sim642 Dec 27, 2022
be4a51f
Add BenchExec for goblint-bench pthread programs with YAML witnesses
sim642 Dec 27, 2022
926bd9f
Make summary message totals distinct for grepping
sim642 Dec 27, 2022
da509ad
Update BenchExec YAML witness entries column regexes
sim642 Dec 27, 2022
b6f82c9
Add live lines columns to YAML witness BenchExec
sim642 Dec 27, 2022
6e76ea6
Promote total changes to cram tests
sim642 Dec 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions bench/zarith/benchZarith.ml
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 ()
4 changes: 4 additions & 0 deletions bench/zarith/dune
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))
76 changes: 76 additions & 0 deletions conf/bench-yaml-validate.json
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"
]
}
}
78 changes: 78 additions & 0 deletions conf/bench-yaml.json
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"
]
}
}
82 changes: 82 additions & 0 deletions conf/svcomp-yaml-validate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"ana": {
"base": {
"arrays": {
"domain": "partitioned"
}
},
"sv-comp": {
"enabled": true,
"functions": true
},
"int": {
"def_exc": true,
"enums": false,
"interval": true
},
"activated": [
"base",
"threadid",
"threadflag",
"threadreturn",
"mallocWrapper",
"mutexEvents",
"mutex",
"access",
"escape",
"expRelation",
"mhp",
"var_eq",
"symb_locks",
"region",
"thread",
"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"
]
},
"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"
}
}
}
89 changes: 89 additions & 0 deletions conf/svcomp-yaml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"ana": {
"base": {
"arrays": {
"domain": "partitioned"
}
},
"sv-comp": {
"enabled": true,
"functions": true
},
"int": {
"def_exc": true,
"enums": false,
"interval": true
},
"activated": [
"base",
"threadid",
"threadflag",
"threadreturn",
"mallocWrapper",
"mutexEvents",
"mutex",
"access",
"escape",
"expRelation",
"mhp",
"var_eq",
"symb_locks",
"region",
"thread"
],
"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"
]
}
},
"exp": {
"region-offsets": true
},
"witness": {
"enabled": false,
"yaml": {
"enabled": true
},
"invariant": {
"exact": false,
"exclude-vars": [
"tmp\\(___[0-9]+\\)?",
"cond",
"RETURN",
"__\\(cil_\\)?tmp_?[0-9]*\\(_[0-9]+\\)?",
".*____CPAchecker_TMP_[0-9]+",
"__VERIFIER_assert__cond",
"__ksymtab_.*",
"\\(ldv_state_variable\\|ldv_timer_state\\|ldv_timer_list\\|ldv_irq_\\(line_\\|data_\\)?[0-9]+\\|ldv_retval\\)_[0-9]+"
]
}
},
"solver": "td3",
"sem": {
"unknown_function": {
"spawn": false
},
"int": {
"signed_overflow": "assume_none"
}
}
}
Loading