@@ -243,8 +243,8 @@ bool map_varst::array_types_eq(
243
243
244
244
namespacet ns (symbol_table);
245
245
246
- const typet &s1 = ns. follow ( type1.element_type () );
247
- const typet &s2 = ns. follow ( type2.element_type () );
246
+ const typet &s1 = type1.element_type ();
247
+ const typet &s2 = type2.element_type ();
248
248
249
249
if (s1.id ()==ID_array && s2.id ()==ID_array)
250
250
return array_types_eq (to_array_type (s1), to_array_type (s2), error_msg);
@@ -279,12 +279,6 @@ bool map_varst::check_types_rec(
279
279
{
280
280
namespacet ns (symbol_table);
281
281
282
- if (type1.id ()==ID_symbol)
283
- return check_types_rec (ns.follow (type1), type2, error_msg);
284
-
285
- if (type2.id ()==ID_symbol)
286
- return check_types_rec (type1, ns.follow (type2), error_msg);
287
-
288
282
// type is the same?
289
283
if (type1 == type2)
290
284
return false ;
@@ -357,8 +351,8 @@ void map_varst::add_constraint_rec(
357
351
{
358
352
namespacet ns (symbol_table);
359
353
360
- const typet &t1=ns. follow ( program_symbol.type () );
361
- const typet &t2=ns. follow ( module_symbol.type () );
354
+ const typet &t1=program_symbol.type ();
355
+ const typet &t2=module_symbol.type ();
362
356
363
357
// check the type
364
358
if (t1==t2)
@@ -426,7 +420,7 @@ const symbolt &map_varst::add_array(symbolt &symbol)
426
420
{
427
421
const namespacet ns (symbol_table);
428
422
429
- const typet &full_type=ns. follow ( symbol.type ) ;
423
+ const typet &full_type=symbol.type ;
430
424
431
425
if (full_type.id ()==ID_incomplete_array)
432
426
{
@@ -514,7 +508,7 @@ void map_varst::map_var_rec(
514
508
const irep_idt &prefix)
515
509
{
516
510
const namespacet ns (symbol_table);
517
- const typet &expr_type=ns. follow ( expr.type () );
511
+ const typet &expr_type=expr.type ();
518
512
const struct_typet &struct_type=to_struct_type (expr_type);
519
513
const struct_typet::componentst &components=struct_type.components ();
520
514
@@ -535,7 +529,7 @@ void map_varst::map_var_rec(
535
529
else
536
530
base_name=name;
537
531
538
- bool module_instance=ns. follow ( c_it->type () ).id ()==ID_struct;
532
+ bool module_instance=c_it->type ().id ()==ID_struct;
539
533
540
534
irep_idt full_name=id2string (prefix)+" ." +id2string (base_name);
541
535
@@ -603,8 +597,8 @@ void map_varst::map_var(
603
597
604
598
const namespacet ns (symbol_table);
605
599
606
- const typet &type1=ns. follow ( program_symbol.type () );
607
- const typet &type2=ns. follow ( module_symbol.type ) ;
600
+ const typet &type1=program_symbol.type ();
601
+ const typet &type2=module_symbol.type ;
608
602
609
603
std::string error_msg;
610
604
if (check_types_rec (type1, type2, error_msg))
@@ -721,7 +715,7 @@ void map_varst::map_vars(const irep_idt &top_module)
721
715
index_exprt expr (
722
716
symbol_expr,
723
717
timeframe_expr,
724
- to_array_type (ns. follow ( symbol_expr.type () )).element_type ());
718
+ to_array_type (symbol_expr.type ()).element_type ());
725
719
726
720
top_level_inputs.clear ();
727
721
@@ -733,7 +727,7 @@ void map_varst::map_vars(const irep_idt &top_module)
733
727
const irep_idt &base_name = entry.second .base_name ;
734
728
symbolt &symbol = symbol_table.get_writeable_ref (entry.first );
735
729
if (symbol.type .id () == ID_struct_tag)
736
- symbol.type = ns. follow ( symbol.type ) ;
730
+ symbol.type = symbol.type ;
737
731
if (base_name == " next_timeframe" && symbol.type .id () == ID_code) {
738
732
namespacet ns (symbol_table);
739
733
add_next_timeframe (symbol, struct_symbol, top_level_inputs, ns);
0 commit comments