Skip to content

Commit 8236db4

Browse files
Merge pull request diffblue#1419 from peterschrammel/refactor/cover-instrument
Refactor coverage instrumentation
2 parents a580e27 + aac181f commit 8236db4

20 files changed

+2319
-1550
lines changed

src/cbmc/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
3434
../goto-instrument/full_slicer$(OBJEXT) \
3535
../goto-instrument/nondet_static$(OBJEXT) \
3636
../goto-instrument/cover$(OBJEXT) \
37+
../goto-instrument/cover_basic_blocks$(OBJEXT) \
38+
../goto-instrument/cover_filter$(OBJEXT) \
39+
../goto-instrument/cover_instrument_branch$(OBJEXT) \
40+
../goto-instrument/cover_instrument_condition$(OBJEXT) \
41+
../goto-instrument/cover_instrument_decision$(OBJEXT) \
42+
../goto-instrument/cover_instrument_location$(OBJEXT) \
43+
../goto-instrument/cover_instrument_mcdc$(OBJEXT) \
44+
../goto-instrument/cover_instrument_other$(OBJEXT) \
45+
../goto-instrument/cover_util$(OBJEXT) \
3746
../analyses/analyses$(LIBEXT) \
3847
../langapi/langapi$(LIBEXT) \
3948
../xmllang/xmllang$(LIBEXT) \

src/cbmc/cbmc_parse_options.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
117117
options.set_option("show-vcc", true);
118118

119119
if(cmdline.isset("cover"))
120-
options.set_option("cover", cmdline.get_values("cover"));
120+
parse_cover_options(cmdline, options);
121121

122122
if(cmdline.isset("mm"))
123123
options.set_option("mm", cmdline.get_value("mm"));
@@ -810,10 +810,7 @@ bool cbmc_parse_optionst::process_goto_program(
810810
// instrument cover goals
811811
if(cmdline.isset("cover"))
812812
{
813-
if(instrument_cover_goals(
814-
cmdline,
815-
goto_model,
816-
get_message_handler()))
813+
if(instrument_cover_goals(options, goto_model, get_message_handler()))
817814
return true;
818815
}
819816

src/goto-instrument/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ SRC = accelerate/accelerate.cpp \
1919
concurrency.cpp \
2020
count_eloc.cpp \
2121
cover.cpp \
22+
cover_basic_blocks.cpp \
23+
cover_filter.cpp \
24+
cover_instrument_branch.cpp \
25+
cover_instrument_condition.cpp \
26+
cover_instrument_decision.cpp \
27+
cover_instrument_location.cpp \
28+
cover_instrument_mcdc.cpp \
29+
cover_instrument_other.cpp \
30+
cover_util.cpp \
2231
document_properties.cpp \
2332
dot.cpp \
2433
dump_c.cpp \

0 commit comments

Comments
 (0)