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 @@ -82,13 +82,14 @@ static void remove_vector(exprt &expr)
82
82
expr.id ()==ID_mod || expr.id ()==ID_bitxor ||
83
83
expr.id ()==ID_bitand || expr.id ()==ID_bitor)
84
84
{
85
+ DATA_INVARIANT (
86
+ expr.operands ().size () == 2 , " binary operators have 2 operands" );
85
87
remove_vector (expr.type ());
86
88
array_typet array_type=to_array_type (expr.type ());
87
89
88
90
mp_integer dimension;
89
91
to_integer (array_type.size (), dimension);
90
92
91
- assert (expr.operands ().size ()==2 );
92
93
const typet subtype=array_type.subtype ();
93
94
// do component-wise:
94
95
// x+y -> vector(x[0]+y[0],x[1]+y[1],...)
@@ -108,13 +109,14 @@ static void remove_vector(exprt &expr)
108
109
}
109
110
else if (expr.id ()==ID_unary_minus || expr.id ()==ID_bitnot)
110
111
{
112
+ DATA_INVARIANT (
113
+ expr.operands ().size () == 1 , " unary operators have one operand" );
111
114
remove_vector (expr.type ());
112
115
array_typet array_type=to_array_type (expr.type ());
113
116
114
117
mp_integer dimension;
115
118
to_integer (array_type.size (), dimension);
116
119
117
- assert (expr.operands ().size ()==1 );
118
120
const typet subtype=array_type.subtype ();
119
121
// do component-wise:
120
122
// -x -> vector(-x[0],-x[1],...)
You can’t perform that action at this time.
0 commit comments