Skip to content

Commit 1d6cca8

Browse files
committed
Fix handling of --incremental-loop with non-inremental solver
This check was previously broken because the name of the option in the check did not match the name used in the command line parsing.
1 parent 63def85 commit 1d6cca8

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CORE
2+
main.c
3+
--incremental-loop main.0 --unwinding-assertions --dimacs
4+
^Invalid User Input$
5+
^Option: --incremental-loop$
6+
^Reason: the chosen solver does not support incremental solving$
7+
^EXIT=1$
8+
^SIGNAL=0$
9+
--
10+
^warning: ignoring
11+
^Unwinding loop
12+
--
13+
Test that an appropriate error is shown when using --incremental-loop in
14+
combination with a solver which does not support incremental solving.

src/goto-checker/solver_factory.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ void solver_factoryt::no_incremental_check()
411411
{
412412
const bool all_properties = options.get_bool_option("all-properties");
413413
const bool cover = options.is_set("cover");
414-
const bool incremental_check = options.is_set("incremental-check");
414+
const bool incremental_loop = options.is_set("incremental-loop");
415415

416416
if(all_properties)
417417
{
@@ -424,10 +424,10 @@ void solver_factoryt::no_incremental_check()
424424
throw invalid_command_line_argument_exceptiont(
425425
"the chosen solver does not support incremental solving", "--cover");
426426
}
427-
else if(incremental_check)
427+
else if(incremental_loop)
428428
{
429429
throw invalid_command_line_argument_exceptiont(
430430
"the chosen solver does not support incremental solving",
431-
"--incremental-check");
431+
"--incremental-loop");
432432
}
433433
}

0 commit comments

Comments
 (0)