CS 143 Study Guide - Final Guide: E-Reader, Register Allocation, Constant Folding

19 views12 pages

Document Summary

Do not write on the back of exam pages or other pages: solutions will be graded on correctness and clarity. Each problem has a relatively simple and straightforward solution. You may get as few as 0 points for a question if your solution is far more complicated than necessary. Partial solutions will be graded for partial credit. In accordance with both the letter and spirit of the honor code, i have neither given nor received assistance on this examination. The expression e must evaluate to a string, and that string is propagated as an exception value. Except for the try-catch expression described below, for any other kind of expression e, if a subexpression of e throws an exception then e throws that same exception. Exception values can be caught using a try-catch statement: try e1 catch x in e2. In this statement, expression e1 is evaluated rst.