Skip to content

Commit 28305eb

Browse files
Use goto verifier for --cover in CBMC
instead of bmc_covert
1 parent fafd665 commit 28305eb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Author: Daniel Kroening, kroening@kroening.com
3434
#include <goto-checker/all_properties_verifier.h>
3535
#include <goto-checker/all_properties_verifier_with_trace_storage.h>
3636
#include <goto-checker/bmc_util.h>
37+
#include <goto-checker/cover_goals_verifier_with_trace_storage.h>
3738
#include <goto-checker/multi_path_symex_checker.h>
3839
#include <goto-checker/multi_path_symex_only_checker.h>
3940
#include <goto-checker/properties.h>
@@ -72,6 +73,7 @@ Author: Daniel Kroening, kroening@kroening.com
7273

7374
#include <langapi/mode.h>
7475

76+
#include "c_test_input_generator.h"
7577
#include "xml_interface.h"
7678

7779
cbmc_parse_optionst::cbmc_parse_optionst(int argc, const char **argv)
@@ -570,6 +572,19 @@ int cbmc_parse_optionst::doit()
570572
}
571573
}
572574

575+
if(options.is_set("cover"))
576+
{
577+
cover_goals_verifier_with_trace_storaget<multi_path_symex_checkert>
578+
verifier(options, ui_message_handler, goto_model);
579+
(void)verifier();
580+
verifier.report();
581+
582+
c_test_input_generatort test_generator(ui_message_handler, options);
583+
test_generator(verifier.get_traces());
584+
585+
return CPROVER_EXIT_SUCCESS;
586+
}
587+
573588
std::unique_ptr<goto_verifiert> verifier = nullptr;
574589

575590
if(
@@ -599,6 +614,7 @@ int cbmc_parse_optionst::doit()
599614

600615
resultt result = (*verifier)();
601616
verifier->report();
617+
602618
return result_to_exit_code(result);
603619
}
604620

0 commit comments

Comments
 (0)