@@ -24,20 +24,8 @@ class namespacet;
2424
2525class value_sett
2626{
27- typedef std::function<void (exprt &, const namespacet &)> expr_simplifiert;
28-
29- static expr_simplifiert default_simplifier;
30-
3127public:
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 )
4129 {
4230 }
4331
@@ -178,7 +166,7 @@ class value_sett
178166 typedef std::unordered_map<idt, entryt, string_hash> valuest;
179167 #endif
180168
181- void read_value_set (
169+ void get_value_set (
182170 const exprt &expr,
183171 value_setst::valuest &dest,
184172 const namespacet &ns) const ;
@@ -225,10 +213,7 @@ class value_sett
225213
226214 void apply_code (
227215 const codet &code,
228- const namespacet &ns)
229- {
230- apply_code_rec (code, ns);
231- }
216+ const namespacet &ns);
232217
233218 void assign (
234219 const exprt &lhs,
@@ -247,7 +232,7 @@ class value_sett
247232 const exprt &lhs,
248233 const namespacet &ns);
249234
250- void read_reference_set (
235+ void get_reference_set (
251236 const exprt &expr,
252237 value_setst::valuest &dest,
253238 const namespacet &ns) const ;
@@ -257,6 +242,13 @@ class value_sett
257242 const namespacet &ns) const ;
258243
259244protected:
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+
260252 void get_value_set (
261253 const exprt &expr,
262254 object_mapt &dest,
@@ -280,75 +272,21 @@ class value_sett
280272 const exprt &src,
281273 exprt &dest) const ;
282274
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 (
319276 const exprt &lhs,
320277 const object_mapt &values_rhs,
321278 const std::string &suffix,
322279 const namespacet &ns,
323280 bool add_to_sets);
324281
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,
328284 const namespacet &ns);
329285
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);
352290};
353291
354292#endif // CPROVER_POINTER_ANALYSIS_VALUE_SET_H
0 commit comments