### Question about exercise 2.3c

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.

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.