{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# ps7 - ECE 468 Problem Set 7 Dataow analysis 1 Show the...

This preview shows pages 1–2. Sign up to view the full content.

ECE 468 Problem Set 7: Dataflow analysis 1. Show the results of running a reaching definition analysis on the following piece of code: For each line of code, show which definitions reach that line of code by indicating the line number the definition occurred in. 1: x = 4; 2: y = 7; L1 3: if (x > c) goto L4 4: if (y > 3) goto L2 5: a = x + 1; 6: y = x + 2; 7: goto L3 L2 8: y = x + 1; 9: x = x + 1; L3 10: x = x + 1; 11: goto L1; L4 12: halt 2. Show the results of running an available expression analysis on the code, by indicating which expressions are available at each instruction. 3. In this problem, your goal is to develop a dataflow analysis to find uninitialized values. A common error in programs is using a variable that has not yet been defined. Write an analysis that can detect any use of a variable that has not been defined. Do this by tracking, for each variable in a program, whether it is currently defined or not. Hint: think about how this analysis relates to a reaching definition analysis. (a) This is a bitvector analysis, where each object of interest in the analysis takes

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

ps7 - ECE 468 Problem Set 7 Dataow analysis 1 Show the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online