@@ -296,33 +296,34 @@ void goto_symext::phi_function(
296
296
it!=variables.end ();
297
297
it++)
298
298
{
299
- if (*it==guard_identifier)
299
+ const irep_idt l1_identifier=*it;
300
+
301
+ if (l1_identifier==guard_identifier)
300
302
continue ; // just a guard, don't bother
301
303
302
- if (goto_state.level2 .current_count (*it )==
303
- dest_state.level2 .current_count (*it ))
304
+ if (goto_state.level2 .current_count (l1_identifier )==
305
+ dest_state.level2 .current_count (l1_identifier ))
304
306
continue ; // not at all changed
305
307
306
- irep_idt original_identifier=
307
- dest_state.get_original_name (*it);
308
-
309
308
// changed!
310
- const symbolt &symbol=ns.lookup (original_identifier);
311
309
312
- typet type (symbol.type );
310
+ irep_idt original_identifier=
311
+ dest_state.get_original_name (l1_identifier);
313
312
314
- // type may need renaming
313
+ // get type (may need renaming)
314
+ const symbolt &symbol=ns.lookup (original_identifier);
315
+ typet type=symbol.type ;
315
316
dest_state.rename (type, ns);
316
317
317
318
exprt rhs;
318
319
319
320
if (dest_state.guard .is_false ())
320
321
{
321
- rhs=symbol_exprt (dest_state. current_name (goto_state, ns, symbol. name ), type);
322
+ rhs=symbol_exprt (goto_state. level2 . current_name (l1_identifier ), type);
322
323
}
323
324
else if (goto_state.guard .is_false ())
324
325
{
325
- rhs=symbol_exprt (dest_state.current_name (ns, symbol. name ), type);
326
+ rhs=symbol_exprt (dest_state.level2 . current_name (l1_identifier ), type);
326
327
}
327
328
else
328
329
{
@@ -334,14 +335,12 @@ void goto_symext::phi_function(
334
335
rhs=if_exprt ();
335
336
rhs.type ()=type;
336
337
rhs.op0 ()=tmp_guard.as_expr ();
337
- rhs.op1 ()=symbol_exprt (dest_state. current_name (goto_state, ns, symbol. name ), type);
338
- rhs.op2 ()=symbol_exprt (dest_state.current_name (ns, symbol. name ), type);
338
+ rhs.op1 ()=symbol_exprt (goto_state. level2 . current_name (l1_identifier ), type);
339
+ rhs.op2 ()=symbol_exprt (dest_state.level2 . current_name (l1_identifier ), type);
339
340
}
340
341
341
342
symbol_exprt lhs=symbol_expr (symbol);
342
- symbol_exprt new_lhs=lhs;
343
-
344
- dest_state.rename (new_lhs, ns, goto_symex_statet::L1);
343
+ symbol_exprt new_lhs=symbol_exprt (l1_identifier, type);
345
344
dest_state.assignment (new_lhs, rhs, ns, false );
346
345
347
346
guardt true_guard;
0 commit comments