Skip to content

Commit d3eb1f3

Browse files
Use CPROVER exit codes
1 parent a0e5063 commit d3eb1f3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/goto-diff/goto_diff_parse_options.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ int goto_diff_parse_optionst::doit()
242242
if(cmdline.isset("version"))
243243
{
244244
std::cout << CBMC_VERSION << '\n';
245-
return 0;
245+
return CPROVER_EXIT_SUCCESS;
246246
}
247247

248248
//
@@ -264,7 +264,7 @@ int goto_diff_parse_optionst::doit()
264264
if(cmdline.args.size()!=2)
265265
{
266266
error() << "Please provide two programs to compare" << eom;
267-
return 6;
267+
return CPROVER_EXIT_INCORRECT_TASK;
268268
}
269269

270270
goto_modelt goto_model1, goto_model2;
@@ -282,7 +282,7 @@ int goto_diff_parse_optionst::doit()
282282
{
283283
show_loop_ids(get_ui(), goto_model1);
284284
show_loop_ids(get_ui(), goto_model2);
285-
return true;
285+
return CPROVER_EXIT_SUCCESS;
286286
}
287287

288288
if(
@@ -299,7 +299,7 @@ int goto_diff_parse_optionst::doit()
299299
get_message_handler(),
300300
ui_message_handler.get_ui(),
301301
cmdline.isset("list-goto-functions"));
302-
return 0;
302+
return CPROVER_EXIT_SUCCESS;
303303
}
304304

305305
if(cmdline.isset("change-impact") ||
@@ -318,7 +318,7 @@ int goto_diff_parse_optionst::doit()
318318
impact_mode,
319319
cmdline.isset("compact-output"));
320320

321-
return 0;
321+
return CPROVER_EXIT_SUCCESS;
322322
}
323323

324324
if(cmdline.isset("unified") ||
@@ -328,15 +328,15 @@ int goto_diff_parse_optionst::doit()
328328
u();
329329
u.output(std::cout);
330330

331-
return 0;
331+
return CPROVER_EXIT_SUCCESS;
332332
}
333333

334334
syntactic_difft sd(goto_model1, goto_model2, get_message_handler());
335335
sd.set_ui(get_ui());
336336
sd();
337337
sd.output_functions(std::cout);
338338

339-
return 0;
339+
return CPROVER_EXIT_SUCCESS;
340340
}
341341

342342
int goto_diff_parse_optionst::get_goto_program(
@@ -353,7 +353,7 @@ int goto_diff_parse_optionst::get_goto_program(
353353
goto_model.symbol_table,
354354
goto_model.goto_functions,
355355
languages.get_message_handler()))
356-
return 6;
356+
return CPROVER_EXIT_INCORRECT_TASK;
357357

358358
config.set(cmdline);
359359

@@ -374,7 +374,7 @@ int goto_diff_parse_optionst::get_goto_program(
374374
if(languages.parse() ||
375375
languages.typecheck() ||
376376
languages.final())
377-
return 6;
377+
return CPROVER_EXIT_INCORRECT_TASK;
378378

379379
// we no longer need any parse trees or language files
380380
languages.clear_parse();
@@ -388,7 +388,7 @@ int goto_diff_parse_optionst::get_goto_program(
388388
ui_message_handler);
389389

390390
if(process_goto_program(options, goto_model))
391-
return 6;
391+
return CPROVER_EXIT_INTERNAL_ERROR;
392392

393393
// if we had a second argument then we will handle it next
394394
if(arg2!="")

0 commit comments

Comments
 (0)