Program Transformation.
More...
Go to the source code of this file.
|
static bool | arg_is_type_compatible (const typet &call_type, const typet &function_type, const namespacet &ns) |
|
bool | function_is_type_compatible (bool return_value_used, const code_typet &call_type, const code_typet &function_type, const namespacet &ns) |
| Returns true iff call_type can be converted to produce a function call of the same type as function_type .
|
|
static void | fix_argument_types (code_function_callt &function_call) |
|
static void | fix_return_type (const irep_idt &in_function_id, code_function_callt &function_call, symbol_tablet &symbol_table, goto_programt &dest) |
|
static std::string | function_pointer_assertion_comment (const std::unordered_set< symbol_exprt, irep_hash > &candidates) |
|
void | remove_function_pointer (message_handlert &message_handler, symbol_tablet &symbol_table, goto_programt &goto_program, const irep_idt &function_id, goto_programt::targett target, const std::unordered_set< symbol_exprt, irep_hash > &functions, const bool add_safety_assertion) |
| Replace a call to a dynamic function at location target in the given goto-program by a case-split over a given set of functions.
|
|
bool | remove_function_pointers (message_handlert &_message_handler, symbol_tablet &symbol_table, const goto_functionst &goto_functions, goto_programt &goto_program, const irep_idt &function_id, bool add_safety_assertion, bool only_remove_const_fps) |
|
void | remove_function_pointers (message_handlert &_message_handler, symbol_tablet &symbol_table, goto_functionst &goto_functions, bool add_safety_assertion, bool only_remove_const_fps) |
|
void | remove_function_pointers (message_handlert &_message_handler, goto_modelt &goto_model, bool add_safety_assertion, bool only_remove_const_fps) |
|
Program Transformation.
Definition in file remove_function_pointers.cpp.
◆ arg_is_type_compatible()
static bool arg_is_type_compatible |
( |
const typet & |
call_type, |
|
|
const typet & |
function_type, |
|
|
const namespacet & |
ns |
|
) |
| |
|
static |
◆ fix_argument_types()
◆ fix_return_type()
◆ function_is_type_compatible()
Returns true iff call_type
can be converted to produce a function call of the same type as function_type
.
Definition at line 131 of file remove_function_pointers.cpp.
◆ function_pointer_assertion_comment()
static std::string function_pointer_assertion_comment |
( |
const std::unordered_set< symbol_exprt, irep_hash > & |
candidates | ) |
|
|
static |
◆ remove_function_pointer()
Replace a call to a dynamic function at location target in the given goto-program by a case-split over a given set of functions.
- Parameters
-
message_handler | Message handler to print warnings |
symbol_table | Symbol table |
goto_program | The goto program that contains target |
function_id | Name of function containing the target |
target | location with function call with function pointer |
functions | The set of functions to consider |
add_safety_assertion | Iff true, include an assertion that the |
Definition at line 376 of file remove_function_pointers.cpp.
◆ remove_function_pointers() [1/3]
void remove_function_pointers |
( |
message_handlert & |
_message_handler, |
|
|
goto_modelt & |
goto_model, |
|
|
bool |
add_safety_assertion, |
|
|
bool |
only_remove_const_fps |
|
) |
| |
◆ remove_function_pointers() [2/3]
◆ remove_function_pointers() [3/3]