
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to data-flow analysis, focusing on proving theorems, reaching definitions, and major examples. It covers concepts such as data-flow equations, major examples, and the importance of being conservative in optimization. The document also introduces the concepts of available expressions and live variable analysis.
Typology: Slides
1 / 40
This page cannot be seen from the preview
Don't miss anything!

































Proving Little Theorems Data-Flow Equations Major Examples
boolean x = true;
while (x) {
... // no change to x
}
5
d1: x = true
if x == true
d2 : a = 10
d (^2)
d (^1)
d (^1) d 2 d (^1)
int i = 2; int j = 3;
while (i != j) {
if (i < j) i += 2; else j += 2;
}
8
d1: i = 2 d2: j = 3
if i != j
if i < j
d3: i = i+2 d4: j = j+
d 1 , d 2 , d 3 , d (^4)
d (^1) d 3 d (^4)
d (^2)
d 2 , d 3 , d (^4)
d d^1 , d^3 , d^4 d 1 , d 2 , d 3 , d 4 1 , d 2 , d 3 , d (^4)
boolean x = true;
while (x) {
... *p = false;...
}
20
d 1 : y = 3 d 2 : x = y+z d 3 : *p = 10 d 4 : y = 5
IN = {d 2 (x), d 3 (y), d 3 (z), d 5 (y), d 6 (y), d 7 (z)}
Kill includes {d 1 (x), d 2 (x), d 3 (y), d 5 (y), d 6 (y),…}
Gen = {d 2 (x), d 3 (x), d 3 (z),…, d 4 (y)}
OUT = {d 2 (x), d 3 (x), d 3 (z),…, d 4 (y), d 7 (z)}