@@ -85,6 +85,18 @@ static void initial_index_set(
8585
8686exprt simplify_sum (const exprt &f);
8787
88+ static void update_index_set (
89+ std::map<exprt, std::set<exprt>> &index_set,
90+ std::map<exprt, std::set<exprt>> ¤t_index_set,
91+ const namespacet &ns,
92+ const std::vector<exprt> &cur);
93+
94+ static void update_index_set (
95+ std::map<exprt, std::set<exprt>> &index_set,
96+ std::map<exprt, std::set<exprt>> ¤t_index_set,
97+ const namespacet &ns,
98+ const exprt &formula);
99+
88100// / Convert exprt to a specific type. Throw bad_cast if conversion
89101// / cannot be performed
90102// / Generic case doesn't exist, specialize for different types accordingly
@@ -682,7 +694,7 @@ decision_proceduret::resultt string_refinementt::dec_solve()
682694 }
683695
684696 initial_index_set (index_set, current_index_set, ns, universal_axioms);
685- update_index_set (cur);
697+ update_index_set (index_set, current_index_set, ns, cur);
686698 cur.clear ();
687699 for (const auto & lemma :
688700 generate_instantiations (current_index_set, universal_axioms))
@@ -727,7 +739,7 @@ decision_proceduret::resultt string_refinementt::dec_solve()
727739 // and instantiating universal formulas with this indices.
728740 // We will then relaunch the solver with these added lemmas.
729741 current_index_set.clear ();
730- update_index_set (cur);
742+ update_index_set (index_set, current_index_set, ns, cur);
731743 cur.clear ();
732744 for (const auto & lemma :
733745 generate_instantiations (current_index_set, universal_axioms))
@@ -1626,10 +1638,14 @@ static void initial_index_set(
16261638
16271639// / add to the index set all the indices that appear in the formulas
16281640// / \par parameters: a list of string constraints
1629- void string_refinementt::update_index_set (const std::vector<exprt> &cur)
1641+ static void update_index_set (
1642+ std::map<exprt, std::set<exprt>> &index_set,
1643+ std::map<exprt, std::set<exprt>> ¤t_index_set,
1644+ const namespacet &ns,
1645+ const std::vector<exprt> &cur)
16301646{
16311647 for (const auto &axiom : cur)
1632- update_index_set (axiom);
1648+ update_index_set (index_set, current_index_set, ns, axiom);
16331649}
16341650
16351651// / An expression representing an array of characters can be in the form of an
@@ -1719,7 +1735,11 @@ static void initial_index_set(
17191735
17201736// / add to the index set all the indices that appear in the formula
17211737// / \par parameters: a string constraint
1722- void string_refinementt::update_index_set (const exprt &formula)
1738+ static void update_index_set (
1739+ std::map<exprt, std::set<exprt>> &index_set,
1740+ std::map<exprt, std::set<exprt>> ¤t_index_set,
1741+ const namespacet &ns,
1742+ const exprt &formula)
17231743{
17241744 std::list<exprt> to_process;
17251745 to_process.push_back (formula);
0 commit comments