Skip to content

Commit e066a89

Browse files
committed
Clarify comments in symex_dead
Try to make clearer what we can(not) remove from renaming maps. Also do small cleanups of the code.
1 parent 42ffa95 commit e066a89

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/goto-symex/symex_dead.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ void goto_symext::symex_dead(statet &state)
2222

2323
const code_deadt &code = instruction.get_dead();
2424

25-
// We increase the L2 renaming to make these non-deterministic.
26-
// We also prevent propagation of old values.
27-
2825
ssa_exprt ssa(code.symbol());
2926
state.rename(ssa, ns, field_sensitivity, goto_symex_statet::L1);
3027

@@ -50,14 +47,15 @@ void goto_symext::symex_dead(statet &state)
5047

5148
for(const exprt &l2_field_set : l2_fields_set)
5249
{
53-
ssa_exprt ssa_lhs = to_ssa_expr(l2_field_set);
54-
const irep_idt &l1_identifier = ssa_lhs.get_identifier();
50+
const irep_idt &l1_identifier = to_ssa_expr(l2_field_set).get_identifier();
5551

56-
// prevent propagation
52+
// we cannot remove the object from the L1 renaming map, because L1 renaming
53+
// information is not local to a path, but removing it from the propagation
54+
// map is safe as 1) it is local to a path and 2) this instance can no longer
55+
// appear
5756
state.propagation.erase(l1_identifier);
58-
59-
// TODO: not sure why the rest below is necessary
60-
// L2 renaming
57+
// increment the L2 index to ensure a merge on join points will propagate the
58+
// value for branches that are still live
6159
auto level2_it = state.level2.current_names.find(l1_identifier);
6260
if(level2_it != state.level2.current_names.end())
6361
symex_renaming_levelt::increase_counter(level2_it);

0 commit comments

Comments
 (0)