CBMC
|
#include "resolve_inherited_component.h"
#include <util/range.h>
#include <util/std_types.h>
#include <util/symbol_table_base.h>
Go to the source code of this file.
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... | |
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.