Skip to content

Commit 1e3962e

Browse files
author
Daniel Kroening
committed
cleanout test suite generation from cbmc
1 parent 02b4956 commit 1e3962e

File tree

9 files changed

+9
-56
lines changed

9 files changed

+9
-56
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
@@ -103,9 +103,6 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
103103
if(cmdline.isset("show-vcc"))
104104
options.set_option("show-vcc", true);
105105

106-
if(cmdline.isset("cover"))
107-
parse_cover_options(cmdline, options);
108-
109106
if(cmdline.isset("no-simplify"))
110107
options.set_option("simplify", false);
111108
else
@@ -181,14 +178,9 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
181178
options.set_option("error-label", cmdline.get_values("error-label"));
182179

183180
// generate unwinding assertions
184-
if(cmdline.isset("cover"))
185-
options.set_option("unwinding-assertions", false);
186-
else
187-
{
188-
options.set_option(
189-
"unwinding-assertions",
190-
cmdline.isset("unwinding-assertions"));
191-
}
181+
options.set_option(
182+
"unwinding-assertions",
183+
cmdline.isset("unwinding-assertions"));
192184

193185
// generate unwinding assumptions otherwise
194186
options.set_option(
@@ -940,17 +932,9 @@ bool jbmc_parse_optionst::process_goto_functions(
940932
remove_unused_functions(goto_model, get_message_handler());
941933
}
942934

943-
// remove skips such that trivial GOTOs are deleted and not considered
944-
// for coverage annotation:
935+
// remove skips such that trivial GOTOs are deleted
945936
remove_skip(goto_model);
946937

947-
// instrument cover goals
948-
if(cmdline.isset("cover"))
949-
{
950-
if(instrument_cover_goals(options, goto_model, get_message_handler()))
951-
return true;
952-
}
953-
954938
// label the assertions
955939
// This must be done after adding assertions and
956940
// before using the argument of the "property" option.
@@ -994,7 +978,7 @@ bool jbmc_parse_optionst::process_goto_functions(
994978
full_slicer(goto_model);
995979
}
996980

997-
// remove any skips introduced since coverage instrumentation
981+
// remove any skips
998982
remove_skip(goto_model);
999983
}
1000984

@@ -1108,7 +1092,6 @@ void jbmc_parse_optionst::help()
11081092
" --no-assertions ignore user assertions\n"
11091093
" --no-assumptions ignore user assumptions\n"
11101094
" --error-label label check that label is unreachable\n"
1111-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
11121095
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
11131096
HELP_REACHABILITY_SLICER
11141097
" --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

-8
Original file line numberDiff line numberDiff line change
@@ -380,14 +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-
const optionst::value_listt criteria=
386-
options.get_list_option("cover");
387-
return cover(goto_functions, criteria)?
388-
safety_checkert::resultt::ERROR:safety_checkert::resultt::SAFE;
389-
}
390-
391383
if(options.get_option("localize-faults")!="")
392384
{
393385
fault_localizationt fault_localization(

src/cbmc/bmc.h

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

226-
bool cover(
227-
const goto_functionst &goto_functions,
228-
const optionst::value_listt &criteria);
229-
230226
friend class bmc_all_propertiest;
231-
friend class bmc_covert;
232-
template <template <class goalt> class covert>
233-
friend class bmc_goal_covert;
234227
friend class fault_localizationt;
235228

236229
private:

src/cbmc/cbmc_parse_options.cpp

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

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

@@ -148,9 +147,6 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
148147
if(cmdline.isset("show-vcc"))
149148
options.set_option("show-vcc", true);
150149

151-
if(cmdline.isset("cover"))
152-
parse_cover_options(cmdline, options);
153-
154150
if(cmdline.isset("mm"))
155151
options.set_option("mm", cmdline.get_value("mm"));
156152

@@ -786,13 +782,6 @@ bool cbmc_parse_optionst::process_goto_program(
786782
// for coverage annotation:
787783
remove_skip(goto_model);
788784

789-
// instrument cover goals
790-
if(options.is_set("cover"))
791-
{
792-
if(instrument_cover_goals(options, goto_model, log.get_message_handler()))
793-
return true;
794-
}
795-
796785
// label the assertions
797786
// This must be done after adding assertions and
798787
// before using the argument of the "property" option.
@@ -831,7 +820,7 @@ bool cbmc_parse_optionst::process_goto_program(
831820
full_slicer(goto_model);
832821
}
833822

834-
// remove any skips introduced since coverage instrumentation
823+
// remove any skips
835824
remove_skip(goto_model);
836825
}
837826

@@ -944,7 +933,6 @@ void cbmc_parse_optionst::help()
944933
" --no-assertions ignore user assertions\n"
945934
" --no-assumptions ignore user assumptions\n"
946935
" --error-label label check that label is unreachable\n"
947-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
948936
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
949937
HELP_REACHABILITY_SLICER
950938
" --full-slice run full slicer (experimental)\n" // NOLINT(*)

src/cbmc/cbmc_parse_options.h

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

unit/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ testing-utils.dir:
5151
# We need to link bmc.o to the unit test, so here's everything it depends on...
5252
BMC_DEPS =../src/cbmc/all_properties$(OBJEXT) \
5353
../src/cbmc/bmc$(OBJEXT) \
54-
../src/cbmc/bmc_cover$(OBJEXT) \
5554
../src/cbmc/bv_cbmc$(OBJEXT) \
5655
../src/cbmc/cbmc_dimacs$(OBJEXT) \
5756
../src/cbmc/cbmc_languages$(OBJEXT) \

0 commit comments

Comments
 (0)