@@ -24,20 +24,8 @@ class namespacet;
24
24
25
25
class value_sett
26
26
{
27
- typedef std::function<void (exprt &, const namespacet &)> expr_simplifiert;
28
-
29
- static expr_simplifiert default_simplifier;
30
-
31
27
public:
32
- value_sett ():
33
- location_number (0 ),
34
- simplifier (default_simplifier)
35
- {
36
- }
37
-
38
- explicit value_sett (expr_simplifiert simplifier):
39
- location_number(0 ),
40
- simplifier(std::move(simplifier))
28
+ value_sett ():location_number(0 )
41
29
{
42
30
}
43
31
@@ -178,7 +166,7 @@ class value_sett
178
166
typedef std::unordered_map<idt, entryt, string_hash> valuest;
179
167
#endif
180
168
181
- void read_value_set (
169
+ void get_value_set (
182
170
const exprt &expr,
183
171
value_setst::valuest &dest,
184
172
const namespacet &ns) const ;
@@ -225,10 +213,7 @@ class value_sett
225
213
226
214
void apply_code (
227
215
const codet &code,
228
- const namespacet &ns)
229
- {
230
- apply_code_rec (code, ns);
231
- }
216
+ const namespacet &ns);
232
217
233
218
void assign (
234
219
const exprt &lhs,
@@ -247,7 +232,7 @@ class value_sett
247
232
const exprt &lhs,
248
233
const namespacet &ns);
249
234
250
- void read_reference_set (
235
+ void get_reference_set (
251
236
const exprt &expr,
252
237
value_setst::valuest &dest,
253
238
const namespacet &ns) const ;
@@ -257,6 +242,13 @@ class value_sett
257
242
const namespacet &ns) const ;
258
243
259
244
protected:
245
+ void get_value_set_rec (
246
+ const exprt &expr,
247
+ object_mapt &dest,
248
+ const std::string &suffix,
249
+ const typet &original_type,
250
+ const namespacet &ns) const ;
251
+
260
252
void get_value_set (
261
253
const exprt &expr,
262
254
object_mapt &dest,
@@ -280,75 +272,21 @@ class value_sett
280
272
const exprt &src,
281
273
exprt &dest) const ;
282
274
283
- void do_free (
284
- const exprt &op,
285
- const namespacet &ns);
286
-
287
- exprt make_member (
288
- const exprt &src,
289
- const irep_idt &component_name,
290
- const namespacet &ns);
291
-
292
- // Expression simplification:
293
-
294
- private:
295
- // / Expression simplification function; by default, plain old
296
- // / util/simplify_expr, but can be customised by subclass.
297
- expr_simplifiert simplifier;
298
-
299
- protected:
300
- // / Run registered expression simplifier
301
- void run_simplifier (exprt &e, const namespacet &ns)
302
- {
303
- simplifier (e, ns);
304
- }
305
-
306
- // Subclass customisation points:
307
-
308
- protected:
309
- // / Subclass customisation point for recursion over RHS expression:
310
- virtual void get_value_set_rec (
311
- const exprt &expr,
312
- object_mapt &dest,
313
- const std::string &suffix,
314
- const typet &original_type,
315
- const namespacet &ns) const ;
316
-
317
- // / Subclass customisation point for recursion over LHS expression:
318
- virtual void assign_rec (
275
+ void assign_rec (
319
276
const exprt &lhs,
320
277
const object_mapt &values_rhs,
321
278
const std::string &suffix,
322
279
const namespacet &ns,
323
280
bool add_to_sets);
324
281
325
- // / Subclass customisation point for applying code to this domain:
326
- virtual void apply_code_rec (
327
- const codet &code,
282
+ void do_free (
283
+ const exprt &op,
328
284
const namespacet &ns);
329
285
330
- private:
331
- // / Subclass customisation point to filter or otherwise alter the value-set
332
- // / returned from get_value_set before it is passed into assign. For example,
333
- // / this is used in one subclass to tag and thus differentiate values that
334
- // / originated in a particular place, vs. those that have been copied.
335
- virtual void adjust_assign_rhs_values (
336
- const exprt &rhs,
337
- const namespacet &ns,
338
- object_mapt &rhs_values) const
339
- {
340
- }
341
-
342
- // / Subclass customisation point to apply global side-effects to this domain,
343
- // / after RHS values are read but before they are written. For example, this
344
- // / is used in a recency-analysis plugin to demote existing most-recent
345
- // / objects to general case ones.
346
- virtual void apply_assign_side_effects (
347
- const exprt &lhs,
348
- const exprt &rhs,
349
- const namespacet &ns)
350
- {
351
- }
286
+ exprt make_member (
287
+ const exprt &src,
288
+ const irep_idt &component_name,
289
+ const namespacet &ns);
352
290
};
353
291
354
292
#endif // CPROVER_POINTER_ANALYSIS_VALUE_SET_H
0 commit comments