Skip to content

Commit 28435fe

Browse files
Use goto verifier for fault localization in JBMC
Available by using multi-path symex checker
1 parent 19f2cec commit 28435fe

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

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

3131
#include <goto-checker/all_properties_verifier.h>
32+
#include <goto-checker/all_properties_verifier_with_fault_localization.h>
3233
#include <goto-checker/all_properties_verifier_with_trace_storage.h>
3334
#include <goto-checker/stop_on_fail_verifier.h>
35+
#include <goto-checker/stop_on_fail_verifier_with_fault_localization.h>
3436

3537
#include <goto-programs/adjust_float_expressions.h>
3638
#include <goto-programs/lazy_goto_model.h>
@@ -613,9 +615,19 @@ int jbmc_parse_optionst::doit()
613615
}
614616
else
615617
{
616-
verifier = util_make_unique<
617-
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
618-
options, ui_message_handler, goto_model);
618+
if(options.get_bool_option("localize-faults"))
619+
{
620+
verifier =
621+
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
622+
java_multi_path_symex_checkert>>(
623+
options, ui_message_handler, goto_model);
624+
}
625+
else
626+
{
627+
verifier = util_make_unique<
628+
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
629+
options, ui_message_handler, goto_model);
630+
}
619631
}
620632
}
621633
else
@@ -629,10 +641,20 @@ int jbmc_parse_optionst::doit()
629641
}
630642
else
631643
{
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);
644+
if(options.get_bool_option("localize-faults"))
645+
{
646+
verifier =
647+
util_make_unique<all_properties_verifier_with_fault_localizationt<
648+
java_multi_path_symex_checkert>>(
649+
options, ui_message_handler, goto_model);
650+
}
651+
else
652+
{
653+
verifier =
654+
util_make_unique<all_properties_verifier_with_trace_storaget<
655+
java_multi_path_symex_checkert>>(
656+
options, ui_message_handler, goto_model);
657+
}
636658
}
637659
}
638660
}

0 commit comments

Comments
 (0)