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
192
192
193
193
void smv_typecheckt::flatten_hierarchy (smv_parse_treet::modulet &smv_module)
194
194
{
195
- for (auto &var_it : smv_module.vars )
195
+ for (auto &item : smv_module.items )
196
196
{
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" )
200
198
{
201
- exprt &inst=static_cast <exprt &>(static_cast <irept &>(var.type ));
199
+ exprt &inst =
200
+ static_cast <exprt &>(static_cast <irept &>(item.expr .type ()));
202
201
203
202
for (auto &op : inst.operands ())
204
203
convert (op, NORMAL);
205
204
205
+ auto instance_base_name = to_symbol_expr (item.expr ).get_identifier ();
206
+
206
207
instantiate (
207
208
smv_module,
208
209
inst.get (ID_identifier),
209
- var_it. first ,
210
+ instance_base_name ,
210
211
inst.operands (),
211
212
inst.find_source_location ());
212
213
}
You can’t perform that action at this time.
0 commit comments