midterm-2010-sol

midterm-2010-sol - CS5363 Midterm Exam Oct 28, 2010 1....

Info iconThis preview shows pages 1–2. 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: CS5363 Midterm Exam Oct 28, 2010 1. (15pts) Answer each of the following questions, using no more than three sentences for each question. (a) What are the key language features of functional/imperative/object-oriented pro- gramming languages? (b) What are the three different phases that a compiler can be separated into? What does each phase do? (c) What is a parse tree? What is an abstract syntax tree? What are the key differences? (d) What is different between transparent and opaque type declarations? Give two different approaches to determine whether two compound types are equivalent. (e) What is the coordinate of a variable? What is the difference between the global display and the access link? What are they used for? 2. (10pts) Construct a regular expression for each of the following languages. (a) All strings over alphabet { 0, 1, 2 } that do not end with 1. For example, 120 and 202 are strings in the language, but 21 is not. Solution: (0 | 1 | 2)*(0 | 2) (b) All strings over alphabet { 0, 1, 2 } that do not contain the substring 11. For example, 120, 21, and 202 are strings in the language, but 112 or 2110 is not....
View Full Document

This note was uploaded on 01/29/2012 for the course CS 5363 taught by Professor Staff during the Spring '08 term at Texas San Antonio.

Page1 / 5

midterm-2010-sol - CS5363 Midterm Exam Oct 28, 2010 1....

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

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