Skip to content

Commit b0c69ff

Browse files
Tuttletautschnig
Tuttle
authored andcommitted
Excluded array-speedup debugging output.
1 parent d8efbee commit b0c69ff

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/solvers/flattening/arrays.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ void arrayst::weg_path_condition(
221221
{
222222
for(const auto &pn : path)
223223
{
224+
#if ARRAY_SPEEDUP_DEBUG
224225
std::cout << "edge: " << pn.n << "->" <<
225226
pn.edge->first << " " <<
226227
format(arrays[pn.n]) << "\n";
228+
#endif
227229

228230
const weg_edget &weg_edge=pn.edge->second;
229231

@@ -249,9 +251,11 @@ void arrayst::process_weg_path(const weg_patht &path)
249251
const index_sett &index_set_a=index_map[a];
250252
const index_sett &index_set_b=index_map[b];
251253

254+
#if ARRAY_SPEEDUP_DEBUG
252255
std::cout << "b is: "
253256
<< format(arrays[b])
254257
<< '\n';
258+
#endif
255259

256260
for(const auto &index_a : index_set_a)
257261
{
@@ -278,9 +282,11 @@ void arrayst::process_weg_path(const weg_patht &path)
278282
implies_exprt implication(
279283
conjunction(cond),
280284
equal_exprt(a_i, value_b));
285+
#if ARRAY_SPEEDUP_DEBUG
281286
std::cout << "C2a: "
282287
<< format(implication)
283288
<< '\n';
289+
#endif
284290
set_to_true(implication);
285291
}
286292
else if(arrays[b].id()==ID_array_of)
@@ -302,9 +308,11 @@ void arrayst::process_weg_path(const weg_patht &path)
302308
implies_exprt implication(
303309
conjunction(cond),
304310
equal_exprt(a_i, value_b));
311+
#if ARRAY_SPEEDUP_DEBUG
305312
std::cout << "C2b: "
306313
<< format(implication)
307314
<< '\n';
315+
#endif
308316
set_to_true(implication);
309317
}
310318

@@ -331,9 +339,11 @@ void arrayst::process_weg_path(const weg_patht &path)
331339
implies_exprt implication(
332340
conjunction(cond),
333341
equal_exprt(a_i, b_i));
342+
#if ARRAY_SPEEDUP_DEBUG
334343
std::cout << "C3: "
335344
<< format(implication)
336345
<< '\n';
346+
#endif
337347
set_to_true(implication);
338348
}
339349
}
@@ -342,21 +352,25 @@ void arrayst::process_weg_path(const weg_patht &path)
342352

343353
void arrayst::add_array_constraints()
344354
{
355+
#if ARRAY_SPEEDUP_DEBUG
345356
for(const auto & a : arrays)
346357
{
347358
std::cout << "array: " << format(a)
348359
<< '\n';
349360
}
361+
#endif
350362

351363
// auxiliary bit per node for DFS
352364
std::vector<bool> visited;
353365
visited.resize(weg.size());
354366

355367
for(wegt::node_indext a=0; a<arrays.size(); a++)
356368
{
369+
#if ARRAY_SPEEDUP_DEBUG
357370
std::cout << "a is: "
358371
<< format(arrays[a])
359372
<< '\n';
373+
#endif
360374

361375
// DFS from a_i to anything reachable in 'weg'
362376
std::fill(visited.begin(), visited.end(), false);
@@ -454,11 +468,13 @@ void arrayst::add_array_Ackermann_constraints()
454468
equal_exprt values_equal(index_expr1, index_expr2);
455469
prop.lcnf(!indices_equal_lit, convert(values_equal));
456470

471+
#if ARRAY_SPEEDUP_DEBUG
457472
std::cout << "C4: "
458473
<< format(indices_equal)
459474
<< " => "
460475
<< format(values_equal)
461476
<< '\n';
477+
#endif
462478
}
463479
}
464480
}

0 commit comments

Comments
 (0)