@@ -65,26 +65,23 @@ class interval_sparse_arrayt final : public sparse_arrayt
65
65
class equation_symbol_mappingt
66
66
{
67
67
public:
68
- // Record index of the equations that contain a given expression
68
+ // / Record the fact that equation `i` contains expression `expr`
69
+ void add (const std::size_t i, const exprt &expr);
70
+
71
+ // / \param i: index corresponding to an equation
72
+ // / \return vector of expressions contained in the equation with the given
73
+ // / index `i`
74
+ std::vector<exprt> find_expressions (const std::size_t i);
75
+
76
+ // / \param expr: an expression
77
+ // / \return vector of equations containing the given expression `expr`
78
+ std::vector<std::size_t > find_equations (const exprt &expr);
79
+
80
+ private:
81
+ // / Record index of the equations that contain a given expression
69
82
std::map<exprt, std::vector<std::size_t >> equations_containing;
70
- // Record expressions that are contained in the equation with the given index
83
+ // / Record expressions that are contained in the equation with the given index
71
84
std::unordered_map<std::size_t , std::vector<exprt>> strings_in_equation;
72
-
73
- void add (const std::size_t i, const exprt &expr)
74
- {
75
- equations_containing[expr].push_back (i);
76
- strings_in_equation[i].push_back (expr);
77
- }
78
-
79
- std::vector<exprt> find_expressions (const std::size_t i)
80
- {
81
- return strings_in_equation[i];
82
- }
83
-
84
- std::vector<std::size_t > find_equations (const exprt &expr)
85
- {
86
- return equations_containing[expr];
87
- }
88
85
};
89
86
90
87
#endif // CPROVER_SOLVERS_REFINEMENT_STRING_REFINEMENT_UTIL_H
0 commit comments