Spring 2003 - CS 5304

Translator Design and Construction

J D Arthur


This one semester course addresses both the theoretical and parctical aspects of compiler design. It is assumed that students have a thorough working knowledge of a lexically scoped, procedural langugages (e.g. Pascal) and a familiarity with general assembly language concepts. The prerequisite; for this course is a C or better in one of the following courses CS 4114: Formal Languages, CS 5114: Computability and Formal Languages, or CS 5013: Models of Computation.

 

The material in this course will concentrate on lexical and syntatic analysis, symbol table organization, code generation, and code optimization techniques. During the semester assignments will be made and collected at approximately 2-week intervals. The end product will be a compiler that generates code for a stack-oriented machine.

 

In concert with the above-mentioned global objectives, the following information is germane to CS 5304.

 


Grading policy:

A complet and functional compiler IS a prerequisite for an "A" in this course! If you do not satisfy the above condition, the maximum attainable grade will be a "B+". With this exception, your grade will be determined as follows:

 

(1) Projects

 

50 %

Lexical Analyzer for Pascal Tokens

8 %

Expression Parser (LR)

8 %

Recursive Descent Parser

9 %

Symbol Table Integration

8 %

Code Generation for Expression Parser

8 %

Code Generation for RDP

9 %

 

 

 

 

(2) Pop Quizzes and Homework

10 %

 

 

(3) Midterm Exam

20 %

 

 

(4) Final Exam

20 %

 

Program Grading:

Internal Documentation, Program Structure, and Efficient Algorithms

25 %

Correct Results

75 %

A project that is not complete will be graded on the first three items and the maximum possible grade attainable will be 25%. It is not the grader's job to figure out "how close" the project is to being correct. I DO NOT ACCEPT LATE ASSIGNMENTS! !.

Ethics:

VPI & SU Honor Code is applicable.

 

Course Text:

Compiliers: Principles, Techniques and Tools by Aho, Sethi, Ullman

 

Any Pascal Programming Text (Optional)

 

Tentative Lecture Schedule:

 

Topic

Approximate Lecture Hours

Outline of course, functions of a compiler, language elements

3

Lexical Analyzers and Finite State Machines

5

Implementing an LR Parser

6

Top Down, Recursive Descent Parsing

4

LR Parsers and parsing theory

6

LL Parsers and parsing theory

5

Symbol Tables

2

Hypomac (Intro)

2

Runtime Systems

3

Code Generation

5

Runtime Storage/Allocation

2

Data Flow Analysis

1

Code Optimizations

1