@@ -70,7 +70,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_default()
70
70
solver->set_prop (util_make_unique<satcheckt>());
71
71
}
72
72
73
- solver->prop ().set_message_handler (get_message_handler () );
73
+ solver->prop ().set_message_handler (ui );
74
74
75
75
auto bv_cbmc=util_make_unique<bv_cbmct>(ns, solver->prop ());
76
76
@@ -90,7 +90,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_dimacs()
90
90
no_incremental_check ();
91
91
92
92
auto prop=util_make_unique<dimacs_cnft>();
93
- prop->set_message_handler (get_message_handler () );
93
+ prop->set_message_handler (ui );
94
94
95
95
std::string filename=options.get_option (" outfile" );
96
96
@@ -111,12 +111,12 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_bv_refinement()
111
111
return util_make_unique<satcheck_no_simplifiert>();
112
112
}();
113
113
114
- prop->set_message_handler (get_message_handler () );
114
+ prop->set_message_handler (ui );
115
115
116
116
bv_refinementt::infot info;
117
117
info.ns =&ns;
118
118
info.prop =prop.get ();
119
- info.ui =ui;
119
+ info.ui =ui. get_ui () ;
120
120
121
121
// we allow setting some parameters
122
122
if (options.get_bool_option (" max-node-refinement" ))
@@ -139,10 +139,10 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_string_refinement()
139
139
string_refinementt::infot info;
140
140
info.ns =&ns;
141
141
auto prop=util_make_unique<satcheck_no_simplifiert>();
142
- prop->set_message_handler (get_message_handler () );
142
+ prop->set_message_handler (ui );
143
143
info.prop =prop.get ();
144
144
info.refinement_bound =DEFAULT_MAX_NB_REFINEMENT;
145
- info.ui =ui;
145
+ info.ui =ui. get_ui () ;
146
146
if (options.get_bool_option (" string-max-length" ))
147
147
info.max_string_length = options.get_signed_int_option (" string-max-length" );
148
148
info.trace =options.get_bool_option (" trace" );
@@ -159,6 +159,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_string_refinement()
159
159
std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2 (
160
160
smt2_dect::solvert solver)
161
161
{
162
+ messaget msg (ui);
162
163
no_beautification ();
163
164
164
165
const std::string &filename=options.get_option (" outfile" );
@@ -167,7 +168,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
167
168
{
168
169
if (solver==smt2_dect::solvert::GENERIC)
169
170
{
170
- error () << " please use --outfile" << eom;
171
+ msg. error () << " please use --outfile" << messaget:: eom;
171
172
throw 0 ;
172
173
}
173
174
@@ -198,7 +199,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
198
199
if (options.get_bool_option (" fpa" ))
199
200
smt2_conv->use_FPA_theory =true ;
200
201
201
- smt2_conv->set_message_handler (get_message_handler () );
202
+ smt2_conv->set_message_handler (ui );
202
203
203
204
return util_make_unique<solvert>(std::move (smt2_conv));
204
205
}
@@ -212,7 +213,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
212
213
213
214
if (!*out)
214
215
{
215
- error () << " failed to open " << filename << eom;
216
+ msg. error () << " failed to open " << filename << messaget:: eom;
216
217
throw 0 ;
217
218
}
218
219
@@ -228,7 +229,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
228
229
if (options.get_bool_option (" fpa" ))
229
230
smt2_conv->use_FPA_theory =true ;
230
231
231
- smt2_conv->set_message_handler (get_message_handler () );
232
+ smt2_conv->set_message_handler (ui );
232
233
233
234
return util_make_unique<solvert>(std::move (smt2_conv), std::move (out));
234
235
}
@@ -238,7 +239,8 @@ void cbmc_solverst::no_beautification()
238
239
{
239
240
if (options.get_bool_option (" beautify" ))
240
241
{
241
- error () << " sorry, this solver does not support beautification" << eom;
242
+ messaget (ui).error () << " sorry, this solver does not support beautification"
243
+ << messaget::eom;
242
244
throw 0 ;
243
245
}
244
246
}
@@ -249,7 +251,8 @@ void cbmc_solverst::no_incremental_check()
249
251
options.get_option (" cover" )!=" " ||
250
252
options.get_option (" incremental-check" )!=" " )
251
253
{
252
- error () << " sorry, this solver does not support incremental solving" << eom;
254
+ messaget (ui).error () << " sorry, this solver does not support incremental "
255
+ << " solving" << messaget::eom;
253
256
throw 0 ;
254
257
}
255
258
}
0 commit comments