Skip to content

Commit 74caeca

Browse files
authored
Merge pull request #4389 from smowton/smowton/cleanup/validate-model-before-show
Move validate-goto-model before show-goto-functions
2 parents 7dadeee + f940996 commit 74caeca

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,6 @@ int jbmc_parse_optionst::doit()
549549
if(set_properties(goto_model))
550550
return 7; // should contemplate EX_USAGE from sysexits.h
551551

552-
if(cmdline.isset("validate-goto-model"))
553-
{
554-
goto_model.validate();
555-
}
556-
557552
if(
558553
options.get_bool_option("program-only") ||
559554
options.get_bool_option("show-vcc"))
@@ -769,6 +764,11 @@ int jbmc_parse_optionst::get_goto_program(
769764
if(goto_model == nullptr)
770765
return 6;
771766

767+
if(cmdline.isset("validate-goto-model"))
768+
{
769+
goto_model->validate();
770+
}
771+
772772
// show it?
773773
if(cmdline.isset("show-loops"))
774774
{

src/cbmc/cbmc_parse_options.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,6 @@ int cbmc_parse_optionst::doit()
557557
if(set_properties())
558558
return CPROVER_EXIT_SET_PROPERTIES_FAILED;
559559

560-
if(cmdline.isset("validate-goto-model"))
561-
{
562-
goto_model.validate();
563-
}
564-
565560
if(
566561
options.get_bool_option("program-only") ||
567562
options.get_bool_option("show-vcc"))
@@ -713,6 +708,11 @@ int cbmc_parse_optionst::get_goto_program(
713708
if(cbmc_parse_optionst::process_goto_program(goto_model, options, log))
714709
return CPROVER_EXIT_INTERNAL_ERROR;
715710

711+
if(cmdline.isset("validate-goto-model"))
712+
{
713+
goto_model.validate();
714+
}
715+
716716
// show it?
717717
if(cmdline.isset("show-loops"))
718718
{

0 commit comments

Comments
 (0)