Skip to content

Commit c8d32fd

Browse files
author
Daniel Kroening
authored
Merge pull request #1269 from tautschnig/fix-array-cleanup
Fix overly long lines and use iostream for debugging only
2 parents 3f89279 + c96325b commit c8d32fd

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/solvers/flattening/arrays.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Author: Daniel Kroening, [email protected]
88

99
#include "arrays.h"
1010

11-
#include <iostream>
12-
1311
#include <langapi/language_util.h>
1412

1513
#include <util/std_expr.h>
@@ -20,6 +18,10 @@ Author: Daniel Kroening, [email protected]
2018

2119
#include <solvers/prop/prop.h>
2220

21+
#ifdef DEBUG
22+
#include <iostream>
23+
#endif
24+
2325
arrayst::arrayst(
2426
const namespacet &_ns,
2527
propt &_prop):equalityt(_ns, _prop)
@@ -48,7 +50,9 @@ literalt arrayst::record_array_equality(
4850
if(!base_type_eq(op0.type(), op1.type(), ns))
4951
{
5052
prop.error() << equality.pretty() << messaget::eom;
51-
DATA_INVARIANT(false, "record_array_equality got equality without matching types");
53+
DATA_INVARIANT(
54+
false,
55+
"record_array_equality got equality without matching types");
5256
}
5357

5458
DATA_INVARIANT(
@@ -133,7 +137,9 @@ void arrayst::collect_arrays(const exprt &a)
133137
if(!base_type_eq(array_type, update_expr.old().type(), ns))
134138
{
135139
prop.error() << a.pretty() << messaget::eom;
136-
DATA_INVARIANT(false, "collect_arrays got 'update' without matching types");
140+
DATA_INVARIANT(
141+
false,
142+
"collect_arrays got 'update' without matching types");
137143
}
138144

139145
arrays.make_union(a, update_expr.old());
@@ -291,7 +297,7 @@ void arrayst::add_array_Ackermann_constraints()
291297
{
292298
// this is quadratic!
293299

294-
#if 0
300+
#ifdef DEBUG
295301
std::cout << "arrays.size(): " << arrays.size() << '\n';
296302
#endif
297303

@@ -300,7 +306,7 @@ void arrayst::add_array_Ackermann_constraints()
300306
{
301307
const index_sett &index_set=index_map[arrays.find_number(i)];
302308

303-
#if 0
309+
#ifdef DEBUG
304310
std::cout << "index_set.size(): " << index_set.size() << '\n';
305311
#endif
306312

0 commit comments

Comments
 (0)