{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS 4120 PS5

# CS 4120 PS5 - CS 4120 PS5 Changes 11/21 The desired...

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

2/7/13 CS 4120 PS5 www.cs.cornell.edu/courses/CS4120/2011fa/hw/ps5/ps5.html 1/4 Changes: 11/21: The desired interval in 1(d) was corrected and the problem part was clarified. CS 4120: Introduction to Compilers Fall 2011 Problem Set 5: Program Analysis and Advanced Language Features due : Monday, November 21, 11:59 PM 1. Bounding intervals We want to design a dataﬂow analysis that computes conservative intervals bounding the values of all integer variables. An analysis along these lines could be used for eliminating bounds checks, for example. We extend the set Z of integers with plus and minus infinity: Z = Z {+∞, −∞}, such that −∞ < n , and n < +∞ for any integer n . We then define a lattice over the set L = {[ a , b ] | a , b Z a b } { }. a. Explain what the element represents and why we need it for this analysis. Define the partial order and the meet operator for elements in this lattice (including ). b. Using this lattice to compute ranges of variables will fail in general. Explain why. c. To solve the problems from part (b), we deFne a lattice L = {[ a , b ] | a , b {−∞, - k , -2, −1, 0, 1, 2,. .., k , +∞} a b }

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 / 4

CS 4120 PS5 - CS 4120 PS5 Changes 11/21 The desired...

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

View Full Document
Ask a homework question - tutors are online