cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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/irep.h
>
17
18
#include <functional>
19
#include <optional>
20
21
class
symbolt
;
22
class
symbol_table_baset
;
23
24
class
resolve_inherited_componentt
25
{
26
public
:
27
explicit
resolve_inherited_componentt
(
const
symbol_table_baset
&
symbol_table
);
28
29
class
inherited_componentt
30
{
31
public
:
32
inherited_componentt
(
33
const
irep_idt
&class_id,
const
irep_idt
&component_id):
34
class_identifier
(class_id),
35
component_identifier
(component_id)
36
{}
37
38
irep_idt
get_full_component_identifier
()
const
;
39
40
irep_idt
get_class_identifier
()
const
41
{
42
return
class_identifier
;
43
}
44
45
private
:
46
irep_idt
class_identifier
;
47
irep_idt
component_identifier
;
48
};
49
50
std::optional<inherited_componentt>
operator()
(
51
const
irep_idt
&class_id,
52
const
irep_idt
&component_name,
53
bool
include_interfaces,
54
std::function<
bool
(
const
symbolt
&)> user_filter = [](
const
symbolt
&) {
55
return
true
;
56
});
57
58
static
irep_idt
build_full_component_identifier
(
59
const
irep_idt
&class_name,
const
irep_idt
&component_name);
60
61
private
:
62
const
symbol_table_baset
&
symbol_table
;
63
};
64
65
std::optional<resolve_inherited_componentt::inherited_componentt>
66
get_inherited_method_implementation
(
67
const
irep_idt
&call_basename,
68
const
irep_idt
&classname,
69
const
symbol_table_baset
&symbol_table);
70
71
#endif
// CPROVER_GOTO_PROGRAMS_RESOLVE_INHERITED_COMPONENT_H
resolve_inherited_componentt::inherited_componentt::inherited_componentt
inherited_componentt(const irep_idt &class_id, const irep_idt &component_id)
Definition
resolve_inherited_component.h:32
resolve_inherited_componentt::inherited_componentt::component_identifier
irep_idt component_identifier
Definition
resolve_inherited_component.h:47
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:106
resolve_inherited_componentt::inherited_componentt::class_identifier
irep_idt class_identifier
Definition
resolve_inherited_component.h:46
resolve_inherited_componentt::inherited_componentt::get_class_identifier
irep_idt get_class_identifier() const
Definition
resolve_inherited_component.h:40
resolve_inherited_componentt::resolve_inherited_componentt
resolve_inherited_componentt(const symbol_table_baset &symbol_table)
See the operator() method comment.
Definition
resolve_inherited_component.cpp:17
resolve_inherited_componentt::operator()
std::optional< 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:36
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:94
resolve_inherited_componentt::symbol_table
const symbol_table_baset & symbol_table
Definition
resolve_inherited_component.h:62
symbol_table_baset
The symbol table base class interface.
Definition
symbol_table_base.h:23
symbolt
Symbol table entry.
Definition
symbol.h:28
irep.h
get_inherited_method_implementation
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.
Definition
resolve_inherited_component.cpp:126
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
goto-programs
resolve_inherited_component.h
Generated by
1.17.0