Skip to content

Commit 64974b0

Browse files
Merge pull request #6126 from thomasspriggs/tas/solver_factory_cleanup
Solver factory cleanup
2 parents be9b3b4 + 1d6cca8 commit 64974b0

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
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
}

src/goto-checker/solver_factory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class propt;
2323
class decision_proceduret;
2424
class stack_decision_proceduret;
2525

26-
class solver_factoryt
26+
class solver_factoryt final
2727
{
2828
public:
2929
/// Note: The solver returned will hold a reference to the namespace `ns`.
@@ -35,7 +35,7 @@ class solver_factoryt
3535

3636
// The solver class,
3737
// which owns a variety of allocated objects.
38-
class solvert
38+
class solvert final
3939
{
4040
public:
4141
solvert() = default;

0 commit comments

Comments
 (0)