1
+ /* ******************************************************************\
2
+
3
+ Module:
4
+
5
+ Author: Daniel Kroening, [email protected]
6
+
7
+ \*******************************************************************/
8
+
1
9
#include " namespace_utils.h"
2
10
#include " symbol.h"
3
11
#include < goto-programs/remove_returns.h>
4
12
5
-
6
13
/* ******************************************************************\
14
+
7
15
Function: namespace_utils_baset::does_symbol_match
8
16
9
17
Purpose:
19
27
Whether the exprt was actually a symbolt matching a predicate
20
28
21
29
\*******************************************************************/
30
+
22
31
bool namespace_utils_baset::does_symbol_match (
23
32
const exprt &lvalue,
24
33
std::function<bool (symbolt)> predicate) const
@@ -32,6 +41,7 @@ bool namespace_utils_baset::does_symbol_match(
32
41
}
33
42
34
43
/* ******************************************************************\
44
+
35
45
Function: namespace_utils_baset::is_parameter
36
46
37
47
Purpose:
@@ -45,6 +55,7 @@ bool namespace_utils_baset::does_symbol_match(
45
55
Whether the exprt was actually a parameter symbol
46
56
47
57
\*******************************************************************/
58
+
48
59
bool namespace_utils_baset::is_parameter (const exprt &lvalue) const
49
60
{
50
61
return does_symbol_match (
@@ -53,6 +64,7 @@ bool namespace_utils_baset::is_parameter(const exprt &lvalue) const
53
64
}
54
65
55
66
/* ******************************************************************\
67
+
56
68
Function: namespace_utils_baset::is_static
57
69
58
70
Purpose:
@@ -66,6 +78,7 @@ bool namespace_utils_baset::is_parameter(const exprt &lvalue) const
66
78
Whether the exprt was actually a static symbol
67
79
68
80
\*******************************************************************/
81
+
69
82
bool namespace_utils_baset::is_static (const exprt &lvalue) const
70
83
{
71
84
// TODO: Also check for static member accesses
@@ -75,6 +88,7 @@ bool namespace_utils_baset::is_static(const exprt &lvalue) const
75
88
}
76
89
77
90
/* ******************************************************************\
91
+
78
92
Function: namespace_utils_baset::is_auxiliary_variable
79
93
80
94
Purpose:
@@ -88,6 +102,7 @@ bool namespace_utils_baset::is_static(const exprt &lvalue) const
88
102
Whether the exprt was actually an auxiliary variable symbol
89
103
90
104
\*******************************************************************/
105
+
91
106
bool namespace_utils_baset::is_auxiliary_variable (const exprt &lvalue) const
92
107
{
93
108
return does_symbol_match (
@@ -96,6 +111,7 @@ bool namespace_utils_baset::is_auxiliary_variable(const exprt &lvalue) const
96
111
}
97
112
98
113
/* ******************************************************************\
114
+
99
115
Function: namespace_utils_baset::is_return_value_auxiliary
100
116
101
117
Purpose:
@@ -109,6 +125,7 @@ bool namespace_utils_baset::is_auxiliary_variable(const exprt &lvalue) const
109
125
Whether the exprt was actually an auxiliary return value symbol
110
126
111
127
\*******************************************************************/
128
+
112
129
bool namespace_utils_baset::is_return_value_auxiliary (const exprt &lvalue) const
113
130
{
114
131
return
0 commit comments