midterm-sol - CS 243 Midterm CS 243 Midterm Examination...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 243 Midterm CS 243 Midterm Examination Winter 2011-2012 This is an open-book, open-notes exam. You cannot use the computer. You have 1 hour 15 minutes to work on this exam. The examination has 5 questions worth 70 points. There is a final bonus question, worth 5 points, which will NOT be curved. Please budget your time accordingly. Write your answers in the space provided on the exam. If you use additional scratch paper, please turn that in as well. Your Name: In accordance with both the letter and spirit of the Honor Code, I have neither given nor received assistance on this examination. Signature: Problem Points Score 1 15 2 5 3 10 4 15 5 25 6 5 Total 75 Winter 2011/2012 page 1 of 7 CS 243 Midterm 1. (15 points) True of false. Explain your answer. No credit is given unless the explanation is correct. (a) Consider the DOM relation, where a DOM b is read “a node, a , dominates a node, b ”. If a DOM c and b DOM c , then either a DOM b or b DOM a . Solution: True. This is in the textbook. (b) Lazy code motion can move expressions out of a cycle in a control flow graph, even if it is not part of a natural loop. Solution: True. Consider: Entry a = x + y; Exit (c) Lazy code motion should be run before constant propagation. Solution: We accepted both answers depending on the quality of the anal- ysis. (d) Given a monotone dataflow framework, an iterative algorithm will converge to a fixed point solution even if all the interior program points of a program are initialized to bottom....
View Full Document

This document was uploaded on 03/12/2012.

Page1 / 6

midterm-sol - CS 243 Midterm CS 243 Midterm Examination...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online