@@ -49,7 +49,7 @@ literalt arrayst::record_array_equality(
49
49
// check types
50
50
if (!base_type_eq (op0.type (), op1.type (), ns))
51
51
{
52
- std::cout << equality.pretty () << ' \n ' ;
52
+ prop. error () << equality.pretty () << messaget::eom ;
53
53
throw " record_array_equality got equality without matching types" ;
54
54
}
55
55
@@ -115,7 +115,7 @@ void arrayst::collect_arrays(const exprt &a)
115
115
// check types
116
116
if (!base_type_eq (array_type, a.op0 ().type (), ns))
117
117
{
118
- std::cout << a.pretty () << ' \n ' ;
118
+ prop. error () << a.pretty () << messaget::eom ;
119
119
throw " collect_arrays got 'with' without matching types" ;
120
120
}
121
121
@@ -137,7 +137,7 @@ void arrayst::collect_arrays(const exprt &a)
137
137
// check types
138
138
if (!base_type_eq (array_type, a.op0 ().type (), ns))
139
139
{
140
- std::cout << a.pretty () << ' \n ' ;
140
+ prop. error () << a.pretty () << messaget::eom ;
141
141
throw " collect_arrays got 'update' without matching types" ;
142
142
}
143
143
@@ -161,14 +161,14 @@ void arrayst::collect_arrays(const exprt &a)
161
161
// check types
162
162
if (!base_type_eq (array_type, a.op1 ().type (), ns))
163
163
{
164
- std::cout << a.pretty () << ' \n ' ;
164
+ prop. error () << a.pretty () << messaget::eom ;
165
165
throw " collect_arrays got if without matching types" ;
166
166
}
167
167
168
168
// check types
169
169
if (!base_type_eq (array_type, a.op2 ().type (), ns))
170
170
{
171
- std::cout << a.pretty () << ' \n ' ;
171
+ prop. error () << a.pretty () << messaget::eom ;
172
172
throw " collect_arrays got if without matching types" ;
173
173
}
174
174
@@ -535,8 +535,8 @@ void arrayst::add_array_constraints_with(
535
535
536
536
if (index_expr.type ()!=value.type ())
537
537
{
538
- std::cout << expr.pretty () << ' \n ' ;
539
- assert ( false ) ;
538
+ prop. error () << expr.pretty () << messaget::eom ;
539
+ throw " index_expr and value types should match " ;
540
540
}
541
541
542
542
lazy_constraintt lazy (
@@ -619,8 +619,8 @@ void arrayst::add_array_constraints_update(
619
619
620
620
if(index_expr.type()!=value.type())
621
621
{
622
- std::cout << expr.pretty() << '\n' ;
623
- assert(false) ;
622
+ prop.error() << expr.pretty() << messaget::eom ;
623
+ throw "index_expr and value types should match" ;
624
624
}
625
625
626
626
set_to_true(equal_exprt(index_expr, value));
0 commit comments