Skip to content

Commit 19f2cec

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

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Author: Daniel Kroening, [email protected]
3434
#include <cpp/cprover_library.h>
3535

3636
#include <goto-checker/all_properties_verifier.h>
37+
#include <goto-checker/all_properties_verifier_with_fault_localization.h>
3738
#include <goto-checker/all_properties_verifier_with_trace_storage.h>
3839
#include <goto-checker/bmc_util.h>
3940
#include <goto-checker/cover_goals_verifier_with_trace_storage.h>
@@ -43,6 +44,7 @@ Author: Daniel Kroening, [email protected]
4344
#include <goto-checker/single_path_symex_checker.h>
4445
#include <goto-checker/single_path_symex_only_checker.h>
4546
#include <goto-checker/stop_on_fail_verifier.h>
47+
#include <goto-checker/stop_on_fail_verifier_with_fault_localization.h>
4648

4749
#include <goto-programs/adjust_float_expressions.h>
4850
#include <goto-programs/initialize_goto_model.h>
@@ -625,9 +627,19 @@ int cbmc_parse_optionst::doit()
625627
}
626628
else
627629
{
628-
verifier =
629-
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
630-
options, ui_message_handler, goto_model);
630+
if(options.get_bool_option("localize-faults"))
631+
{
632+
verifier =
633+
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
634+
multi_path_symex_checkert>>(
635+
options, ui_message_handler, goto_model);
636+
}
637+
else
638+
{
639+
verifier =
640+
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
641+
options, ui_message_handler, goto_model);
642+
}
631643
}
632644
}
633645
else
@@ -639,8 +651,20 @@ int cbmc_parse_optionst::doit()
639651
}
640652
else
641653
{
642-
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
643-
multi_path_symex_checkert>>(options, ui_message_handler, goto_model);
654+
if(options.get_bool_option("localize-faults"))
655+
{
656+
verifier =
657+
util_make_unique<all_properties_verifier_with_fault_localizationt<
658+
multi_path_symex_checkert>>(
659+
options, ui_message_handler, goto_model);
660+
}
661+
else
662+
{
663+
verifier =
664+
util_make_unique<all_properties_verifier_with_trace_storaget<
665+
multi_path_symex_checkert>>(
666+
options, ui_message_handler, goto_model);
667+
}
644668
}
645669
}
646670
}

0 commit comments

Comments
 (0)