@@ -148,7 +148,7 @@ void smt2_convt::define_object_size(
148
148
149
149
for (const auto &o : pointer_logic.objects )
150
150
{
151
- const typet &type = ns. follow ( o.type () );
151
+ const typet &type = o.type ();
152
152
exprt size_expr = size_of_expr (type, ns);
153
153
mp_integer object_size;
154
154
@@ -557,7 +557,7 @@ void smt2_convt::convert_address_of_rec(
557
557
const member_exprt &member_expr=to_member_expr (expr);
558
558
559
559
const exprt &struct_op=member_expr.struct_op ();
560
- const typet &struct_op_type=ns. follow ( struct_op.type () );
560
+ const typet &struct_op_type=struct_op.type ();
561
561
562
562
DATA_INVARIANT (
563
563
struct_op_type.id () == ID_struct || struct_op_type.id () == ID_struct_tag,
@@ -1918,11 +1918,11 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
1918
1918
{
1919
1919
const exprt &src = expr.op ();
1920
1920
1921
- typet dest_type=ns. follow ( expr.type () );
1921
+ typet dest_type=expr.type ();
1922
1922
if (dest_type.id ()==ID_c_enum_tag)
1923
1923
dest_type=ns.follow_tag (to_c_enum_tag_type (dest_type));
1924
1924
1925
- typet src_type=ns. follow ( src.type () );
1925
+ typet src_type=src.type ();
1926
1926
if (src_type.id ()==ID_c_enum_tag)
1927
1927
src_type=ns.follow_tag (to_c_enum_tag_type (src_type));
1928
1928
@@ -2621,7 +2621,7 @@ void smt2_convt::convert_struct(const struct_exprt &expr)
2621
2621
exprt op=expr.operands ()[i-1 ];
2622
2622
2623
2623
// may need to flatten array-theory arrays in there
2624
- if (ns. follow ( op.type () ).id ()==ID_array)
2624
+ if (op.type ().id ()==ID_array)
2625
2625
flatten_array (op);
2626
2626
else
2627
2627
convert_expr (op);
@@ -2641,7 +2641,7 @@ void smt2_convt::convert_struct(const struct_exprt &expr)
2641
2641
void smt2_convt::flatten_array (const exprt &expr)
2642
2642
{
2643
2643
const array_typet &array_type=
2644
- to_array_type (ns. follow ( expr.type () ));
2644
+ to_array_type (expr.type ());
2645
2645
2646
2646
mp_integer size = numeric_cast_v<mp_integer>(array_type.size ());
2647
2647
CHECK_RETURN_WITH_DIAGNOSTICS (size != 0 , " can't convert zero-sized array" );
@@ -3495,7 +3495,7 @@ void smt2_convt::convert_with(const with_exprt &expr)
3495
3495
" with expression should have been converted to a version with three "
3496
3496
" operands above" );
3497
3497
3498
- const typet &expr_type=ns. follow ( expr.type () );
3498
+ const typet &expr_type=expr.type ();
3499
3499
3500
3500
if (expr_type.id ()==ID_array)
3501
3501
{
@@ -3727,15 +3727,15 @@ void smt2_convt::convert_update(const exprt &expr)
3727
3727
3728
3728
void smt2_convt::convert_index (const index_exprt &expr)
3729
3729
{
3730
- const typet &array_op_type=ns. follow ( expr.array ().type () );
3730
+ const typet &array_op_type=expr.array ().type ();
3731
3731
3732
3732
if (array_op_type.id ()==ID_array)
3733
3733
{
3734
3734
const array_typet &array_type=to_array_type (array_op_type);
3735
3735
3736
3736
if (use_array_theory (expr.array ()))
3737
3737
{
3738
- if (ns. follow ( expr.type () ).id ()==ID_bool && !use_array_of_bool)
3738
+ if (expr.type ().id ()==ID_bool && !use_array_of_bool)
3739
3739
{
3740
3740
out << " (= " ;
3741
3741
out << " (select " ;
@@ -3827,7 +3827,7 @@ void smt2_convt::convert_member(const member_exprt &expr)
3827
3827
{
3828
3828
const member_exprt &member_expr=to_member_expr (expr);
3829
3829
const exprt &struct_op=member_expr.struct_op ();
3830
- const typet &struct_op_type=ns. follow ( struct_op.type () );
3830
+ const typet &struct_op_type=struct_op.type ();
3831
3831
const irep_idt &name=member_expr.get_component_name ();
3832
3832
3833
3833
if (struct_op_type.id () == ID_struct || struct_op_type.id () == ID_struct_tag)
@@ -3886,7 +3886,7 @@ void smt2_convt::convert_member(const member_exprt &expr)
3886
3886
3887
3887
void smt2_convt::flatten2bv (const exprt &expr)
3888
3888
{
3889
- const typet &type=ns. follow ( expr.type () );
3889
+ const typet &type=expr.type ();
3890
3890
3891
3891
if (type.id ()==ID_bool)
3892
3892
{
@@ -4382,9 +4382,8 @@ void smt2_convt::find_symbols(const exprt &expr)
4382
4382
4383
4383
bool smt2_convt::use_array_theory (const exprt &expr)
4384
4384
{
4385
- const typet &type=ns. follow ( expr.type () );
4385
+ const typet &type=expr.type ();
4386
4386
PRECONDITION (type.id ()==ID_array);
4387
- // const array_typet &array_type=to_array_type(ns.follow(expr.type()));
4388
4387
4389
4388
if (use_datatypes)
4390
4389
{
@@ -4410,7 +4409,7 @@ void smt2_convt::convert_type(const typet &type)
4410
4409
CHECK_RETURN (array_type.size ().is_not_nil ());
4411
4410
4412
4411
// we always use array theory for top-level arrays
4413
- const typet &subtype=ns. follow ( array_type.subtype () );
4412
+ const typet &subtype=array_type.subtype ();
4414
4413
4415
4414
out << " (Array " ;
4416
4415
convert_type (array_type.size ().type ());
0 commit comments