File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -192,21 +192,22 @@ Function: smv_typecheckt::flatten_hierarchy
192192
193193void smv_typecheckt::flatten_hierarchy (smv_parse_treet::modulet &smv_module)
194194{
195- for (auto &var_it : smv_module.vars )
195+ for (auto &item : smv_module.items )
196196 {
197- smv_parse_treet::mc_vart &var = var_it.second ;
198-
199- if (var.type .id ()==" submodule" )
197+ if (item.is_var () && item.expr .type ().id () == " submodule" )
200198 {
201- exprt &inst=static_cast <exprt &>(static_cast <irept &>(var.type ));
199+ exprt &inst =
200+ static_cast <exprt &>(static_cast <irept &>(item.expr .type ()));
202201
203202 for (auto &op : inst.operands ())
204203 convert (op, NORMAL);
205204
205+ auto instance_base_name = to_symbol_expr (item.expr ).get_identifier ();
206+
206207 instantiate (
207208 smv_module,
208209 inst.get (ID_identifier),
209- var_it. first ,
210+ instance_base_name ,
210211 inst.operands (),
211212 inst.find_source_location ());
212213 }
You can’t perform that action at this time.
0 commit comments