Skip to content

Commit 81f6c6b

Browse files
Use goto verifier for all-properties in JBMC
1 parent fcf615f commit 81f6c6b

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Author: Daniel Kroening, [email protected]
2828
#include <ansi-c/ansi_c_language.h>
2929

3030
#include <goto-checker/all_properties_verifier.h>
31+
#include <goto-checker/all_properties_verifier_with_trace_storage.h>
3132

3233
#include <goto-programs/adjust_float_expressions.h>
3334
#include <goto-programs/lazy_goto_model.h>
@@ -62,6 +63,7 @@ Author: Daniel Kroening, [email protected]
6263
#include <java_bytecode/convert_java_nondet.h>
6364
#include <java_bytecode/java_bytecode_language.h>
6465
#include <java_bytecode/java_enum_static_init_unwind_handler.h>
66+
#include <java_bytecode/java_multi_path_symex_checker.h>
6567
#include <java_bytecode/java_multi_path_symex_only_checker.h>
6668
#include <java_bytecode/remove_exceptions.h>
6769
#include <java_bytecode/remove_instanceof.h>
@@ -579,13 +581,30 @@ int jbmc_parse_optionst::doit()
579581
}
580582
}
581583

582-
// The `configure_bmc` callback passed will enable enum-unwind-static if
583-
// applicable.
584-
return bmct::do_language_agnostic_bmc(
585-
options,
586-
goto_model,
587-
ui_message_handler,
588-
configure_bmc);
584+
std::unique_ptr<goto_verifiert> verifier = nullptr;
585+
586+
if(!options.get_bool_option("paths") && !options.is_set("cover"))
587+
{
588+
if(!options.get_bool_option("stop-on-fail"))
589+
{
590+
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
591+
java_multi_path_symex_checkert>>(
592+
options, ui_message_handler, goto_model);
593+
}
594+
}
595+
596+
// fall back until everything has been ported to goto-checker
597+
if(verifier == nullptr)
598+
{
599+
// The `configure_bmc` callback passed will enable enum-unwind-static if
600+
// applicable.
601+
return bmct::do_language_agnostic_bmc(
602+
options, goto_model, ui_message_handler, configure_bmc);
603+
}
604+
605+
resultt result = (*verifier)();
606+
verifier->report();
607+
return result_to_exit_code(result);
589608
}
590609
else
591610
{

0 commit comments

Comments
 (0)