CBMC
remove_virtual_functionst Class Reference
+ Collaboration diagram for remove_virtual_functionst:

Public Member Functions

 remove_virtual_functionst (symbol_table_baset &_symbol_table, const class_hierarchyt &_class_hierarchy)
 
void operator() (goto_functionst &functions)
 Remove virtual function calls from all functions in the specified list and replace them with their most derived implementations. More...
 
bool remove_virtual_functions (const irep_idt &function_id, goto_programt &goto_program)
 Remove all virtual function calls in a GOTO program and replace them with calls to their most derived implementations. More...
 

Private Member Functions

goto_programt::targett remove_virtual_function (const irep_idt &function_id, goto_programt &goto_program, goto_programt::targett target)
 Replace specified virtual function call with a static call to its most derived implementation. More...
 

Private Attributes

const class_hierarchytclass_hierarchy
 
symbol_table_basetsymbol_table
 
namespacet ns
 

Detailed Description

Definition at line 61 of file remove_virtual_functions.cpp.

Constructor & Destructor Documentation

◆ remove_virtual_functionst()

remove_virtual_functionst::remove_virtual_functionst ( symbol_table_baset _symbol_table,
const class_hierarchyt _class_hierarchy 
)
inline

Definition at line 64 of file remove_virtual_functions.cpp.

Member Function Documentation

◆ operator()()

void remove_virtual_functionst::operator() ( goto_functionst functions)

Remove virtual function calls from all functions in the specified list and replace them with their most derived implementations.

Definition at line 692 of file remove_virtual_functions.cpp.

◆ remove_virtual_function()

goto_programt::targett remove_virtual_functionst::remove_virtual_function ( const irep_idt function_id,
goto_programt goto_program,
goto_programt::targett  target 
)
private

Replace specified virtual function call with a static call to its most derived implementation.

Parameters
function_idThe identifier of the function we are currently analysing
[in,out]goto_programGOTO program to modify
targetiterator to a function in the supplied GOTO program to replace. Must point to a virtual function call.
Returns
Returns a pointer to the statement in the supplied GOTO program after replaced function call

Definition at line 467 of file remove_virtual_functions.cpp.

◆ remove_virtual_functions()

bool remove_virtual_functionst::remove_virtual_functions ( const irep_idt function_id,
goto_programt goto_program 
)

Remove all virtual function calls in a GOTO program and replace them with calls to their most derived implementations.

Returns true if at least one function has been replaced.

Definition at line 659 of file remove_virtual_functions.cpp.

Member Data Documentation

◆ class_hierarchy

const class_hierarchyt& remove_virtual_functionst::class_hierarchy
private

Definition at line 80 of file remove_virtual_functions.cpp.

◆ ns

namespacet remove_virtual_functionst::ns
private

Definition at line 82 of file remove_virtual_functions.cpp.

◆ symbol_table

symbol_table_baset& remove_virtual_functionst::symbol_table
private

Definition at line 81 of file remove_virtual_functions.cpp.


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