Skip to content

Commit e3eaaa5

Browse files
Use goto verifier for stop-on-fail in JBMC
1 parent f658635 commit e3eaaa5

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Author: Daniel Kroening, [email protected]
1919
#include <util/config.h>
2020
#include <util/exit_codes.h>
2121
#include <util/invariant.h>
22+
#include <util/make_unique.h>
2223
#include <util/unicode.h>
2324
#include <util/xml.h>
2425
#include <util/version.h>
@@ -30,6 +31,7 @@ Author: Daniel Kroening, [email protected]
3031
#include <goto-checker/all_properties_verifier.h>
3132
#include <goto-checker/multi_path_symex_checker.h>
3233
#include <goto-checker/multi_path_symex_only_checker.h>
34+
#include <goto-checker/stop_on_fail_verifier.h>
3335

3436
#include <goto-programs/adjust_float_expressions.h>
3537
#include <goto-programs/lazy_goto_model.h>
@@ -571,17 +573,27 @@ int jbmc_parse_optionst::doit()
571573
return result_to_exit_code(result);
572574
}
573575
}
574-
else
576+
577+
if(!options.get_bool_option("paths"))
575578
{
576-
// we do all properties
577-
if(!options.get_bool_option("paths"))
579+
std::unique_ptr<goto_verifiert> verifier;
580+
581+
if(options.get_bool_option("stop-on-fail"))
578582
{
579-
all_properties_verifiert<multi_path_symex_checkert> verifier(
580-
options, ui_message_handler, goto_model);
581-
resultt result = verifier();
582-
verifier.report();
583-
return result_to_exit_code(result);
583+
verifier =
584+
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
585+
options, ui_message_handler, goto_model);
584586
}
587+
else
588+
{
589+
verifier =
590+
util_make_unique<all_properties_verifiert<multi_path_symex_checkert>>(
591+
options, ui_message_handler, goto_model);
592+
}
593+
594+
resultt result = (*verifier)();
595+
verifier->report();
596+
return result_to_exit_code(result);
585597
}
586598

587599
// The `configure_bmc` callback passed will enable enum-unwind-static if

0 commit comments

Comments
 (0)