@@ -656,7 +656,7 @@ exprt smt2_parsert::function_application()
656
656
if (next_token () != smt2_tokenizert::NUMERAL)
657
657
throw error () << " expected numeral after " << id;
658
658
659
- auto index = std::stoll (smt2_tokenizer.get_buffer ());
659
+ auto index = string2integer (smt2_tokenizer.get_buffer ());
660
660
661
661
if (next_token () != smt2_tokenizert::CLOSE)
662
662
throw error () << " expected ')' after " << id << " index" ;
@@ -681,21 +681,21 @@ exprt smt2_parsert::function_application()
681
681
// we first convert to a signed type of the original width,
682
682
// then extend to the new width, and then go to unsigned
683
683
const auto width = to_unsignedbv_type (op[0 ].type ()).get_width ();
684
- const signedbv_typet small_signed_type ( width) ;
685
- const signedbv_typet large_signed_type ( width + index) ;
686
- const unsignedbv_typet unsigned_type ( width + index) ;
684
+ const signedbv_typet small_signed_type{ width} ;
685
+ const signedbv_typet large_signed_type{ width + index} ;
686
+ const unsignedbv_typet unsigned_type{ width + index} ;
687
687
688
688
return typecast_exprt (
689
689
typecast_exprt (
690
690
typecast_exprt (op[0 ], small_signed_type), large_signed_type),
691
691
unsigned_type);
692
692
}
693
- else if (id== " zero_extend " )
693
+ else if (id == ID_zero_extend )
694
694
{
695
695
auto width=to_unsignedbv_type (op[0 ].type ()).get_width ();
696
- unsignedbv_typet unsigned_type ( width+ index) ;
696
+ unsignedbv_typet unsigned_type{ width + index} ;
697
697
698
- return typecast_exprt ( op[0 ], unsigned_type) ;
698
+ return zero_extend_exprt{ op[0 ], unsigned_type} ;
699
699
}
700
700
else if (id == ID_repeat)
701
701
{
0 commit comments