-
Sample Finals
Differences between topics this semester [last updated Fall 06] and those
that appear on old exams:
- For the past few semesters we have different machine assumptions
about code generation than in some earlier semesters. In
some semesters we did code generation with 3AC rather than stack-based
code generation. Follow this link for assumptions to make for code
generation problems for this semester (unchanged from Spr
06). You will be given this handout at your exam, so you don't have
to memorize instruction formats. However, it will be helpful if you
familiarize yourself with the assumptions ahead of time.
-
Other topics not covered this semester (i.e., that you are not
responsible for), but that appear on some of the old exams:
- heuristic ordering of instructions from a DAG (e.g., Spr 06, Prob. 5B)
- access links and displays (e.g., Spr 05, Prob. 3 or Fall 04, Prob 4)
- inherited semantic attributes (e.g., Spr 01, Prob 6) [We
only discussed synthesized attributes in detail]
- dynamic scoping (e.g., Spr 03, Prob 4) [We talked about
generally, but did not go over specific examples]
- liveness and next-use for a basic block (e.g., Fall 01, Prob 8)
[We discussed live-in and live-out sets for a sequence of 3AC
statements; but not next-use]
- type-checking rules expressed as logic formulas (e.g., Spr 04, Prob 7).
- any questions about the Cool programming language are related to
the compiler project used that semester. You would not have the same
question on your exam, but you could have a similar question about
Espresso.
All of the exams are in pdf form.
-
Sample Midterms
Note: in semesters after Spring 02 we didn't cover some topics that
were covered in prior semesters by midterm time. Those topics appear
on those older exams, but will not be on your exam. The main topics are all
related to top-down parsing (a.k.a., LL(1), predictive, or recursive
descent parsing) ; in particular (1) anything mentioning this kind of
parsing itself, (2) computing first and/or follow sets for
grammars that contain epsilon productions (how to do this is more
involved than for ones without epsilon productions), and (3)
eliminating left recursion from a grammar.
Also, any questions about the Cool programming language are related to
the compiler project used that semester. You would not have the same
question on your exam, but you could have a similar question about
Espresso.
All of the exams are in pdf form. Note: Exams Fall 02 through Fall 04 were
50-minute midterms. All the others were 80-min midterms.
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees