Go to the documentation of this file.
17 : symbol_table(symbol_table)
35 bool include_interfaces)
40 std::vector<irep_idt> classes_to_visit;
41 classes_to_visit.push_back(class_id);
42 while(!classes_to_visit.empty())
44 irep_idt current_class = classes_to_visit.back();
45 classes_to_visit.pop_back();
47 const irep_idt &full_component_identifier=
55 const auto current_class_symbol_it =
63 return base.
type().get_identifier();
66 if(include_interfaces)
68 classes_to_visit.insert(
69 classes_to_visit.end(), parents.begin(), parents.end());
74 classes_to_visit.push_back(*parents.begin());
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
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.
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)
#define PRECONDITION(CONDITION)
const basest & bases() const
Get the collection of base classes/structs.
nonstd::optional< T > optionalt
struct_tag_typet & type()
const symbol_tablet & symbol_table
const symbolst & symbols
Read-only field, used to look up symbols given their names.
optionalt< 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.
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.
Base class or struct that a class or struct inherits from.