Skip to content

Commit 792d854

Browse files
Inline perform_symex utility functions
Only used once resp. obsolete.
1 parent 6219cf2 commit 792d854

File tree

4 files changed

+14
-77
lines changed

4 files changed

+14
-77
lines changed

src/goto-checker/bmc_util.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -329,44 +329,3 @@ void postprocess_equation(
329329
symex.validate(validation_modet::INVARIANT);
330330
}
331331
}
332-
333-
void perform_symex(
334-
abstract_goto_modelt &goto_model,
335-
symex_bmct &symex,
336-
symbol_tablet &symex_symbol_table,
337-
symex_target_equationt &equation,
338-
const optionst &options,
339-
const namespacet &ns,
340-
ui_message_handlert &ui_message_handler)
341-
{
342-
auto get_goto_function =
343-
[&goto_model](
344-
const irep_idt &id) -> const goto_functionst::goto_functiont & {
345-
return goto_model.get_goto_function(id);
346-
};
347-
348-
symex.symex_from_entry_point_of(get_goto_function, symex_symbol_table);
349-
350-
postprocess_equation(symex, equation, options, ns, ui_message_handler);
351-
}
352-
353-
void perform_symex(
354-
abstract_goto_modelt &goto_model,
355-
symex_bmct &symex,
356-
path_storaget::patht &resume,
357-
symbol_tablet &symex_symbol_table,
358-
const optionst &options,
359-
const namespacet &ns,
360-
ui_message_handlert &ui_message_handler)
361-
{
362-
auto get_goto_function =
363-
[&goto_model](
364-
const irep_idt &id) -> const goto_functionst::goto_functiont & {
365-
return goto_model.get_goto_function(id);
366-
};
367-
368-
symex.resume_symex_from_saved_state(
369-
get_goto_function, resume.state, &resume.equation, symex_symbol_table);
370-
371-
postprocess_equation(symex, resume.equation, options, ns, ui_message_handler);
372-
}

src/goto-checker/bmc_util.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,6 @@ void postprocess_equation(
8181
const namespacet &ns,
8282
ui_message_handlert &ui_message_handler);
8383

84-
/// Perform symbolic execution from the entry point
85-
void perform_symex(
86-
abstract_goto_modelt &,
87-
symex_bmct &,
88-
symbol_tablet &,
89-
symex_target_equationt &,
90-
const optionst &,
91-
const namespacet &,
92-
ui_message_handlert &);
93-
94-
/// Perform symbolic execution starting from \p resume.
95-
void perform_symex(
96-
abstract_goto_modelt &,
97-
symex_bmct &,
98-
path_storaget::patht &resume,
99-
symbol_tablet &,
100-
const optionst &,
101-
const namespacet &,
102-
ui_message_handlert &);
103-
10484
/// Output a coverage report as generated by \ref symex_coveraget
10585
/// if \p cov_out is non-empty.
10686
/// \param cov_out: file to write the report to; no report is generated

src/goto-checker/multi_path_symex_checker.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@ operator()(propertiest &properties)
4141
// we haven't got an equation yet
4242
if(!equation_generated)
4343
{
44-
perform_symex(
45-
goto_model,
46-
symex,
47-
symex_symbol_table,
48-
equation,
49-
options,
50-
ns,
51-
ui_message_handler);
44+
auto get_goto_function =
45+
[this](const irep_idt &id) -> const goto_functionst::goto_functiont & {
46+
return goto_model.get_goto_function(id);
47+
};
48+
49+
symex.symex_from_entry_point_of(get_goto_function, symex_symbol_table);
50+
postprocess_equation(symex, equation, options, ns, ui_message_handler);
5251

5352
output_coverage_report(
5453
options.get_option("symex-coverage-report"),

src/goto-checker/multi_path_symex_only_checker.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ multi_path_symex_only_checkert::multi_path_symex_only_checkert(
3939
incremental_goto_checkert::resultt multi_path_symex_only_checkert::
4040
operator()(propertiest &properties)
4141
{
42-
perform_symex(
43-
goto_model,
44-
symex,
45-
symex_symbol_table,
46-
equation,
47-
options,
48-
ns,
49-
ui_message_handler);
42+
auto get_goto_function =
43+
[this](const irep_idt &id) -> const goto_functionst::goto_functiont & {
44+
return goto_model.get_goto_function(id);
45+
};
46+
47+
symex.symex_from_entry_point_of(get_goto_function, symex_symbol_table);
48+
postprocess_equation(symex, equation, options, ns, ui_message_handler);
5049

5150
output_coverage_report(
5251
options.get_option("symex-coverage-report"),

0 commit comments

Comments
 (0)