Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
main.c
--ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 0
^EXIT=10$
^SIGNAL=0$
^\[main.assertion.\d+\] line \d+ property: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
--
This test correctly fails because the first iteration of the loop violates the
property.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
main.c
--ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 1
^EXIT=10$
^SIGNAL=0$
^\[main.assertion.\d+\] line \d+ property: FAILURE$
^VERIFICATION FAILED$
--
^warning: ignoring
--
This test correctly fails because the first iteration of the loop violates the
property.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CORE
main.c
--ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 1
--ignore-properties-before-unwind-min --incremental-loop main.0 --unwind-max 2 --unwind-min 2
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
Expand Down
5 changes: 5 additions & 0 deletions src/goto-checker/bmc_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ void run_property_decider(
" of loop L\n" \
" (use --show-loops to get the loop IDs)\n" \
" --unwind-min nr start incremental-loop after nr unwindings\n" \
" but before solving that iteration. If for\n" \
" example it is 1, then the loop will be\n" \
" unwound once, and immediately checked.\n" \
" Note: this means for min-unwind 1 or\n"\
" 0 all properties are checked.\n" \
" --unwind-max nr stop incremental-loop after nr unwindings\n" \
" --ignore-properties-before-unwind-min\n" \
" do not check properties before unwind-min\n" \
Expand Down
6 changes: 5 additions & 1 deletion src/goto-checker/symex_bmc_incremental_one_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ symex_bmc_incremental_one_loopt::symex_bmc_incremental_one_loopt(
: 0),
output_ui(output_ui)
{
// the intended behaviour is to stop asserts that are violated before the
// unwind
// therefore if the min-unwind is 1, then we do one unwind and immediately
// start checking for properties
ignore_assertions =
incr_min_unwind >= 1 &&
incr_min_unwind > 1 &&
options.get_bool_option("ignore-properties-before-unwind-min");
}

Expand Down