@@ -12,38 +12,29 @@ Author: Daniel Kroening, kroening@kroening.com
1212#ifndef CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
1313#define CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
1414
15- #define USE_DEPRECATED_STATIC_ANALYSIS_H
16- #include < analyses/static_analysis.h>
15+ #include < analyses/ai.h>
1716
1817#include " value_set_domain.h"
1918#include " value_sets.h"
2019
21- class xmlt ;
22-
23- void value_sets_to_xml (
24- const std::function<const value_sett &(goto_programt::const_targett)>
25- &get_value_set,
26- const goto_programt &goto_program,
27- xmlt &dest);
28-
2920// / This template class implements a data-flow analysis which keeps track of
3021// / what values different variables might have at different points in the
3122// / program. It is used through the alias `value_set_analysist`, so `VSDT` is
3223// / `value_set_domain_templatet<value_sett>`.
33- // /
34- // / Note: it is currently based on `static_analysist`, which is obsolete. It
35- // / should be moved onto `ait`.
36- template <class VSDT >
37- class value_set_analysis_templatet :
38- public value_setst,
39- public static_analysist<VSDT>
24+ template <class VSDT >
25+ class value_set_analysis_templatet : public value_setst , public ait <VSDT>
4026{
27+ private:
28+ const namespacet &ns;
29+
4130public:
4231 typedef VSDT domaint;
43- typedef static_analysist <domaint> baset;
32+ typedef ait <domaint> baset;
4433 typedef typename baset::locationt locationt;
4534
46- explicit value_set_analysis_templatet (const namespacet &ns):baset(ns)
35+ explicit value_set_analysis_templatet (const namespacet &_ns)
36+ : baset(util_make_unique<ai_domain_factory_location_constructort<VSDT>>()),
37+ ns(_ns)
4738 {
4839 }
4940
@@ -52,38 +43,17 @@ class value_set_analysis_templatet:
5243 return (*this )[t].value_set ;
5344 }
5445
55- void convert (
56- const goto_programt &goto_program,
57- xmlt &dest) const
58- {
59- using std::placeholders::_1;
60- value_sets_to_xml (
61- std::bind (&value_set_analysis_templatet::get_value_set, *this , _1),
62- goto_program,
63- dest);
64- }
65-
6646public:
6747 // interface value_sets
6848 std::vector<exprt>
6949 get_values (const irep_idt &, locationt l, const exprt &expr) override
7050 {
71- return (*this )[l].value_set .get_value_set (expr, baset:: ns);
51+ return (*this )[l].value_set .get_value_set (expr, ns);
7252 }
7353};
7454
7555typedef
7656 value_set_analysis_templatet<value_set_domain_templatet<value_sett>>
7757 value_set_analysist;
7858
79- void convert (
80- const goto_functionst &goto_functions,
81- const value_set_analysist &value_set_analysis,
82- xmlt &dest);
83-
84- void convert (
85- const goto_programt &goto_program,
86- const value_set_analysist &value_set_analysis,
87- xmlt &dest);
88-
8959#endif // CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
0 commit comments