File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -279,9 +279,9 @@ bvt boolbvt::convert_bitvector(const exprt &expr)
279
279
else if (expr.id ()==ID_complex)
280
280
return convert_complex (expr);
281
281
else if (expr.id ()==ID_complex_real)
282
- return convert_complex_real (expr);
282
+ return convert_complex_real (to_complex_real_expr ( expr) );
283
283
else if (expr.id ()==ID_complex_imag)
284
- return convert_complex_imag (expr);
284
+ return convert_complex_imag (to_complex_imag_expr ( expr) );
285
285
else if (expr.id ()==ID_lambda)
286
286
return convert_lambda (expr);
287
287
else if (expr.id ()==ID_array_of)
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ class boolbvt:public arrayst
142
142
virtual bvt convert_array (const exprt &expr);
143
143
virtual bvt convert_vector (const exprt &expr);
144
144
virtual bvt convert_complex (const exprt &expr);
145
- virtual bvt convert_complex_real (const exprt &expr);
146
- virtual bvt convert_complex_imag (const exprt &expr);
145
+ virtual bvt convert_complex_real (const complex_real_exprt &expr);
146
+ virtual bvt convert_complex_imag (const complex_imag_exprt &expr);
147
147
virtual bvt convert_lambda (const exprt &expr);
148
148
virtual bvt convert_let (const let_exprt &);
149
149
virtual bvt convert_array_of (const array_of_exprt &expr);
Original file line number Diff line number Diff line change @@ -45,35 +45,29 @@ bvt boolbvt::convert_complex(const exprt &expr)
45
45
return conversion_failed (expr);
46
46
}
47
47
48
- bvt boolbvt::convert_complex_real (const exprt &expr)
48
+ bvt boolbvt::convert_complex_real (const complex_real_exprt &expr)
49
49
{
50
50
std::size_t width=boolbv_width (expr.type ());
51
51
52
52
if (width==0 )
53
53
return conversion_failed (expr);
54
54
55
- if (expr.operands ().size ()!=1 )
56
- return conversion_failed (expr);
57
-
58
- bvt bv=convert_bv (expr.op0 ());
55
+ bvt bv = convert_bv (expr.op ());
59
56
60
57
assert (bv.size ()==width*2 );
61
58
bv.resize (width); // chop
62
59
63
60
return bv;
64
61
}
65
62
66
- bvt boolbvt::convert_complex_imag (const exprt &expr)
63
+ bvt boolbvt::convert_complex_imag (const complex_imag_exprt &expr)
67
64
{
68
65
std::size_t width=boolbv_width (expr.type ());
69
66
70
67
if (width==0 )
71
68
return conversion_failed (expr);
72
69
73
- if (expr.operands ().size ()!=1 )
74
- return conversion_failed (expr);
75
-
76
- bvt bv=convert_bv (expr.op0 ());
70
+ bvt bv = convert_bv (expr.op ());
77
71
78
72
assert (bv.size ()==width*2 );
79
73
bv.erase (bv.begin (), bv.begin ()+width);
You can’t perform that action at this time.
0 commit comments