CBMC
|
Given a class and a component (either field or method), find the closest parent that defines that component. More...
Go to the source code of this file.
Classes | |
class | resolve_inherited_componentt |
class | resolve_inherited_componentt::inherited_componentt |
Functions | |
std::optional< resolve_inherited_componentt::inherited_componentt > | get_inherited_method_implementation (const irep_idt &call_basename, const irep_idt &classname, const symbol_table_baset &symbol_table) |
Given a class and a component, identify the concrete method it is resolved to. More... | |
Given a class and a component (either field or method), find the closest parent that defines that component.
Definition in file resolve_inherited_component.h.
std::optional<resolve_inherited_componentt::inherited_componentt> get_inherited_method_implementation | ( | const irep_idt & | call_basename, |
const irep_idt & | classname, | ||
const symbol_table_baset & | symbol_table | ||
) |
Given a class and a component, identify the concrete 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. This looks first for non-abstract methods inherited from the first base (i.e., for Java the superclass), then for non-abstract methods inherited otherwise (for Java, interface default methods), then for any abstract declaration.
classname | The name of the class the function is being called on |
call_basename | The base name of the component (i.e. without the class specifier) |
symbol_table | Global symbol table |
Definition at line 126 of file resolve_inherited_component.cpp.