Seite 1 von 1

Verfasst: 3. Dez 2017 12:17
Hi,

upon redoing the exercises I noticed something that I do not understand regarding exercise 2.3c.
The task is to solve the equations for Live Variables analysis of the given program.

The statement associated with label 2 is x := x + 1.
So I started by computing
kill_LV(2) = {x}
generate_LV(2) = {x}
Thus, I thought LV_entry(2) = (LV_exit(2) \ kill_LV(2)) \union generate_LV(2) = (LV_exit(2) \ {x}) \union {x}.
However, the sample solution states LV_entry(2) = LV_exit(2) \union {x}.
This results in the same set. Though, I am not entirely sure if I have done a mistake or if the solution omitted a step.

Could somebody clarify this for me please?

Thanks and best regards.

### Re: Question about exercise 2.3c

Verfasst: 4. Dez 2017 14:00
No, I think, you did not make a mistake.
It results in the same set, as you say.
The solution just presents the simplified equations.
I think, that is actually the case for all sample solutions of this exercise sheet.

best regards,
Alexander