Skip to content

Commit bbb2cf8

Browse files
authored
Merge pull request diffblue#90 from diffblue/marek/polished_main_function_of_taint_analyser_PR
Polished structure of the main function of the taint analyser.
2 parents 6910925 + 2d1ab88 commit bbb2cf8

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

src/taint-analysis/taint_security_scanner.cpp

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,12 @@ bool taint_do_security_scan(
150150
&statistics,
151151
&logger);
152152

153-
if(config.is_html_dump_of_program_enabled())
154-
{
155-
logger.status()
156-
<< "Saving analysed GOTO program in HTML format (see '"
157-
<< fileutl_concatenate_file_paths(
158-
config.get_output_root_directory(),
159-
"goto-program/HTML/index.html")
160-
<< "')." << messaget::eom;
161-
162-
dump_goto_program_in_html(
163-
program.get_model(),
164-
program.get_call_graph(),
165-
fileutl_concatenate_file_paths(
166-
config.get_output_root_directory(),
167-
"goto-program/HTML"));
168-
}
169-
170153
if(config.is_html_dump_of_summaries_enabled())
171154
{
172155
statistics.begin_dump_of_taint_html_summaries();
173156

174157
logger.status()
175-
<< "Saving summaries of TAINT analysis in HTML format (see "
158+
<< "Saving summaries of TAINT analysis in HTML format (see '"
176159
<< fileutl_concatenate_file_paths(
177160
config.get_taint_summaries_root_directory(),
178161
"HTML/index.html")
@@ -193,17 +176,15 @@ bool taint_do_security_scan(
193176
fn_id, summary, false, ostr);
194177
},
195178
program.get_model(),
196-
program.get_call_graph(),
197179
fileutl_concatenate_file_paths(
198180
config.get_taint_summaries_root_directory(),
199-
"HTML"),
200-
false);
181+
"HTML"));
201182

202183
statistics.end_dump_of_taint_html_summaries();
203184
}
204185

205186
logger.status()
206-
<< "Saving summaries of TAINT analysis in JSON format (see "
187+
<< "Saving summaries of TAINT analysis in JSON format (see '"
207188
<< fileutl_concatenate_file_paths(
208189
config.get_taint_summaries_root_directory(),
209190
"JSON/__index.json")
@@ -212,7 +193,7 @@ bool taint_do_security_scan(
212193
taint_summaries.flush();
213194

214195
logger.status()
215-
<< "Saving summaries of LVSA analysis in JSON format (see "
196+
<< "Saving summaries of LVSA analysis in JSON format (see '"
216197
<< fileutl_concatenate_file_paths(
217198
config.get_lvsa_summaries_root_directory(),
218199
"__index.json")
@@ -223,7 +204,7 @@ bool taint_do_security_scan(
223204
if(config.is_html_dump_of_statistics_enabled())
224205
{
225206
logger.status()
226-
<< "Saving statistics of the whole analysis in HTML format (see "
207+
<< "Saving statistics of the whole analysis in HTML format (see '"
227208
<< fileutl_concatenate_file_paths(
228209
config.get_statistics_root_directory(),
229210
"HTML/index.html")
@@ -237,7 +218,7 @@ bool taint_do_security_scan(
237218
}
238219

239220
logger.status()
240-
<< "Saving statistics of the whole analysis in JSON format (see "
221+
<< "Saving statistics of the whole analysis in JSON format (see '"
241222
<< fileutl_concatenate_file_paths(
242223
config.get_statistics_root_directory(),
243224
"JSON/statistics.json")
@@ -254,6 +235,26 @@ bool taint_do_security_scan(
254235
taint_dump_statistics_in_JSON(statistics,ostr);
255236
}
256237

238+
if(config.is_html_dump_of_program_enabled())
239+
{
240+
logger.status()
241+
<< "Saving analysed GOTO program in HTML format (see '"
242+
<< fileutl_concatenate_file_paths(
243+
config.get_output_root_directory(),
244+
"goto-program/HTML/index.html")
245+
<< "')." << messaget::eom;
246+
247+
dump_goto_program_in_html(
248+
program.get_model(),
249+
program.get_call_graph(),
250+
program.get_class_hierarchy(),
251+
program.get_symbol_table(),
252+
program.get_inverted_functions_topological_order(),
253+
fileutl_concatenate_file_paths(
254+
config.get_output_root_directory(),
255+
"goto-program/HTML"));
256+
}
257+
257258
logger.status() << "The security scanner has finished successfully."
258259
<< messaget::eom;
259260
return true;

0 commit comments

Comments
 (0)