cprover
remove_function_pointerst Class Reference
+ Collaboration diagram for remove_function_pointerst:

Public Types

using functionst = remove_const_function_pointerst::functionst
 

Public Member Functions

 remove_function_pointerst (message_handlert &_message_handler, symbol_tablet &_symbol_table, bool _add_safety_assertion, bool only_resolve_const_fps, const goto_functionst &goto_functions)
 
void operator() (goto_functionst &goto_functions)
 
bool remove_function_pointers (goto_programt &goto_program, const irep_idt &function_id)
 
void remove_function_pointer (goto_programt &goto_program, const irep_idt &function_id, goto_programt::targett target, const functionst &functions)
 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. More...
 

Protected Types

typedef std::map< irep_idt, code_typettype_mapt
 

Protected Member Functions

void remove_function_pointer (goto_programt &goto_program, const irep_idt &function_id, goto_programt::targett target)
 Replace a call to a dynamic function at location target in the given goto-program by determining functions that have a compatible signature. More...
 
bool is_type_compatible (bool return_value_used, const code_typet &call_type, const code_typet &function_type)
 
bool arg_is_type_compatible (const typet &call_type, const typet &function_type)
 
void fix_argument_types (code_function_callt &function_call)
 
void fix_return_type (const irep_idt &in_function_id, code_function_callt &function_call, goto_programt &dest)
 

Protected Attributes

messaget log
 
const namespacet ns
 
symbol_tabletsymbol_table
 
bool add_safety_assertion
 
bool only_resolve_const_fps
 
std::unordered_set< irep_idtaddress_taken
 
type_mapt type_map
 

Detailed Description

Definition at line 31 of file remove_function_pointers.cpp.

Member Typedef Documentation

◆ functionst

◆ type_mapt

Definition at line 90 of file remove_function_pointers.cpp.

Constructor & Destructor Documentation

◆ remove_function_pointerst()

remove_function_pointerst::remove_function_pointerst ( message_handlert _message_handler,
symbol_tablet _symbol_table,
bool  _add_safety_assertion,
bool  only_resolve_const_fps,
const goto_functionst goto_functions 
)

Definition at line 109 of file remove_function_pointers.cpp.

Member Function Documentation

◆ arg_is_type_compatible()

bool remove_function_pointerst::arg_is_type_compatible ( const typet call_type,
const typet function_type 
)
protected

Definition at line 131 of file remove_function_pointers.cpp.

◆ fix_argument_types()

void remove_function_pointerst::fix_argument_types ( code_function_callt function_call)
protected

Definition at line 207 of file remove_function_pointers.cpp.

◆ fix_return_type()

void remove_function_pointerst::fix_return_type ( const irep_idt in_function_id,
code_function_callt function_call,
goto_programt dest 
)
protected

Definition at line 231 of file remove_function_pointers.cpp.

◆ is_type_compatible()

bool remove_function_pointerst::is_type_compatible ( bool  return_value_used,
const code_typet call_type,
const code_typet function_type 
)
protected

Definition at line 157 of file remove_function_pointers.cpp.

◆ operator()()

void remove_function_pointerst::operator() ( goto_functionst goto_functions)

Definition at line 500 of file remove_function_pointers.cpp.

◆ remove_function_pointer() [1/2]

void remove_function_pointerst::remove_function_pointer ( goto_programt goto_program,
const irep_idt function_id,
goto_programt::targett  target 
)
protected

Replace a call to a dynamic function at location target in the given goto-program by determining functions that have a compatible signature.

Parameters
goto_programThe goto program that contains target
function_idName of function containing the target
targetlocation with function call with function pointer

Definition at line 266 of file remove_function_pointers.cpp.

◆ remove_function_pointer() [2/2]

void remove_function_pointerst::remove_function_pointer ( goto_programt goto_program,
const irep_idt function_id,
goto_programt::targett  target,
const functionst functions 
)

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
goto_programThe goto program that contains target
function_idName of function containing the target
targetlocation with function call with function pointer
functionsThe set of functions to consider

Definition at line 362 of file remove_function_pointers.cpp.

◆ remove_function_pointers()

bool remove_function_pointerst::remove_function_pointers ( goto_programt goto_program,
const irep_idt function_id 
)

Definition at line 476 of file remove_function_pointers.cpp.

Member Data Documentation

◆ add_safety_assertion

bool remove_function_pointerst::add_safety_assertion
protected

Definition at line 67 of file remove_function_pointers.cpp.

◆ address_taken

std::unordered_set<irep_idt> remove_function_pointerst::address_taken
protected

Definition at line 88 of file remove_function_pointers.cpp.

◆ log

messaget remove_function_pointerst::log
protected

Definition at line 64 of file remove_function_pointers.cpp.

◆ ns

const namespacet remove_function_pointerst::ns
protected

Definition at line 65 of file remove_function_pointers.cpp.

◆ only_resolve_const_fps

bool remove_function_pointerst::only_resolve_const_fps
protected

Definition at line 75 of file remove_function_pointers.cpp.

◆ symbol_table

symbol_tablet& remove_function_pointerst::symbol_table
protected

Definition at line 66 of file remove_function_pointers.cpp.

◆ type_map

type_mapt remove_function_pointerst::type_map
protected

Definition at line 91 of file remove_function_pointers.cpp.


The documentation for this class was generated from the following file: