cprover
|
Classes | |
class | functiont |
Public Member Functions | |
remove_virtual_functionst (const symbol_tablet &_symbol_table, const goto_functionst &goto_functions) | |
void | operator() (goto_functionst &goto_functions) |
bool | remove_virtual_functions (goto_programt &goto_program) |
Protected Types | |
typedef std::vector< functiont > | functionst |
Protected Member Functions | |
void | remove_virtual_function (goto_programt &goto_program, goto_programt::targett target) |
void | get_functions (const exprt &, functionst &) |
void | get_child_functions_rec (const irep_idt &, const symbol_exprt &, const irep_idt &, functionst &, std::set< irep_idt > &visited) const |
Used by get_functions to track the most-derived parent that provides an override of a given function. More... | |
exprt | get_method (const irep_idt &class_id, const irep_idt &component_name) const |
Protected Attributes | |
const namespacet | ns |
const symbol_tablet & | symbol_table |
class_hierarchyt | class_hierarchy |
Definition at line 20 of file remove_virtual_functions.cpp.
|
protected |
Definition at line 53 of file remove_virtual_functions.cpp.
remove_virtual_functionst::remove_virtual_functionst | ( | const symbol_tablet & | _symbol_table, |
const goto_functionst & | goto_functions | ||
) |
Definition at line 66 of file remove_virtual_functions.cpp.
References class_hierarchy, and symbol_table.
|
protected |
Used by get_functions to track the most-derived parent that provides an override of a given function.
last_method_defn
: the most-derived parent of this_id
to define the requested function component_name
: name of the function searched for functions
is assigned a list of {class name, function symbol} pairs indicating that if this
is of the given class, then the call will target the given function. Thus if A <: B <: C and A and C provide overrides of f
(but B does not), get_child_functions_rec("C", C.f, "f") -> [{"C", C.f}, {"B", C.f}, {"A", A.f}] Definition at line 218 of file remove_virtual_functions.cpp.
References class_hierarchy, class_hierarchyt::class_map, get_method(), irept::is_not_nil(), remove_virtual_functionst::functiont::symbol_expr, and to_symbol_expr().
Referenced by get_functions().
|
protected |
Definition at line 255 of file remove_virtual_functions.cpp.
References class_hierarchy, class_hierarchyt::class_map, dstringt::empty(), get_child_functions_rec(), get_method(), irept::is_not_nil(), and to_symbol_expr().
Referenced by remove_virtual_function().
|
protected |
Definition at line 305 of file remove_virtual_functions.cpp.
References id2string(), namespacet::lookup(), ns, and symbolt::symbol_expr().
Referenced by get_child_functions_rec(), and get_functions().
void remove_virtual_functionst::operator() | ( | goto_functionst & | goto_functions | ) |
Definition at line 345 of file remove_virtual_functions.cpp.
References goto_functions_templatet< bodyT >::compute_location_numbers(), goto_functions_templatet< bodyT >::function_map, and remove_virtual_functions().
|
protected |
Definition at line 75 of file remove_virtual_functions.cpp.
References goto_program_templatet< codeT, guardT >::add_instruction(), code_function_callt::arguments(), comment(), goto_program_templatet< codeT, guardT >::destructive_append(), goto_program_templatet< codeT, guardT >::destructive_insert(), dstringt::empty(), Forall_goto_program_instructions, code_function_callt::function(), get_class_identifier_field(), get_functions(), ns, pointer_type(), to_code_function_call(), and type_eq().
Referenced by remove_virtual_functions().
bool remove_virtual_functionst::remove_virtual_functions | ( | goto_programt & | goto_program | ) |
Definition at line 319 of file remove_virtual_functions.cpp.
References Forall_goto_program_instructions, code_function_callt::function(), irept::id(), remove_virtual_function(), to_code_function_call(), and goto_program_templatet< codeT, guardT >::update().
Referenced by operator()(), and remove_virtual_functions().
|
protected |
Definition at line 35 of file remove_virtual_functions.cpp.
Referenced by get_child_functions_rec(), get_functions(), and remove_virtual_functionst().
|
protected |
Definition at line 32 of file remove_virtual_functions.cpp.
Referenced by get_method(), and remove_virtual_function().
|
protected |
Definition at line 33 of file remove_virtual_functions.cpp.
Referenced by remove_virtual_functionst().