Skip to content

Commit 96fec16

Browse files
Use goto verifier for --paths in JBMC
We can now use single_path_symex_checkert instead of bmct.
1 parent af39a8b commit 96fec16

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Author: Daniel Kroening, [email protected]
6666
#include <java_bytecode/java_enum_static_init_unwind_handler.h>
6767
#include <java_bytecode/java_multi_path_symex_checker.h>
6868
#include <java_bytecode/java_multi_path_symex_only_checker.h>
69+
#include <java_bytecode/java_single_path_symex_checker.h>
70+
#include <java_bytecode/java_single_path_symex_only_checker.h>
6971
#include <java_bytecode/remove_exceptions.h>
7072
#include <java_bytecode/remove_instanceof.h>
7173
#include <java_bytecode/remove_java_new.h>
@@ -559,46 +561,79 @@ int jbmc_parse_optionst::doit()
559561
options.get_bool_option("program-only") ||
560562
options.get_bool_option("show-vcc"))
561563
{
562-
if(!options.get_bool_option("paths"))
564+
if(options.get_bool_option("paths"))
565+
{
566+
all_properties_verifiert<java_single_path_symex_only_checkert> verifier(
567+
options, ui_message_handler, goto_model);
568+
(void)verifier();
569+
}
570+
else
563571
{
564572
all_properties_verifiert<java_multi_path_symex_only_checkert> verifier(
565573
options, ui_message_handler, goto_model);
566574
(void)verifier();
567-
return CPROVER_EXIT_SUCCESS;
568575
}
576+
577+
return CPROVER_EXIT_SUCCESS;
569578
}
570579

571580
if(
572581
options.get_bool_option("dimacs") ||
573582
!options.get_option("outfile").empty())
574583
{
575-
if(!options.get_bool_option("paths"))
584+
if(options.get_bool_option("paths"))
585+
{
586+
stop_on_fail_verifiert<java_single_path_symex_checkert> verifier(
587+
options, ui_message_handler, goto_model);
588+
(void)verifier();
589+
}
590+
else
576591
{
577-
stop_on_fail_verifiert<multi_path_symex_checkert> verifier(
592+
stop_on_fail_verifiert<java_multi_path_symex_checkert> verifier(
578593
options, ui_message_handler, goto_model);
579594
(void)verifier();
580-
return CPROVER_EXIT_SUCCESS;
581595
}
596+
597+
return CPROVER_EXIT_SUCCESS;
582598
}
583599

584600
std::unique_ptr<goto_verifiert> verifier = nullptr;
585601

586602
if(
587-
!options.get_bool_option("paths") && !options.is_set("cover") &&
588-
!options.get_bool_option("dimacs") &&
603+
!options.is_set("cover") && !options.get_bool_option("dimacs") &&
589604
options.get_option("outfile").empty())
590605
{
591606
if(options.get_bool_option("stop-on-fail"))
592607
{
593-
verifier = util_make_unique<
594-
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
595-
options, ui_message_handler, goto_model);
608+
if(options.get_bool_option("paths"))
609+
{
610+
verifier = util_make_unique<
611+
stop_on_fail_verifiert<java_single_path_symex_checkert>>(
612+
options, ui_message_handler, goto_model);
613+
}
614+
else
615+
{
616+
verifier = util_make_unique<
617+
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
618+
options, ui_message_handler, goto_model);
619+
}
596620
}
597621
else
598622
{
599-
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
600-
java_multi_path_symex_checkert>>(
601-
options, ui_message_handler, goto_model);
623+
if(options.get_bool_option("paths"))
624+
{
625+
verifier =
626+
util_make_unique<all_properties_verifier_with_trace_storaget<
627+
java_single_path_symex_checkert>>(
628+
options, ui_message_handler, goto_model);
629+
}
630+
else
631+
{
632+
verifier =
633+
util_make_unique<all_properties_verifier_with_trace_storaget<
634+
java_multi_path_symex_checkert>>(
635+
options, ui_message_handler, goto_model);
636+
}
602637
}
603638
}
604639

0 commit comments

Comments
 (0)