@@ -222,9 +222,11 @@ void arrayst::weg_path_condition(
222
222
{
223
223
for (const auto &pn : path)
224
224
{
225
+ #if ARRAY_SPEEDUP_DEBUG
225
226
std::cout << " edge: " << pn.n << " ->" <<
226
227
pn.edge ->first << " " <<
227
228
from_expr (arrays[pn.n ]) << " \n " ;
229
+ #endif
228
230
229
231
const weg_edget &weg_edge=pn.edge ->second ;
230
232
@@ -250,9 +252,11 @@ void arrayst::process_weg_path(const weg_patht &path)
250
252
const index_sett &index_set_a=index_map[a];
251
253
const index_sett &index_set_b=index_map[b];
252
254
255
+ #if ARRAY_SPEEDUP_DEBUG
253
256
std::cout << " b is: "
254
257
<< from_expr (ns, " " , arrays[b])
255
258
<< ' \n ' ;
259
+ #endif
256
260
257
261
for (const auto &index_a : index_set_a)
258
262
{
@@ -279,9 +283,11 @@ void arrayst::process_weg_path(const weg_patht &path)
279
283
implies_exprt implication (
280
284
conjunction (cond),
281
285
equal_exprt (a_i, value_b));
286
+ #if ARRAY_SPEEDUP_DEBUG
282
287
std::cout << " C2a: "
283
288
<< from_expr (ns, " " , implication)
284
289
<< ' \n ' ;
290
+ #endif
285
291
set_to_true (implication);
286
292
}
287
293
else if (arrays[b].id ()==ID_array_of)
@@ -303,9 +309,11 @@ void arrayst::process_weg_path(const weg_patht &path)
303
309
implies_exprt implication (
304
310
conjunction (cond),
305
311
equal_exprt (a_i, value_b));
312
+ #if ARRAY_SPEEDUP_DEBUG
306
313
std::cout << " C2b: "
307
314
<< from_expr (ns, " " , implication)
308
315
<< ' \n ' ;
316
+ #endif
309
317
set_to_true (implication);
310
318
}
311
319
@@ -332,9 +340,11 @@ void arrayst::process_weg_path(const weg_patht &path)
332
340
implies_exprt implication (
333
341
conjunction (cond),
334
342
equal_exprt (a_i, b_i));
343
+ #if ARRAY_SPEEDUP_DEBUG
335
344
std::cout << " C3: "
336
345
<< from_expr (ns, " " , implication)
337
346
<< ' \n ' ;
347
+ #endif
338
348
set_to_true (implication);
339
349
}
340
350
}
@@ -343,21 +353,25 @@ void arrayst::process_weg_path(const weg_patht &path)
343
353
344
354
void arrayst::add_array_constraints ()
345
355
{
356
+ #if ARRAY_SPEEDUP_DEBUG
346
357
for (const auto & a : arrays)
347
358
{
348
359
std::cout << " array: " << from_expr (ns, " " , a)
349
360
<< ' \n ' ;
350
361
}
362
+ #endif
351
363
352
364
// auxiliary bit per node for DFS
353
365
std::vector<bool > visited;
354
366
visited.resize (weg.size ());
355
367
356
368
for (wegt::node_indext a=0 ; a<arrays.size (); a++)
357
369
{
370
+ #if ARRAY_SPEEDUP_DEBUG
358
371
std::cout << " a is: "
359
372
<< from_expr (ns, " " , arrays[a])
360
373
<< ' \n ' ;
374
+ #endif
361
375
362
376
// DFS from a_i to anything reachable in 'weg'
363
377
std::fill (visited.begin (), visited.end (), false );
@@ -455,11 +469,13 @@ void arrayst::add_array_Ackermann_constraints()
455
469
equal_exprt values_equal (index_expr1, index_expr2);
456
470
prop.lcnf (!indices_equal_lit, convert (values_equal));
457
471
472
+ #if ARRAY_SPEEDUP_DEBUG
458
473
std::cout << " C4: "
459
474
<< from_expr (ns, " " , indices_equal)
460
475
<< " => "
461
476
<< from_expr (ns, " " , values_equal)
462
477
<< ' \n ' ;
478
+ #endif
463
479
}
464
480
}
465
481
}
0 commit comments