Skip to content

Commit 5cc675e

Browse files
Use goto verifier for --paths in CBMC
We can now use single_path_symex_checkert instead of bmct.
1 parent a588d80 commit 5cc675e

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Author: Daniel Kroening, [email protected]
4040
#include <goto-checker/multi_path_symex_checker.h>
4141
#include <goto-checker/multi_path_symex_only_checker.h>
4242
#include <goto-checker/properties.h>
43+
#include <goto-checker/single_path_symex_checker.h>
4344
#include <goto-checker/single_path_symex_only_checker.h>
4445
#include <goto-checker/stop_on_fail_verifier.h>
4546

@@ -579,13 +580,20 @@ int cbmc_parse_optionst::doit()
579580
if(
580581
options.get_bool_option("dimacs") || !options.get_option("outfile").empty())
581582
{
582-
if(!options.get_bool_option("paths"))
583+
if(options.get_bool_option("paths"))
583584
{
584-
stop_on_fail_verifiert<multi_path_symex_checkert> verifier(
585+
stop_on_fail_verifiert<single_path_symex_checkert> verifier(
585586
options, ui_message_handler, goto_model);
586587
(void)verifier();
587-
return CPROVER_EXIT_SUCCESS;
588588
}
589+
else
590+
{
591+
stop_on_fail_verifiert<multi_path_symex_checkert> verifier(
592+
options, ui_message_handler, goto_model);
593+
(void)verifier();
594+
}
595+
596+
return CPROVER_EXIT_SUCCESS;
589597
}
590598

591599
if(options.is_set("cover"))
@@ -604,20 +612,36 @@ int cbmc_parse_optionst::doit()
604612
std::unique_ptr<goto_verifiert> verifier = nullptr;
605613

606614
if(
607-
!options.get_bool_option("paths") && !options.is_set("cover") &&
608-
!options.get_bool_option("dimacs") && options.get_option("outfile").empty())
615+
!options.is_set("cover") && !options.get_bool_option("dimacs") &&
616+
options.get_option("outfile").empty())
609617
{
610618
if(options.get_bool_option("stop-on-fail"))
611619
{
612-
verifier =
613-
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
614-
options, ui_message_handler, goto_model);
620+
if(options.get_bool_option("paths"))
621+
{
622+
verifier =
623+
util_make_unique<stop_on_fail_verifiert<single_path_symex_checkert>>(
624+
options, ui_message_handler, goto_model);
625+
}
626+
else
627+
{
628+
verifier =
629+
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
630+
options, ui_message_handler, goto_model);
631+
}
615632
}
616633
else
617634
{
618-
verifier = util_make_unique<
619-
all_properties_verifier_with_trace_storaget<multi_path_symex_checkert>>(
620-
options, ui_message_handler, goto_model);
635+
if(options.get_bool_option("paths"))
636+
{
637+
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
638+
single_path_symex_checkert>>(options, ui_message_handler, goto_model);
639+
}
640+
else
641+
{
642+
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
643+
multi_path_symex_checkert>>(options, ui_message_handler, goto_model);
644+
}
621645
}
622646
}
623647

0 commit comments

Comments
 (0)