@@ -269,11 +269,11 @@ constant_exprt smt2_convt::parse_literal(
269
269
if (type.id ()==ID_floatbv)
270
270
{
271
271
const floatbv_typet &floatbv_type=to_floatbv_type (type);
272
- constant_exprt s1= parse_literal (src.get_sub ()[1 ], bv_typet (1 ));
273
- constant_exprt s2=
274
- parse_literal (src.get_sub ()[2 ], bv_typet (floatbv_type.get_e ()));
275
- constant_exprt s3=
276
- parse_literal (src.get_sub ()[3 ], bv_typet (floatbv_type.get_f ()));
272
+ constant_exprt s1 = parse_literal (src.get_sub ()[1 ], unsignedbv_typet (1 ));
273
+ constant_exprt s2 =
274
+ parse_literal (src.get_sub ()[2 ], unsignedbv_typet (floatbv_type.get_e ()));
275
+ constant_exprt s3 =
276
+ parse_literal (src.get_sub ()[3 ], unsignedbv_typet (floatbv_type.get_f ()));
277
277
// stitch the bits together
278
278
std::string bits=id2string (s1.get_value ())+
279
279
id2string (s2.get_value ())+
@@ -310,7 +310,6 @@ constant_exprt smt2_convt::parse_literal(
310
310
311
311
if (type.id ()==ID_signedbv ||
312
312
type.id ()==ID_unsignedbv ||
313
- type.id ()==ID_bv ||
314
313
type.id ()==ID_c_enum ||
315
314
type.id ()==ID_c_bool)
316
315
{
@@ -377,7 +376,7 @@ exprt smt2_convt::parse_union(
377
376
PRECONDITION (!type.components ().empty ());
378
377
const union_typet::componentt &first=type.components ().front ();
379
378
std::size_t width=boolbv_width (type);
380
- exprt value= parse_rec (src, bv_typet (width));
379
+ exprt value = parse_rec (src, unsignedbv_typet (width));
381
380
if (value.is_nil ())
382
381
return nil_exprt ();
383
382
const typecast_exprt converted (value, first.type ());
@@ -416,7 +415,7 @@ exprt smt2_convt::parse_struct(
416
415
{
417
416
// These are just flattened, i.e., we expect to see a monster bit vector.
418
417
std::size_t total_width=boolbv_width (type);
419
- exprt l= parse_literal (src, bv_typet (total_width));
418
+ exprt l = parse_literal (src, unsignedbv_typet (total_width));
420
419
if (!l.is_constant ())
421
420
return nil_exprt ();
422
421
@@ -457,7 +456,6 @@ exprt smt2_convt::parse_rec(const irept &src, const typet &_type)
457
456
type.id ()==ID_integer ||
458
457
type.id ()==ID_rational ||
459
458
type.id ()==ID_real ||
460
- type.id ()==ID_bv ||
461
459
type.id ()==ID_fixedbv ||
462
460
type.id ()==ID_floatbv)
463
461
{
@@ -474,7 +472,7 @@ exprt smt2_convt::parse_rec(const irept &src, const typet &_type)
474
472
{
475
473
// these come in as bit-vector literals
476
474
std::size_t width=boolbv_width (type);
477
- constant_exprt bv_expr= parse_literal (src, bv_typet (width));
475
+ constant_exprt bv_expr = parse_literal (src, unsignedbv_typet (width));
478
476
479
477
mp_integer v = numeric_cast_v<mp_integer>(bv_expr);
480
478
0 commit comments