Go to the documentation of this file.
21 : symbol_table(symbol_table)
41 bool include_interfaces,
42 const std::function<
bool(
const symbolt &)> user_filter)
47 std::vector<irep_idt> classes_to_visit;
48 classes_to_visit.push_back(class_id);
49 while(!classes_to_visit.empty())
51 irep_idt current_class = classes_to_visit.back();
52 classes_to_visit.pop_back();
54 const irep_idt &full_component_identifier=
58 if(symbol && user_filter(*symbol))
63 const auto current_class_symbol_it =
74 if(include_interfaces)
76 classes_to_visit.insert(
77 classes_to_visit.end(), parents.begin(), parents.end());
82 classes_to_visit.push_back(*parents.begin());
134 auto exclude_abstract_methods = [&](
const symbolt &symbol) {
135 return !symbol.type.get_bool(ID_C_abstract);
139 call_resolver(classname, call_basename,
false, exclude_abstract_methods);
144 call_resolver(classname, call_basename,
true, exclude_abstract_methods);
149 resolved_call = call_resolver(classname, call_basename,
true);
151 return resolved_call;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
optionalt< resolve_inherited_componentt::inherited_componentt > get_inherited_method_implementation(const irep_idt &call_basename, const irep_idt &classname, const symbol_tablet &symbol_table)
Given a class and a component, identify the concrete method it is resolved to.
irep_idt component_identifier
irep_idt get_full_component_identifier() const
Get the full name of this function.
irep_idt class_identifier
const std::string & id2string(const irep_idt &d)
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
#define PRECONDITION(CONDITION)
const basest & bases() const
Get the collection of base classes/structs.
nonstd::optional< T > optionalt
const symbol_tablet & symbol_table
struct_tag_typet & type()
const symbolst & symbols
Read-only field, used to look up symbols given their names.
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
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...
ranget< iteratort > make_range(iteratort begin, iteratort end)
resolve_inherited_componentt(const symbol_tablet &symbol_table)
See the operator() method comment.
optionalt< inherited_componentt > operator()(const irep_idt &class_id, const irep_idt &component_name, bool include_interfaces, std::function< bool(const symbolt &)> user_filter=[](const symbolt &) { return true;})
Given a class and a component, identify the concrete field or method it is resolved to.
Base class or struct that a class or struct inherits from.