File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,14 @@ static void remove_vector(exprt &expr)
88
88
expr.id ()==ID_mod || expr.id ()==ID_bitxor ||
89
89
expr.id ()==ID_bitand || expr.id ()==ID_bitor)
90
90
{
91
+ DATA_INVARIANT (
92
+ expr.operands ().size () == 2 , " binary operators have 2 operands" );
91
93
remove_vector (expr.type ());
92
94
array_typet array_type=to_array_type (expr.type ());
93
95
94
96
mp_integer dimension;
95
97
to_integer (array_type.size (), dimension);
96
98
97
- assert (expr.operands ().size ()==2 );
98
99
const typet subtype=array_type.subtype ();
99
100
// do component-wise:
100
101
// x+y -> vector(x[0]+y[0],x[1]+y[1],...)
@@ -114,13 +115,14 @@ static void remove_vector(exprt &expr)
114
115
}
115
116
else if (expr.id ()==ID_unary_minus || expr.id ()==ID_bitnot)
116
117
{
118
+ DATA_INVARIANT (
119
+ expr.operands ().size () == 1 , " unary operators have one operands" );
117
120
remove_vector (expr.type ());
118
121
array_typet array_type=to_array_type (expr.type ());
119
122
120
123
mp_integer dimension;
121
124
to_integer (array_type.size (), dimension);
122
125
123
- assert (expr.operands ().size ()==1 );
124
126
const typet subtype=array_type.subtype ();
125
127
// do component-wise:
126
128
// -x -> vector(-x[0],-x[1],...)
You can’t perform that action at this time.
0 commit comments