Questions: Dataflow Analysis

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

Live variable analysis asks: at each program point, which variables might be used before being overwritten on some path from that point? Why is this a backward analysis rather than a forward one?

ABecause it only applies to loops, which must be traversed in reverse
BBecause the information needed at a point depends on what happens later (at uses), not earlier (at definitions)
CBecause CFG edges are reversed in all standard analyses
DBecause backward analyses are faster to compute than forward ones
Question 2 True / False

In a reaching definitions analysis, a definition of variable x at point d 'reaches' point p if there is a path from d to p along which x is not redefined.

TTrue
FFalse
Question 3 Short Answer

Why is fixpoint iteration in dataflow analysis guaranteed to terminate, and what property of the transfer functions ensures this?

Think about your answer, then reveal below.