cprover
resolve_inherited_component.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: GOTO Program Utilities
4
5Author: Diffblue Ltd.
6
7\*******************************************************************/
8
12
13#ifndef CPROVER_GOTO_PROGRAMS_RESOLVE_INHERITED_COMPONENT_H
14#define CPROVER_GOTO_PROGRAMS_RESOLVE_INHERITED_COMPONENT_H
15
16#include <util/irep.h>
17#include <util/optional.h>
18
19class symbolt;
20class symbol_tablet;
21
23{
24public:
26
28 {
29 public:
31 const irep_idt &class_id, const irep_idt &component_id):
32 class_identifier(class_id),
33 component_identifier(component_id)
34 {}
35
37
39 {
40 return class_identifier;
41 }
42
43 private:
46 };
47
49 const irep_idt &class_id,
50 const irep_idt &component_name,
51 bool include_interfaces,
52 std::function<bool(const symbolt &)> user_filter = [](const symbolt &) {
53 return true;
54 });
55
57 const irep_idt &class_name, const irep_idt &component_name);
58
59private:
61};
62
65 const irep_idt &call_basename,
66 const irep_idt &classname,
67 const symbol_tablet &symbol_table);
68
69#endif // CPROVER_GOTO_PROGRAMS_RESOLVE_INHERITED_COMPONENT_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:37
inherited_componentt(const irep_idt &class_id, const irep_idt &component_id)
irep_idt get_full_component_identifier() const
Get the full name of this function.
resolve_inherited_componentt(const symbol_tablet &symbol_table)
See the operator() method comment.
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...
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.
The symbol table.
Definition: symbol_table.h:14
Symbol table entry.
Definition: symbol.h:28
nonstd::optional< T > optionalt
Definition: optional.h:35
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.