{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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 dataflow 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 define a lattice L = {[ a , b ] | a , b {−∞, - k , -2, −1, 0, 1, 2,..., k , +∞} a b }
Background image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}