File tree Expand file tree Collapse file tree 5 files changed +35
-2
lines changed
regression/cbmc-incr-oneloop/ignore-before-unwind Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 0
4+ ^EXIT=10$
5+ ^SIGNAL=0$
6+ ^\[main.assertion.\d+\] line \d+ property: FAILURE$
7+ ^VERIFICATION FAILED$
8+ --
9+ ^warning: ignoring
10+ --
11+ This test correctly fails because the first iteration of the loop violates the
12+ property.
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 1
4+ ^EXIT=10$
5+ ^SIGNAL=0$
6+ ^\[main.assertion.\d+\] line \d+ property: FAILURE$
7+ ^VERIFICATION FAILED$
8+ --
9+ ^warning: ignoring
10+ --
11+ This test correctly fails because the first iteration of the loop violates the
12+ property.
Original file line number Diff line number Diff line change 11CORE
22main.c
3- --ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 1
3+ --ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 2
44^EXIT=0$
55^SIGNAL=0$
66^VERIFICATION SUCCESSFUL$
Original file line number Diff line number Diff line change @@ -221,6 +221,11 @@ void run_property_decider(
221221 " of loop L\n " \
222222 " (use --show-loops to get the loop IDs)\n " \
223223 " --unwind-min nr start incremental-loop after nr unwindings\n " \
224+ " but before solving that iteration. If for\n " \
225+ " example it is 1, then the loop will be\n " \
226+ " unwound once, and immediately checked.\n " \
227+ " Note: this means for min-unwind 1 or\n " \
228+ " 0 all properties are checked.\n " \
224229 " --unwind-max nr stop incremental-loop after nr unwindings\n " \
225230 " --ignore-properties-before-unwind-min\n " \
226231 " do not check properties before unwind-min\n " \
Original file line number Diff line number Diff line change @@ -37,8 +37,12 @@ symex_bmc_incremental_one_loopt::symex_bmc_incremental_one_loopt(
3737 : 0),
3838 output_ui(output_ui)
3939{
40+ // the intended behaviour is to stop asserts that are violated before the
41+ // unwind
42+ // therefore if the min-unwind is 1, then we do one unwind and immediately
43+ // start checking for properties
4044 ignore_assertions =
41- incr_min_unwind >= 1 &&
45+ incr_min_unwind > 1 &&
4246 options.get_bool_option (" ignore-properties-before-unwind-min" );
4347}
4448
You can’t perform that action at this time.
0 commit comments