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