Skip to content

Commit 492866a

Browse files
Use goto verifier for all-properties in JBMC
1 parent 0c5c3ea commit 492866a

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 30 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,34 @@ 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+
596+
if(!options.get_bool_option("stop-on-fail"))
597+
{
598+
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
599+
java_multi_path_symex_checkert>>(
600+
options, ui_message_handler, goto_model);
601+
}
602+
}
603+
604+
// fall back until everything has been ported to goto-checker
605+
if(verifier == nullptr)
606+
{
607+
// The `configure_bmc` callback passed will enable enum-unwind-static if
608+
// applicable.
609+
return bmct::do_language_agnostic_bmc(
610+
options,
611+
goto_model,
612+
ui_message_handler,
613+
configure_bmc);
614+
}
615+
616+
resultt result = (*verifier)();
617+
verifier->report();
618+
return result_to_exit_code(result);
596619
}
597620
else
598621
{

0 commit comments

Comments
 (0)