Skip to content

Commit eb01fae

Browse files
Use goto verifier for all-properties in JBMC
1 parent 3d3a892 commit eb01fae

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>
@@ -586,13 +588,30 @@ int jbmc_parse_optionst::doit()
586588
}
587589
}
588590

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

0 commit comments

Comments
 (0)