@@ -13,20 +13,18 @@ Date: May 2016
13
13
14
14
#include " cover.h"
15
15
16
- #include < iterator>
17
- #include < unordered_set>
18
-
19
16
#include < util/config.h>
20
- #include < util/cprover_prefix.h>
21
- #include < util/format_number_range.h>
22
17
#include < util/message.h>
23
- #include < util/prefix.h>
24
18
#include < util/make_unique.h>
25
19
26
20
#include " cover_basic_blocks.h"
27
21
#include " cover_filter.h"
28
22
#include " cover_instrument.h"
29
23
24
+ // / Applies instrumenters to given goto program
25
+ // / \param goto_program: the goto program
26
+ // / \param instrumenters: the instrumenters
27
+ // / \param message_handler: a message handler
30
28
void instrument_cover_goals (
31
29
goto_programt &goto_program,
32
30
const cover_instrumenterst &instrumenters,
@@ -40,6 +38,11 @@ void instrument_cover_goals(
40
38
instrumenters (goto_program, basic_blocks);
41
39
}
42
40
41
+ // / Instruments goto program for a given coverage criterion
42
+ // / \param symbol_table: the symbol table
43
+ // / \param goto_program: the goto program
44
+ // / \param criterion: the coverage criterion
45
+ // / \param message_handler: a message handler
43
46
void instrument_cover_goals (
44
47
const symbol_tablet &symbol_table,
45
48
goto_programt &goto_program,
@@ -55,6 +58,10 @@ void instrument_cover_goals(
55
58
instrument_cover_goals (goto_program, instrumenters, message_handler);
56
59
}
57
60
61
+ // / Create and add an instrumenter based on the given criterion
62
+ // / \param criterion: the coverage criterion
63
+ // / \param symbol_table: the symbol table
64
+ // / \param goal_filters: goal filters to discard certain goals
58
65
void cover_instrumenterst::add_from_criterion (
59
66
coverage_criteriont criterion,
60
67
const symbol_tablet &symbol_table,
@@ -100,6 +107,9 @@ void cover_instrumenterst::add_from_criterion(
100
107
}
101
108
}
102
109
110
+ // / Parses a coverage criterion
111
+ // / \param criterion_string: a string
112
+ // / \return a coverage criterion or throws an exception
103
113
coverage_criteriont
104
114
parse_coverage_criterion (const std::string &criterion_string)
105
115
{
@@ -131,6 +141,11 @@ parse_coverage_criterion(const std::string &criterion_string)
131
141
return c;
132
142
}
133
143
144
+ // / Applies instrumenters to given goto functions
145
+ // / \param goto_functions: the goto functions
146
+ // / \param instrumenters: the instrumenters
147
+ // / \param function_filters: function filters to discard certain functions
148
+ // / \param message_handler: a message handler
134
149
void instrument_cover_goals (
135
150
goto_functionst &goto_functions,
136
151
const cover_instrumenterst &instrumenters,
@@ -146,6 +161,11 @@ void instrument_cover_goals(
146
161
}
147
162
}
148
163
164
+ // / Instruments goto functions based on given command line options
165
+ // / \param cmdline: the command line
166
+ // / \param symbol_table: the symbol table
167
+ // / \param goto_functions: the goto functions
168
+ // / \param message_handler: a message handler
149
169
bool instrument_cover_goals (
150
170
const cmdlinet &cmdline,
151
171
const symbol_tablet &symbol_table,
@@ -258,6 +278,10 @@ bool instrument_cover_goals(
258
278
return false ;
259
279
}
260
280
281
+ // / Instruments a goto model based on given command line options
282
+ // / \param cmdline: the command line
283
+ // / \param goto_model: the goto model
284
+ // / \param message_handler: a message handler
261
285
bool instrument_cover_goals (
262
286
const cmdlinet &cmdline,
263
287
goto_modelt &goto_model,
0 commit comments