@@ -222,9 +222,11 @@ void arrayst::weg_path_condition(
222222{
223223 for (const auto &pn : path)
224224 {
225+ #if ARRAY_SPEEDUP_DEBUG
225226 std::cout << " edge: " << pn.n << " ->" <<
226227 pn.edge ->first << " " <<
227228 from_expr (arrays[pn.n ]) << " \n " ;
229+ #endif
228230
229231 const weg_edget &weg_edge=pn.edge ->second ;
230232
@@ -250,9 +252,11 @@ void arrayst::process_weg_path(const weg_patht &path)
250252 const index_sett &index_set_a=index_map[a];
251253 const index_sett &index_set_b=index_map[b];
252254
255+ #if ARRAY_SPEEDUP_DEBUG
253256 std::cout << " b is: "
254257 << from_expr (ns, " " , arrays[b])
255258 << ' \n ' ;
259+ #endif
256260
257261 for (const auto &index_a : index_set_a)
258262 {
@@ -279,9 +283,11 @@ void arrayst::process_weg_path(const weg_patht &path)
279283 implies_exprt implication (
280284 conjunction (cond),
281285 equal_exprt (a_i, value_b));
286+ #if ARRAY_SPEEDUP_DEBUG
282287 std::cout << " C2a: "
283288 << from_expr (ns, " " , implication)
284289 << ' \n ' ;
290+ #endif
285291 set_to_true (implication);
286292 }
287293 else if (arrays[b].id ()==ID_array_of)
@@ -303,9 +309,11 @@ void arrayst::process_weg_path(const weg_patht &path)
303309 implies_exprt implication (
304310 conjunction (cond),
305311 equal_exprt (a_i, value_b));
312+ #if ARRAY_SPEEDUP_DEBUG
306313 std::cout << " C2b: "
307314 << from_expr (ns, " " , implication)
308315 << ' \n ' ;
316+ #endif
309317 set_to_true (implication);
310318 }
311319
@@ -332,9 +340,11 @@ void arrayst::process_weg_path(const weg_patht &path)
332340 implies_exprt implication (
333341 conjunction (cond),
334342 equal_exprt (a_i, b_i));
343+ #if ARRAY_SPEEDUP_DEBUG
335344 std::cout << " C3: "
336345 << from_expr (ns, " " , implication)
337346 << ' \n ' ;
347+ #endif
338348 set_to_true (implication);
339349 }
340350 }
@@ -343,21 +353,25 @@ void arrayst::process_weg_path(const weg_patht &path)
343353
344354void arrayst::add_array_constraints ()
345355{
356+ #if ARRAY_SPEEDUP_DEBUG
346357 for (const auto & a : arrays)
347358 {
348359 std::cout << " array: " << from_expr (ns, " " , a)
349360 << ' \n ' ;
350361 }
362+ #endif
351363
352364 // auxiliary bit per node for DFS
353365 std::vector<bool > visited;
354366 visited.resize (weg.size ());
355367
356368 for (wegt::node_indext a=0 ; a<arrays.size (); a++)
357369 {
370+ #if ARRAY_SPEEDUP_DEBUG
358371 std::cout << " a is: "
359372 << from_expr (ns, " " , arrays[a])
360373 << ' \n ' ;
374+ #endif
361375
362376 // DFS from a_i to anything reachable in 'weg'
363377 std::fill (visited.begin (), visited.end (), false );
@@ -455,11 +469,13 @@ void arrayst::add_array_Ackermann_constraints()
455469 equal_exprt values_equal (index_expr1, index_expr2);
456470 prop.lcnf (!indices_equal_lit, convert (values_equal));
457471
472+ #if ARRAY_SPEEDUP_DEBUG
458473 std::cout << " C4: "
459474 << from_expr (ns, " " , indices_equal)
460475 << " => "
461476 << from_expr (ns, " " , values_equal)
462477 << ' \n ' ;
478+ #endif
463479 }
464480 }
465481 }
0 commit comments