Skip to content

Commit 5173042

Browse files
author
Daniel Kroening
committed
cleanout test suite generation from cbmc
1 parent b1ce796 commit 5173042

File tree

8 files changed

+9
-54
lines changed

8 files changed

+9
-54
lines changed

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
@@ -381,14 +381,6 @@ safety_checkert::resultt bmct::execute(
381381
return safety_checkert::resultt::SAFE; // to indicate non-error
382382
}
383383

384-
if(!options.get_list_option("cover").empty())
385-
{
386-
const optionst::value_listt criteria=
387-
options.get_list_option("cover");
388-
return cover(goto_functions, criteria)?
389-
safety_checkert::resultt::ERROR:safety_checkert::resultt::SAFE;
390-
}
391-
392384
if(options.get_option("localize-faults")!="")
393385
{
394386
fault_localizationt fault_localization(

src/cbmc/bmc.h

-7
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,7 @@ class bmct:public safety_checkert
211211
void slice();
212212
void show();
213213

214-
bool cover(
215-
const goto_functionst &goto_functions,
216-
const optionst::value_listt &criteria);
217-
218214
friend class bmc_all_propertiest;
219-
friend class bmc_covert;
220-
template <template <class goalt> class covert>
221-
friend class bmc_goal_covert;
222215
friend class fault_localizationt;
223216

224217
private:

src/cbmc/cbmc_parse_options.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Author: Daniel Kroening, [email protected]
5454
#include <goto-instrument/reachability_slicer.h>
5555
#include <goto-instrument/full_slicer.h>
5656
#include <goto-instrument/nondet_static.h>
57-
#include <goto-instrument/cover.h>
5857

5958
#include <pointer-analysis/add_failed_symbols.h>
6059

@@ -161,9 +160,6 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
161160
if(cmdline.isset("show-vcc"))
162161
options.set_option("show-vcc", true);
163162

164-
if(cmdline.isset("cover"))
165-
parse_cover_options(cmdline, options);
166-
167163
if(cmdline.isset("mm"))
168164
options.set_option("mm", cmdline.get_value("mm"));
169165

@@ -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

@@ -946,7 +935,6 @@ void cbmc_parse_optionst::help()
946935
" --no-assertions ignore user assertions\n"
947936
" --no-assumptions ignore user assumptions\n"
948937
" --error-label label check that label is unreachable\n"
949-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
950938
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
951939
HELP_REACHABILITY_SLICER
952940
" --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)" \

src/jbmc/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
3030
../goto-instrument/full_slicer$(OBJEXT) \
3131
../goto-instrument/nondet_static$(OBJEXT) \
3232
../goto-instrument/reachability_slicer$(OBJEXT) \
33+
../goto-instrument/nondet_static$(OBJEXT) \
34+
../goto-instrument/reachability_slicer$(OBJEXT) \
3335
../goto-instrument/unwindset$(OBJEXT) \
3436
../analyses/analyses$(LIBEXT) \
3537
../langapi/langapi$(LIBEXT) \
@@ -41,7 +43,6 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
4143
../json/json$(LIBEXT) \
4244
../cbmc/all_properties$(OBJEXT) \
4345
../cbmc/bmc$(OBJEXT) \
44-
../cbmc/bmc_cover$(OBJEXT) \
4546
../cbmc/bv_cbmc$(OBJEXT) \
4647
../cbmc/cbmc_dimacs$(OBJEXT) \
4748
../cbmc/cbmc_solvers$(OBJEXT) \

src/jbmc/jbmc_parse_options.cpp

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

122-
if(cmdline.isset("cover"))
123-
parse_cover_options(cmdline, options);
124-
125122
if(cmdline.isset("no-simplify"))
126123
options.set_option("simplify", false);
127124
else
@@ -192,14 +189,9 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
192189
options.set_option("error-label", cmdline.get_values("error-label"));
193190

194191
// generate unwinding assertions
195-
if(cmdline.isset("cover"))
196-
options.set_option("unwinding-assertions", false);
197-
else
198-
{
199-
options.set_option(
200-
"unwinding-assertions",
201-
cmdline.isset("unwinding-assertions"));
202-
}
192+
options.set_option(
193+
"unwinding-assertions",
194+
cmdline.isset("unwinding-assertions"));
203195

204196
// generate unwinding assumptions otherwise
205197
options.set_option(
@@ -932,17 +924,9 @@ bool jbmc_parse_optionst::process_goto_functions(
932924
remove_unused_functions(goto_model, get_message_handler());
933925
}
934926

935-
// remove skips such that trivial GOTOs are deleted and not considered
936-
// for coverage annotation:
927+
// remove skips such that trivial GOTOs are deleted
937928
remove_skip(goto_model);
938929

939-
// instrument cover goals
940-
if(cmdline.isset("cover"))
941-
{
942-
if(instrument_cover_goals(options, goto_model, get_message_handler()))
943-
return true;
944-
}
945-
946930
// label the assertions
947931
// This must be done after adding assertions and
948932
// before using the argument of the "property" option.
@@ -986,7 +970,7 @@ bool jbmc_parse_optionst::process_goto_functions(
986970
full_slicer(goto_model);
987971
}
988972

989-
// remove any skips introduced since coverage instrumentation
973+
// remove any skips
990974
remove_skip(goto_model);
991975
goto_model.goto_functions.update();
992976
}
@@ -1100,7 +1084,6 @@ void jbmc_parse_optionst::help()
11001084
" --no-assertions ignore user assertions\n"
11011085
" --no-assumptions ignore user assumptions\n"
11021086
" --error-label label check that label is unreachable\n"
1103-
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
11041087
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
11051088
HELP_REACHABILITY_SLICER
11061089
" --full-slice run full slicer (experimental)\n" // NOLINT(*)

unit/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ testing-utils.dir:
7777
# We need to link bmc.o to the unit test, so here's everything it depends on...
7878
BMC_DEPS =../src/cbmc/all_properties$(OBJEXT) \
7979
../src/cbmc/bmc$(OBJEXT) \
80-
../src/cbmc/bmc_cover$(OBJEXT) \
8180
../src/cbmc/bv_cbmc$(OBJEXT) \
8281
../src/cbmc/cbmc_dimacs$(OBJEXT) \
8382
../src/cbmc/cbmc_languages$(OBJEXT) \

0 commit comments

Comments
 (0)