{[ 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 define 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 ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern