cprover
|
#include <resolve_inherited_component.h>
Classes | |
class | inherited_componentt |
Public Member Functions | |
resolve_inherited_componentt (const symbol_tablet &symbol_table) | |
See the operator() method comment. More... | |
resolve_inherited_componentt (const symbol_tablet &symbol_table, const class_hierarchyt &class_hierarchy) | |
See the operator() method comment. More... | |
inherited_componentt | operator() (const irep_idt &class_id, const irep_idt &component_name, bool include_interfaces) |
Given a class and a component, identify the concrete field or method it is resolved to. More... | |
Static Public Member Functions | |
static irep_idt | build_full_component_identifier (const irep_idt &class_name, const irep_idt &component_name) |
Build a component name as found in a GOTO symbol table equivalent to the name of a concrete component component_name on class class_name. More... | |
Private Member Functions | |
bool | does_implementation_exist (const irep_idt &class_name, const irep_idt &component_name, const irep_idt &user_class_name) |
Private Attributes | |
class_hierarchyt | class_hierarchy |
const symbol_tablet & | symbol_table |
Definition at line 21 of file resolve_inherited_component.h.
|
explicit |
See the operator() method comment.
symbol_table | The symbol table to resolve the component against |
Definition at line 15 of file resolve_inherited_component.cpp.
References class_hierarchy, and symbol_table.
resolve_inherited_componentt::resolve_inherited_componentt | ( | const symbol_tablet & | symbol_table, |
const class_hierarchyt & | class_hierarchy | ||
) |
See the operator() method comment.
symbol_table | The symbol table to resolve the component against |
class_hierarchy | A prebuilt class_hierachy based on the symbol_table |
Definition at line 26 of file resolve_inherited_component.cpp.
References class_hierarchy, class_hierarchyt::class_map, and PRECONDITION.
|
static |
Build a component name as found in a GOTO symbol table equivalent to the name of a concrete component component_name on class class_name.
component_name | The name of the component |
class_name | The class the implementation would be found on. |
class_name
's component component_name
Definition at line 94 of file resolve_inherited_component.cpp.
References id2string(), and PRECONDITION.
Referenced by resolve_inherited_componentt::inherited_componentt::get_full_component_identifier(), remove_virtual_functionst::get_method(), and operator()().
|
private |
resolve_inherited_componentt::inherited_componentt resolve_inherited_componentt::operator() | ( | const irep_idt & | class_id, |
const irep_idt & | component_name, | ||
bool | include_interfaces | ||
) |
Given a class and a component, identify the concrete field or method it is resolved to.
For example, a reference Child.abc refers to Child's method or field if it exists, or else Parent.abc, and so on regarding Parent's ancestors. If none are found, an empty string will be returned.
class_id | The name of the class the function is being called on |
component_name | The base name of the component (i.e. without the class specifier) |
include_interfaces | If true, consider inheritance from interfaces (parent types other than the first listed) |
Definition at line 47 of file resolve_inherited_component.cpp.
References build_full_component_identifier(), class_hierarchy, class_hierarchyt::class_map, dstringt::empty(), symbol_table_baset::has_symbol(), PRECONDITION, and symbol_table.
|
private |
Definition at line 73 of file resolve_inherited_component.h.
Referenced by operator()(), and resolve_inherited_componentt().
|
private |
Definition at line 74 of file resolve_inherited_component.h.
Referenced by operator()(), and resolve_inherited_componentt().