COP5621exam3 - COP5621 Compiler Construction Exam 3 -...

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

View Full Document Right Arrow Icon
COP5621 Compiler Construction Exam 3 - Spring 2007 Name: (Please print) Put the answers on these sheets. Use additional sheets when necessary. You can collect 100 points in total for this exam. 1. What is the name of the evaluation method where the evaluation order of semantic rules is determined by a topological sort of the dependence graph obtained from the parse tree? (mark one ) (4 points) (a) Rule-based method (b) Oblivious method (c) Parse-tree method (d) Sorting method 2. Which attributes of S in the following grammar are synthesized or inherited? (mark one ) (4 points) S 1 a S 2 S 1 .x := S 2 .x; S 2 .y := S 1 .y + ’a’ S 1 b S 2 S 1 .x := S 2 .x; S 2 .y := S 1 .y + ’b’ S ε S .x := S .y (a) x of S and y of S are synthesized (b) x of S is synthesized and y of S is inherited (c) x of S is inherited and y of S is synthesized (d) x of S and y of S are inherited 3. What is the difference between name equivalence and structural equivalence of types? (8 points) 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
4. Consider the following C type declaration of a binary tree node:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

COP5621exam3 - COP5621 Compiler Construction Exam 3 -...

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