@@ -243,8 +243,8 @@ bool map_varst::array_types_eq(
243243
244244 namespacet ns (symbol_table);
245245
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 ();
248248
249249 if (s1.id ()==ID_array && s2.id ()==ID_array)
250250 return array_types_eq (to_array_type (s1), to_array_type (s2), error_msg);
@@ -279,12 +279,6 @@ bool map_varst::check_types_rec(
279279{
280280 namespacet ns (symbol_table);
281281
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-
288282 // type is the same?
289283 if (type1 == type2)
290284 return false ;
@@ -357,8 +351,8 @@ void map_varst::add_constraint_rec(
357351{
358352 namespacet ns (symbol_table);
359353
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 ();
362356
363357 // check the type
364358 if (t1==t2)
@@ -426,7 +420,7 @@ const symbolt &map_varst::add_array(symbolt &symbol)
426420{
427421 const namespacet ns (symbol_table);
428422
429- const typet &full_type=ns. follow ( symbol.type ) ;
423+ const typet &full_type = symbol.type ;
430424
431425 if (full_type.id ()==ID_incomplete_array)
432426 {
@@ -514,7 +508,7 @@ void map_varst::map_var_rec(
514508 const irep_idt &prefix)
515509{
516510 const namespacet ns (symbol_table);
517- const typet &expr_type=ns. follow ( expr.type () );
511+ const typet &expr_type = expr.type ();
518512 const struct_typet &struct_type=to_struct_type (expr_type);
519513 const struct_typet::componentst &components=struct_type.components ();
520514
@@ -534,9 +528,9 @@ void map_varst::map_var_rec(
534528 base_name=c_it->get_base_name ();
535529 else
536530 base_name=name;
537-
538- bool module_instance=ns. follow ( c_it->type ()) .id ()== ID_struct;
539-
531+
532+ bool module_instance = c_it->type ().id () == ID_struct;
533+
540534 irep_idt full_name=id2string (prefix)+" ." +id2string (base_name);
541535
542536 const symbol_table_baset::symbolst::const_iterator sub_symbol_it =
@@ -603,8 +597,8 @@ void map_varst::map_var(
603597
604598 const namespacet ns (symbol_table);
605599
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 ;
608602
609603 std::string error_msg;
610604 if (check_types_rec (type1, type2, error_msg))
@@ -721,7 +715,7 @@ void map_varst::map_vars(const irep_idt &top_module)
721715 index_exprt expr (
722716 symbol_expr,
723717 timeframe_expr,
724- to_array_type (ns. follow ( symbol_expr.type () )).element_type ());
718+ to_array_type (symbol_expr.type ()).element_type ());
725719
726720 top_level_inputs.clear ();
727721
@@ -733,7 +727,7 @@ void map_varst::map_vars(const irep_idt &top_module)
733727 const irep_idt &base_name = entry.second .base_name ;
734728 symbolt &symbol = symbol_table.get_writeable_ref (entry.first );
735729 if (symbol.type .id () == ID_struct_tag)
736- symbol.type = ns. follow ( symbol.type ) ;
730+ symbol.type = symbol.type ;
737731 if (base_name == " next_timeframe" && symbol.type .id () == ID_code) {
738732 namespacet ns (symbol_table);
739733 add_next_timeframe (symbol, struct_symbol, top_level_inputs, ns);
0 commit comments