@@ -35,34 +35,35 @@ smt2_dect::solvert solver_factoryt::get_smt2_solver_type() const
35
35
// we shouldn't get here if this option isn't set
36
36
PRECONDITION (options.get_bool_option (" smt2" ));
37
37
38
- smt2_dect::solvert s= smt2_dect::solvert::GENERIC;
38
+ smt2_dect::solvert s = smt2_dect::solvert::GENERIC;
39
39
40
40
if (options.get_bool_option (" boolector" ))
41
- s= smt2_dect::solvert::BOOLECTOR;
41
+ s = smt2_dect::solvert::BOOLECTOR;
42
42
else if (options.get_bool_option (" cprover-smt2" ))
43
43
s = smt2_dect::solvert::CPROVER_SMT2;
44
44
else if (options.get_bool_option (" mathsat" ))
45
- s= smt2_dect::solvert::MATHSAT;
45
+ s = smt2_dect::solvert::MATHSAT;
46
46
else if (options.get_bool_option (" cvc3" ))
47
- s= smt2_dect::solvert::CVC3;
47
+ s = smt2_dect::solvert::CVC3;
48
48
else if (options.get_bool_option (" cvc4" ))
49
- s= smt2_dect::solvert::CVC4;
49
+ s = smt2_dect::solvert::CVC4;
50
50
else if (options.get_bool_option (" yices" ))
51
- s= smt2_dect::solvert::YICES;
51
+ s = smt2_dect::solvert::YICES;
52
52
else if (options.get_bool_option (" z3" ))
53
- s= smt2_dect::solvert::Z3;
53
+ s = smt2_dect::solvert::Z3;
54
54
else if (options.get_bool_option (" generic" ))
55
- s= smt2_dect::solvert::GENERIC;
55
+ s = smt2_dect::solvert::GENERIC;
56
56
57
57
return s;
58
58
}
59
59
60
60
std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_default ()
61
61
{
62
- auto solver= util_make_unique<solvert>();
62
+ auto solver = util_make_unique<solvert>();
63
63
64
- if (options.get_bool_option (" beautify" ) ||
65
- !options.get_bool_option (" sat-preprocessor" )) // no simplifier
64
+ if (
65
+ options.get_bool_option (" beautify" ) ||
66
+ !options.get_bool_option (" sat-preprocessor" )) // no simplifier
66
67
{
67
68
// simplifier won't work with beautification
68
69
solver->set_prop (util_make_unique<satcheck_no_simplifiert>());
@@ -76,9 +77,9 @@ std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_default()
76
77
77
78
auto bv_pointers = util_make_unique<bv_pointerst>(ns, solver->prop ());
78
79
79
- if (options.get_option (" arrays-uf" )== " never" )
80
+ if (options.get_option (" arrays-uf" ) == " never" )
80
81
bv_pointers->unbounded_array = bv_pointerst::unbounded_arrayt::U_NONE;
81
- else if (options.get_option (" arrays-uf" )== " always" )
82
+ else if (options.get_option (" arrays-uf" ) == " always" )
82
83
bv_pointers->unbounded_array = bv_pointerst::unbounded_arrayt::U_ALL;
83
84
84
85
solver->set_prop_conv (std::move (bv_pointers));
@@ -91,19 +92,18 @@ std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_dimacs()
91
92
no_beautification ();
92
93
no_incremental_check ();
93
94
94
- auto prop= util_make_unique<dimacs_cnft>();
95
+ auto prop = util_make_unique<dimacs_cnft>();
95
96
prop->set_message_handler (message_handler);
96
97
97
- std::string filename= options.get_option (" outfile" );
98
+ std::string filename = options.get_option (" outfile" );
98
99
99
100
auto bv_dimacs = util_make_unique<bv_dimacst>(ns, *prop, filename);
100
101
return util_make_unique<solvert>(std::move (bv_dimacs), std::move (prop));
101
102
}
102
103
103
104
std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_bv_refinement ()
104
105
{
105
- std::unique_ptr<propt> prop=[this ]() -> std::unique_ptr<propt>
106
- {
106
+ std::unique_ptr<propt> prop = [this ]() -> std::unique_ptr<propt> {
107
107
// We offer the option to disable the SAT preprocessor
108
108
if (options.get_bool_option (" sat-preprocessor" ))
109
109
{
@@ -116,21 +116,20 @@ std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_bv_refinement()
116
116
prop->set_message_handler (message_handler);
117
117
118
118
bv_refinementt::infot info;
119
- info.ns = &ns;
120
- info.prop = prop.get ();
119
+ info.ns = &ns;
120
+ info.prop = prop.get ();
121
121
info.output_xml = output_xml_in_refinement;
122
122
123
123
// we allow setting some parameters
124
124
if (options.get_bool_option (" max-node-refinement" ))
125
- info.max_node_refinement =
125
+ info.max_node_refinement =
126
126
options.get_unsigned_int_option (" max-node-refinement" );
127
127
128
- info.refine_arrays = options.get_bool_option (" refine-arrays" );
129
- info.refine_arithmetic = options.get_bool_option (" refine-arithmetic" );
128
+ info.refine_arrays = options.get_bool_option (" refine-arrays" );
129
+ info.refine_arithmetic = options.get_bool_option (" refine-arithmetic" );
130
130
131
131
return util_make_unique<solvert>(
132
- util_make_unique<bv_refinementt>(info),
133
- std::move (prop));
132
+ util_make_unique<bv_refinementt>(info), std::move (prop));
134
133
}
135
134
136
135
// / the string refinement adds to the bit vector refinement specifications for
@@ -140,17 +139,17 @@ std::unique_ptr<solver_factoryt::solvert>
140
139
solver_factoryt::get_string_refinement ()
141
140
{
142
141
string_refinementt::infot info;
143
- info.ns = &ns;
144
- auto prop= util_make_unique<satcheck_no_simplifiert>();
142
+ info.ns = &ns;
143
+ auto prop = util_make_unique<satcheck_no_simplifiert>();
145
144
prop->set_message_handler (message_handler);
146
- info.prop = prop.get ();
147
- info.refinement_bound = DEFAULT_MAX_NB_REFINEMENT;
145
+ info.prop = prop.get ();
146
+ info.refinement_bound = DEFAULT_MAX_NB_REFINEMENT;
148
147
info.output_xml = output_xml_in_refinement;
149
148
if (options.get_bool_option (" max-node-refinement" ))
150
- info.max_node_refinement =
149
+ info.max_node_refinement =
151
150
options.get_unsigned_int_option (" max-node-refinement" );
152
- info.refine_arrays = options.get_bool_option (" refine-arrays" );
153
- info.refine_arithmetic = options.get_bool_option (" refine-arithmetic" );
151
+ info.refine_arrays = options.get_bool_option (" refine-arrays" );
152
+ info.refine_arithmetic = options.get_bool_option (" refine-arithmetic" );
154
153
155
154
return util_make_unique<solvert>(
156
155
util_make_unique<string_refinementt>(info), std::move (prop));
@@ -161,11 +160,11 @@ solver_factoryt::get_smt2(smt2_dect::solvert solver)
161
160
{
162
161
no_beautification ();
163
162
164
- const std::string &filename= options.get_option (" outfile" );
163
+ const std::string &filename = options.get_option (" outfile" );
165
164
166
- if (filename== " " )
165
+ if (filename == " " )
167
166
{
168
- if (solver== smt2_dect::solvert::GENERIC)
167
+ if (solver == smt2_dect::solvert::GENERIC)
169
168
{
170
169
throw invalid_command_line_argument_exceptiont (
171
170
" required filename not provided" ,
@@ -181,11 +180,11 @@ solver_factoryt::get_smt2(smt2_dect::solvert solver)
181
180
solver);
182
181
183
182
if (options.get_bool_option (" fpa" ))
184
- smt2_dec->use_FPA_theory = true ;
183
+ smt2_dec->use_FPA_theory = true ;
185
184
186
185
return util_make_unique<solvert>(std::move (smt2_dec));
187
186
}
188
- else if (filename== " -" )
187
+ else if (filename == " -" )
189
188
{
190
189
auto smt2_conv = util_make_unique<smt2_convt>(
191
190
ns,
@@ -196,19 +195,19 @@ solver_factoryt::get_smt2(smt2_dect::solvert solver)
196
195
std::cout);
197
196
198
197
if (options.get_bool_option (" fpa" ))
199
- smt2_conv->use_FPA_theory = true ;
198
+ smt2_conv->use_FPA_theory = true ;
200
199
201
200
smt2_conv->set_message_handler (message_handler);
202
201
203
202
return util_make_unique<solvert>(std::move (smt2_conv));
204
203
}
205
204
else
206
205
{
207
- #ifdef _MSC_VER
208
- auto out= util_make_unique<std::ofstream>(widen (filename));
209
- #else
210
- auto out= util_make_unique<std::ofstream>(filename);
211
- #endif
206
+ #ifdef _MSC_VER
207
+ auto out = util_make_unique<std::ofstream>(widen (filename));
208
+ #else
209
+ auto out = util_make_unique<std::ofstream>(filename);
210
+ #endif
212
211
213
212
if (!*out)
214
213
{
@@ -225,7 +224,7 @@ solver_factoryt::get_smt2(smt2_dect::solvert solver)
225
224
*out);
226
225
227
226
if (options.get_bool_option (" fpa" ))
228
- smt2_conv->use_FPA_theory = true ;
227
+ smt2_conv->use_FPA_theory = true ;
229
228
230
229
smt2_conv->set_message_handler (message_handler);
231
230
0 commit comments