File tree 3 files changed +7
-14
lines changed
3 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ bvt boolbvt::convert_bitvector(const exprt &expr)
253
253
return convert_bitvector (expr.op0 ());
254
254
}
255
255
else if (expr.id ()==ID_abs)
256
- return convert_abs (expr);
256
+ return convert_abs (to_abs_expr ( expr) );
257
257
else if (expr.id () == ID_bswap)
258
258
return convert_bswap (to_bswap_expr (expr));
259
259
else if (expr.id ()==ID_byte_extract_little_endian ||
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ class boolbvt:public arrayst
163
163
virtual bvt convert_shift (const binary_exprt &expr);
164
164
virtual bvt convert_bitwise (const exprt &expr);
165
165
virtual bvt convert_unary_minus (const unary_exprt &expr);
166
- virtual bvt convert_abs (const exprt &expr);
166
+ virtual bvt convert_abs (const abs_exprt &expr);
167
167
virtual bvt convert_concatenation (const exprt &expr);
168
168
virtual bvt convert_replication (const replication_exprt &expr);
169
169
virtual bvt convert_bv_literals (const exprt &expr);
Original file line number Diff line number Diff line change 14
14
15
15
#include < solvers/floatbv/float_utils.h>
16
16
17
- bvt boolbvt::convert_abs (const exprt &expr)
17
+ bvt boolbvt::convert_abs (const abs_exprt &expr)
18
18
{
19
- std::size_t width= boolbv_width (expr.type ());
19
+ const std::size_t width = boolbv_width (expr.type ());
20
20
21
21
if (width==0 )
22
22
return conversion_failed (expr);
23
23
24
- const exprt::operandst &operands= expr.operands ( );
24
+ const bvt &op_bv= convert_bv ( expr.op () );
25
25
26
- if (operands.size ()!=1 )
27
- throw " abs takes one operand" ;
28
-
29
- const exprt &op0=expr.op0 ();
30
-
31
- const bvt &op_bv=convert_bv (op0);
32
-
33
- if (op0.type ()!=expr.type ())
26
+ if (expr.op ().type ()!=expr.type ())
34
27
return conversion_failed (expr);
35
28
36
- bvtypet bvtype= get_bvtype (expr.type ());
29
+ const bvtypet bvtype = get_bvtype (expr.type ());
37
30
38
31
if (bvtype==bvtypet::IS_FIXED ||
39
32
bvtype==bvtypet::IS_SIGNED ||
You can’t perform that action at this time.
0 commit comments