8
8
9
9
#include " variable_sensitivity_object_factory.h"
10
10
11
- #include < util/namespace.h>
12
-
13
11
#include " constant_abstract_value.h"
14
12
#include " constant_pointer_abstract_object.h"
15
13
#include " data_dependency_context.h"
@@ -44,7 +42,7 @@ abstract_object_pointert create_abstract_object(
44
42
if (top || bottom)
45
43
return std::make_shared<abstract_object_classt>(type, top, bottom);
46
44
47
- PRECONDITION (type == ns. follow ( e.type () ));
45
+ PRECONDITION (type == e.type ());
48
46
return std::make_shared<abstract_object_classt>(e, environment, ns);
49
47
}
50
48
@@ -124,11 +122,11 @@ variable_sensitivity_object_factoryt::get_abstract_object_type(
124
122
{
125
123
return configuration.pointer_abstract_type ;
126
124
}
127
- else if (type.id () == ID_struct)
125
+ else if (type.id () == ID_struct || type. id () == ID_struct_tag )
128
126
{
129
127
return configuration.struct_abstract_type ;
130
128
}
131
- else if (type.id () == ID_union)
129
+ else if (type.id () == ID_union || type. id () == ID_union_tag )
132
130
{
133
131
return configuration.union_abstract_type ;
134
132
}
@@ -149,52 +147,50 @@ variable_sensitivity_object_factoryt::get_abstract_object(
149
147
const abstract_environmentt &environment,
150
148
const namespacet &ns) const
151
149
{
152
- const typet &followed_type = ns.follow (type);
153
- ABSTRACT_OBJECT_TYPET abstract_object_type =
154
- get_abstract_object_type (followed_type);
150
+ ABSTRACT_OBJECT_TYPET abstract_object_type = get_abstract_object_type (type);
155
151
156
152
switch (abstract_object_type)
157
153
{
158
154
case TWO_VALUE:
159
155
return initialize_abstract_object<abstract_objectt>(
160
- followed_type , top, bottom, e, environment, ns, configuration);
156
+ type , top, bottom, e, environment, ns, configuration);
161
157
case CONSTANT:
162
158
return initialize_abstract_object<constant_abstract_valuet>(
163
- followed_type , top, bottom, e, environment, ns, configuration);
159
+ type , top, bottom, e, environment, ns, configuration);
164
160
case INTERVAL:
165
161
return initialize_abstract_object<interval_abstract_valuet>(
166
- followed_type , top, bottom, e, environment, ns, configuration);
162
+ type , top, bottom, e, environment, ns, configuration);
167
163
case VALUE_SET:
168
164
return initialize_abstract_object<value_set_abstract_objectt>(
169
- followed_type , top, bottom, e, environment, ns, configuration);
165
+ type , top, bottom, e, environment, ns, configuration);
170
166
171
167
case ARRAY_INSENSITIVE:
172
168
return initialize_abstract_object<two_value_array_abstract_objectt>(
173
- followed_type , top, bottom, e, environment, ns, configuration);
169
+ type , top, bottom, e, environment, ns, configuration);
174
170
case ARRAY_SENSITIVE:
175
171
return initialize_abstract_object<full_array_abstract_objectt>(
176
- followed_type , top, bottom, e, environment, ns, configuration);
172
+ type , top, bottom, e, environment, ns, configuration);
177
173
178
174
case POINTER_INSENSITIVE:
179
175
return initialize_abstract_object<two_value_pointer_abstract_objectt>(
180
- followed_type , top, bottom, e, environment, ns, configuration);
176
+ type , top, bottom, e, environment, ns, configuration);
181
177
case POINTER_SENSITIVE:
182
178
return initialize_abstract_object<constant_pointer_abstract_objectt>(
183
- followed_type , top, bottom, e, environment, ns, configuration);
179
+ type , top, bottom, e, environment, ns, configuration);
184
180
case VALUE_SET_OF_POINTERS:
185
181
return initialize_abstract_object<value_set_pointer_abstract_objectt>(
186
- followed_type , top, bottom, e, environment, ns, configuration);
182
+ type , top, bottom, e, environment, ns, configuration);
187
183
188
184
case STRUCT_INSENSITIVE:
189
185
return initialize_abstract_object<two_value_struct_abstract_objectt>(
190
- followed_type , top, bottom, e, environment, ns, configuration);
186
+ type , top, bottom, e, environment, ns, configuration);
191
187
case STRUCT_SENSITIVE:
192
188
return initialize_abstract_object<full_struct_abstract_objectt>(
193
- followed_type , top, bottom, e, environment, ns, configuration);
189
+ type , top, bottom, e, environment, ns, configuration);
194
190
195
191
case UNION_INSENSITIVE:
196
192
return initialize_abstract_object<two_value_union_abstract_objectt>(
197
- followed_type , top, bottom, e, environment, ns, configuration);
193
+ type , top, bottom, e, environment, ns, configuration);
198
194
199
195
case HEAP_ALLOCATION:
200
196
{
@@ -210,7 +206,7 @@ variable_sensitivity_object_factoryt::get_abstract_object(
210
206
default :
211
207
UNREACHABLE;
212
208
return initialize_abstract_object<abstract_objectt>(
213
- followed_type , top, bottom, e, environment, ns, configuration);
209
+ type , top, bottom, e, environment, ns, configuration);
214
210
}
215
211
}
216
212
0 commit comments