cprover
resolve_inherited_component.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: GOTO Program Utilities
4 
5 Author: 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/symbol_table.h>
17 #include <util/std_expr.h>
18 #include <util/std_code.h>
20 
22 {
23 public:
25 
27  {
28  public:
30  const irep_idt &class_id, const irep_idt &component_id):
31  class_identifier(class_id),
32  component_identifier(component_id)
33  {}
34 
36 
38  {
39  return class_identifier;
40  }
41 
42  private:
45  };
46 
48  const irep_idt &class_id,
49  const irep_idt &component_name,
50  bool include_interfaces,
51  std::function<bool(const symbolt &)> user_filter = [](const symbolt &) {
52  return true;
53  });
54 
56  const irep_idt &class_name, const irep_idt &component_name);
57 
58 private:
60 };
61 
64  const irep_idt &call_basename,
65  const irep_idt &classname,
66  const symbol_tablet &symbol_table);
67 
68 #endif // CPROVER_GOTO_PROGRAMS_RESOLVE_INHERITED_COMPONENT_H
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:37
symbol_tablet
The symbol table.
Definition: symbol_table.h:20
resolve_inherited_componentt::inherited_componentt
Definition: resolve_inherited_component.h:27
resolve_inherited_componentt::inherited_componentt::component_identifier
irep_idt component_identifier
Definition: resolve_inherited_component.h:44
resolve_inherited_componentt::inherited_componentt::get_full_component_identifier
irep_idt get_full_component_identifier() const
Get the full name of this function.
Definition: resolve_inherited_component.cpp:104
get_inherited_method_implementation
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.
Definition: resolve_inherited_component.cpp:124
resolve_inherited_componentt::inherited_componentt::class_identifier
irep_idt class_identifier
Definition: resolve_inherited_component.h:43
std_code.h
optionalt
nonstd::optional< T > optionalt
Definition: optional.h:35
resolve_inherited_componentt::inherited_componentt::get_class_identifier
irep_idt get_class_identifier() const
Definition: resolve_inherited_component.h:37
class_hierarchy.h
Class Hierarchy.
resolve_inherited_componentt::symbol_table
const symbol_tablet & symbol_table
Definition: resolve_inherited_component.h:59
symbolt
Symbol table entry.
Definition: symbol.h:28
resolve_inherited_componentt::inherited_componentt::inherited_componentt
inherited_componentt(const irep_idt &class_id, const irep_idt &component_id)
Definition: resolve_inherited_component.h:29
resolve_inherited_componentt::build_full_component_identifier
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...
Definition: resolve_inherited_component.cpp:92
symbol_table.h
Author: Diffblue Ltd.
std_expr.h
API to expression classes.
resolve_inherited_componentt::resolve_inherited_componentt
resolve_inherited_componentt(const symbol_tablet &symbol_table)
See the operator() method comment.
Definition: resolve_inherited_component.cpp:15
resolve_inherited_componentt::operator()
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.
Definition: resolve_inherited_component.cpp:34
resolve_inherited_componentt
Definition: resolve_inherited_component.h:22