Skip to content

Commit 23db0a5

Browse files
goto_diff_parse_options is not a message
In addition the class already inherits a log field of type messaget.
1 parent 0e212f1 commit 23db0a5

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Author: Peter Schrammel
6565

6666
goto_diff_parse_optionst::goto_diff_parse_optionst(int argc, const char **argv)
6767
: parse_options_baset(GOTO_DIFF_OPTIONS, argc, argv, ui_message_handler),
68-
messaget(ui_message_handler),
6968
ui_message_handler(cmdline, std::string("GOTO-DIFF ") + CBMC_VERSION)
7069
{
7170
}
@@ -201,8 +200,8 @@ void goto_diff_parse_optionst::get_command_line_options(optionst &options)
201200
if(options.get_bool_option("partial-loops") &&
202201
options.get_bool_option("unwinding-assertions"))
203202
{
204-
error() << "--partial-loops and --unwinding-assertions"
205-
<< " must not be given together" << eom;
203+
log.error() << "--partial-loops and --unwinding-assertions"
204+
<< " must not be given together" << messaget::eom;
206205
exit(1);
207206
}
208207

@@ -224,19 +223,19 @@ int goto_diff_parse_optionst::doit()
224223

225224
optionst options;
226225
get_command_line_options(options);
227-
eval_verbosity(
226+
messaget::eval_verbosity(
228227
cmdline.get_value("verbosity"), messaget::M_STATISTICS, ui_message_handler);
229228

230229
//
231230
// Print a banner
232231
//
233-
status() << "GOTO-DIFF version " << CBMC_VERSION << " " << sizeof(void *) * 8
232+
log.status() << "GOTO-DIFF version " << CBMC_VERSION << " " << sizeof(void *) * 8
234233
<< "-bit " << config.this_architecture() << " "
235-
<< config.this_operating_system() << eom;
234+
<< config.this_operating_system() << messaget::eom;
236235

237236
if(cmdline.args.size()!=2)
238237
{
239-
error() << "Please provide two programs to compare" << eom;
238+
log.error() << "Please provide two programs to compare" << messaget::eom;
240239
return CPROVER_EXIT_INCORRECT_TASK;
241240
}
242241

@@ -264,12 +263,12 @@ int goto_diff_parse_optionst::doit()
264263
{
265264
show_goto_functions(
266265
goto_model1,
267-
get_message_handler(),
266+
log.get_message_handler(),
268267
ui_message_handler.get_ui(),
269268
cmdline.isset("list-goto-functions"));
270269
show_goto_functions(
271270
goto_model2,
272-
get_message_handler(),
271+
log.get_message_handler(),
273272
ui_message_handler.get_ui(),
274273
cmdline.isset("list-goto-functions"));
275274
return CPROVER_EXIT_SUCCESS;
@@ -321,16 +320,16 @@ bool goto_diff_parse_optionst::process_goto_program(
321320
remove_asm(goto_model);
322321

323322
// add the library
324-
status() << "Adding CPROVER library (" << config.ansi_c.arch << ")" << eom;
323+
log.status() << "Adding CPROVER library (" << config.ansi_c.arch << ")" << messaget::eom;
325324
link_to_library(
326-
goto_model, get_message_handler(), cprover_cpp_library_factory);
325+
goto_model, log.get_message_handler(), cprover_cpp_library_factory);
327326
link_to_library(
328-
goto_model, get_message_handler(), cprover_c_library_factory);
327+
goto_model, log.get_message_handler(), cprover_c_library_factory);
329328

330329
// remove function pointers
331-
status() << "Removal of function pointers and virtual functions" << eom;
330+
log.status() << "Removal of function pointers and virtual functions" << messaget::eom;
332331
remove_function_pointers(
333-
get_message_handler(), goto_model, cmdline.isset("pointer-check"));
332+
log.get_message_handler(), goto_model, cmdline.isset("pointer-check"));
334333

335334
mm_io(goto_model);
336335

@@ -344,7 +343,7 @@ bool goto_diff_parse_optionst::process_goto_program(
344343
rewrite_union(goto_model);
345344

346345
// add generic checks
347-
status() << "Generic Property Instrumentation" << eom;
346+
log.status() << "Generic Property Instrumentation" << messaget::eom;
348347
goto_check(options, goto_model);
349348

350349
// checks don't know about adjusted float expressions
@@ -364,9 +363,9 @@ bool goto_diff_parse_optionst::process_goto_program(
364363
remove_skip(goto_model);
365364

366365
const auto cover_config = get_cover_config(
367-
options, goto_model.symbol_table, get_message_handler());
366+
options, goto_model.symbol_table, log.get_message_handler());
368367
if(instrument_cover_goals(
369-
cover_config, goto_model, get_message_handler()))
368+
cover_config, goto_model, log.get_message_handler()))
370369
return true;
371370
}
372371

src/goto-diff/goto_diff_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class optionst;
3939
"(compact-output)"
4040
// clang-format on
4141

42-
class goto_diff_parse_optionst : public parse_options_baset, public messaget
42+
class goto_diff_parse_optionst : public parse_options_baset
4343
{
4444
public:
4545
virtual int doit();

0 commit comments

Comments
 (0)