File tree Expand file tree Collapse file tree 2 files changed +33
-35
lines changed Expand file tree Collapse file tree 2 files changed +33
-35
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,39 @@ Author: Daniel Kroening, kroening@kroening.com
1717#include " std_types.h"
1818#include " namespace.h"
1919#include " symbol.h"
20+ #include " union_find.h"
21+
22+ class base_type_eqt
23+ {
24+ public:
25+ explicit base_type_eqt (const namespacet &_ns):ns(_ns)
26+ {
27+ }
28+
29+ bool base_type_eq (const typet &type1, const typet &type2)
30+ {
31+ identifiers.clear ();
32+ return base_type_eq_rec (type1, type2);
33+ }
34+
35+ bool base_type_eq (const exprt &expr1, const exprt &expr2)
36+ {
37+ identifiers.clear ();
38+ return base_type_eq_rec (expr1, expr2);
39+ }
40+
41+ virtual ~base_type_eqt () { }
42+
43+ protected:
44+ const namespacet &ns;
45+
46+ virtual bool base_type_eq_rec (const typet &type1, const typet &type2);
47+ virtual bool base_type_eq_rec (const exprt &expr1, const exprt &expr2);
48+
49+ // for loop avoidance
50+ typedef union_find<irep_idt> identifierst;
51+ identifierst identifiers;
52+ };
2053
2154void base_type_rec (
2255 typet &type, const namespacet &ns, std::set<irep_idt> &symb)
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ Author: Daniel Kroening, kroening@kroening.com
1212#ifndef CPROVER_UTIL_BASE_TYPE_H
1313#define CPROVER_UTIL_BASE_TYPE_H
1414
15- #include " union_find.h"
16- #include " irep.h"
17-
1815class exprt ;
1916class typet ;
2017class namespacet ;
@@ -29,36 +26,4 @@ bool base_type_eq(
2926 const exprt &expr2,
3027 const namespacet &ns);
3128
32- class base_type_eqt
33- {
34- public:
35- explicit base_type_eqt (const namespacet &_ns):ns(_ns)
36- {
37- }
38-
39- bool base_type_eq (const typet &type1, const typet &type2)
40- {
41- identifiers.clear ();
42- return base_type_eq_rec (type1, type2);
43- }
44-
45- bool base_type_eq (const exprt &expr1, const exprt &expr2)
46- {
47- identifiers.clear ();
48- return base_type_eq_rec (expr1, expr2);
49- }
50-
51- virtual ~base_type_eqt () { }
52-
53- protected:
54- const namespacet &ns;
55-
56- virtual bool base_type_eq_rec (const typet &type1, const typet &type2);
57- virtual bool base_type_eq_rec (const exprt &expr1, const exprt &expr2);
58-
59- // for loop avoidance
60- typedef union_find<irep_idt> identifierst;
61- identifierst identifiers;
62- };
63-
6429#endif // CPROVER_UTIL_BASE_TYPE_H
You can’t perform that action at this time.
0 commit comments