Skip to content

Commit 6d5b99e

Browse files
author
Daniel Kroening
committed
cleanout test suite generation from cbmc
1 parent 7de7b27 commit 6d5b99e

File tree

9 files changed

+9
-52
lines changed

9 files changed

+9
-52
lines changed

jbmc/src/jbmc/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ OBJ += ../$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
4040
../$(CPROVER_DIR)/src/json/json$(LIBEXT) \
4141
../$(CPROVER_DIR)/src/cbmc/all_properties$(OBJEXT) \
4242
../$(CPROVER_DIR)/src/cbmc/bmc$(OBJEXT) \
43-
../$(CPROVER_DIR)/src/cbmc/bmc_cover$(OBJEXT) \
4443
../$(CPROVER_DIR)/src/cbmc/bv_cbmc$(OBJEXT) \
4544
../$(CPROVER_DIR)/src/cbmc/cbmc_dimacs$(OBJEXT) \
4645
../$(CPROVER_DIR)/src/cbmc/cbmc_solvers$(OBJEXT) \

jbmc/src/jbmc/jbmc_parse_options.cpp

+5-22
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
121121
if(cmdline.isset("show-vcc"))
122122
options.set_option("show-vcc", true);
123123

124-
if(cmdline.isset("cover"))
125-
parse_cover_options(cmdline, options);
126-
127124
if(cmdline.isset("no-simplify"))
128125
options.set_option("simplify", false);
129126

@@ -185,14 +182,9 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
185182
options.set_option("assumptions", false);
186183

187184
// generate unwinding assertions
188-
if(cmdline.isset("cover"))
189-
options.set_option("unwinding-assertions", false);
190-
else
191-
{
192-
options.set_option(
193-
"unwinding-assertions",
194-
cmdline.isset("unwinding-assertions"));
195-
}
185+
options.set_option(
186+
"unwinding-assertions",
187+
cmdline.isset("unwinding-assertions"));
196188

197189
// generate unwinding assumptions otherwise
198190
options.set_option(
@@ -912,17 +904,9 @@ bool jbmc_parse_optionst::process_goto_functions(
912904
remove_unused_functions(goto_model, get_message_handler());
913905
}
914906

915-
// remove skips such that trivial GOTOs are deleted and not considered
916-
// for coverage annotation:
907+
// remove skips such that trivial GOTOs are deleted
917908
remove_skip(goto_model);
918909

919-
// instrument cover goals
920-
if(cmdline.isset("cover"))
921-
{
922-
if(instrument_cover_goals(options, goto_model, get_message_handler()))
923-
return true;
924-
}
925-
926910
// label the assertions
927911
// This must be done after adding assertions and
928912
// before using the argument of the "property" option.
@@ -966,7 +950,7 @@ bool jbmc_parse_optionst::process_goto_functions(
966950
full_slicer(goto_model);
967951
}
968952

969-
// remove any skips introduced since coverage instrumentation
953+
// remove any skips
970954
remove_skip(goto_model);
971955
}
972956

@@ -1075,7 +1059,6 @@ void jbmc_parse_optionst::help()
10751059
" --no-assertions ignore user assertions\n"
10761060
" --no-assumptions ignore user assumptions\n"
10771061
" --error-label label check that label is unreachable\n"
1078-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
10791062
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
10801063
HELP_REACHABILITY_SLICER
10811064
" --full-slice run full slicer (experimental)\n" // NOLINT(*)

regression/cbmc-cover/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
default: tests.log
22

33
test:
4-
@../test.pl -p -c ../../../src/cbmc/cbmc
4+
@../test.pl -p -c ../../../src/ccover/ccover
55

66
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/cbmc/cbmc
7+
@../test.pl -p -c ../../../src/ccover/ccover
88

99
show:
1010
@for dir in *; do \

src/cbmc/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
SRC = all_properties.cpp \
22
bmc.cpp \
3-
bmc_cover.cpp \
43
bv_cbmc.cpp \
54
cbmc_dimacs.cpp \
65
cbmc_languages.cpp \

src/cbmc/bmc.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,6 @@ safety_checkert::resultt bmct::execute(
380380
return safety_checkert::resultt::SAFE; // to indicate non-error
381381
}
382382

383-
if(!options.get_list_option("cover").empty())
384-
{
385-
return cover(goto_functions)?
386-
safety_checkert::resultt::ERROR:safety_checkert::resultt::SAFE;
387-
}
388-
389383
if(options.get_option("localize-faults")!="")
390384
{
391385
fault_localizationt fault_localization(

src/cbmc/bmc.h

-5
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,7 @@ class bmct:public safety_checkert
223223
void slice();
224224
void show();
225225

226-
bool cover(const goto_functionst &goto_functions);
227-
228226
friend class bmc_all_propertiest;
229-
friend class bmc_covert;
230-
template <template <class goalt> class covert>
231-
friend class bmc_goal_covert;
232227
friend class fault_localizationt;
233228

234229
private:

src/cbmc/cbmc_parse_options.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Author: Daniel Kroening, [email protected]
5757
#include <goto-instrument/reachability_slicer.h>
5858
#include <goto-instrument/full_slicer.h>
5959
#include <goto-instrument/nondet_static.h>
60-
#include <goto-instrument/cover.h>
6160

6261
#include <pointer-analysis/add_failed_symbols.h>
6362

@@ -151,9 +150,6 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
151150
if(cmdline.isset("show-vcc"))
152151
options.set_option("show-vcc", true);
153152

154-
if(cmdline.isset("cover"))
155-
parse_cover_options(cmdline, options);
156-
157153
if(cmdline.isset("mm"))
158154
options.set_option("mm", cmdline.get_value("mm"));
159155

@@ -788,13 +784,6 @@ bool cbmc_parse_optionst::process_goto_program(
788784
// for coverage annotation:
789785
remove_skip(goto_model);
790786

791-
// instrument cover goals
792-
if(options.is_set("cover"))
793-
{
794-
if(instrument_cover_goals(options, goto_model, log.get_message_handler()))
795-
return true;
796-
}
797-
798787
// label the assertions
799788
// This must be done after adding assertions and
800789
// before using the argument of the "property" option.
@@ -833,7 +822,7 @@ bool cbmc_parse_optionst::process_goto_program(
833822
full_slicer(goto_model);
834823
}
835824

836-
// remove any skips introduced since coverage instrumentation
825+
// remove any skips
837826
remove_skip(goto_model);
838827
}
839828

@@ -940,7 +929,6 @@ void cbmc_parse_optionst::help()
940929
" --no-assertions ignore user assertions\n"
941930
" --no-assumptions ignore user assumptions\n"
942931
" --error-label label check that label is unreachable\n"
943-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
944932
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
945933
HELP_REACHABILITY_SLICER
946934
" --full-slice run full slicer (experimental)\n" // NOLINT(*)

src/cbmc/cbmc_parse_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class optionst;
6262
"(error-label):(verbosity):(no-library)" \
6363
"(nondet-static)" \
6464
"(version)" \
65-
"(cover):(symex-coverage-report):" \
65+
"(symex-coverage-report):" \
6666
"(mm):" \
6767
OPT_TIMESTAMP \
6868
"(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)(gcc)" \

unit/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ testing-utils.dir:
5858
# We need to link bmc.o to the unit test, so here's everything it depends on...
5959
BMC_DEPS =../src/cbmc/all_properties$(OBJEXT) \
6060
../src/cbmc/bmc$(OBJEXT) \
61-
../src/cbmc/bmc_cover$(OBJEXT) \
6261
../src/cbmc/bv_cbmc$(OBJEXT) \
6362
../src/cbmc/cbmc_dimacs$(OBJEXT) \
6463
../src/cbmc/cbmc_languages$(OBJEXT) \

0 commit comments

Comments
 (0)