{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

573exam1sol - ECE 573 Midterm 1 Name Purdue email Please...

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

View Full Document Right Arrow Icon
ECE 573 — Midterm 1 September 29, 2009 Name: ______________________________________ Purdue email: ______________________________________ Please sign the following: I affirm that the answers given on this test are mine and mine alone. I did not receive help from any person or material (other than those explicitly allowed). X ___________________________________________ Part Points Score 1 8 2 15 3 10 4 22 5 25 6 20 Total 100
Image of page 1

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

View Full Document Right Arrow Icon
Part 1: Short answers (8 points) 1) Place the following parts of a compiler in order and identify which are part of the front-end, and which are part of the back-end. Parser, Code generator, Scanner, Optimizer (of IR), Semantic routines (2 points) Scanner, Parser, Semantic routines, Optimizer, Code generator. The first three are the front-end 2) Name two (of four) different types of compilers, and provide a real-world example for each that you name (2 points) Source-to-source (research compilers); source-to-assembly (gcc, g++, etc.); source-to- bytecode (javac, C# compiler, etc.); bytecode-to-assembly (JIT compilers) 3) Explain (briefly—you shouldn ʼ t need more than one sentence) the difference between the syntax of a language and its semantics (1 point) The syntax of a language determines its structure, the semantics determine its meaning 4) Explain the difference between a context-free grammar and a context-sensitive grammar (1 point) Context-free grammar: non-terminals can be replaced by terminals independent of what surrounds them. Context-sensitive grammar: some productions may require that a non- terminal appear in a certain context before they can be applied.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern