Discussion: 1 hour
Prerequisite: Course ECS 20, ECS 140A; course ECS 120 recommended
Grading: Letter; project (50%), midterm (20%), final (30%)
Catalog Description:
Principles and techniques of lexical analysis, parsing, semantic
analysis, and code generation. Implementation of compilers.
Goals:
This course introduces the students to the principles of compiler
writing. It focuses on lexical analysis, parsing, and simple code generation.
The students are expected to write a complete compiler for a very simple
high level programming language.
Expanded Course Description:
Computer Usage:
I. Students write their compilers in C++ or Java.
II. Programs are developed on DEC, HP, or SGI workstations running corresponding UNIX operating systems. Students use editors such as vi and emacs, and are exposed to debuggers, compiler-generator tools such as Lex and Yacc, and other UNIX tools.
Laboratory Projects:
The programming project involves writing a compiler for a simplified,
Pascal-like language, to produce assembly language code for RISC architectures
(such as MIPS or SPARC). The emphasis is on giving students experience in
applying concepts discussed in lecture to a specific case. The project is
evaluated by running the student's compiler against a set of source programs
whose exact make-up is not known to the student. Students are expected to
design the solution to this project individually.
Engineering Design Statement:
The students are given a set of basic principles in class, but
need to exercise a considerable amount of judgment in their design and implementation.
Design factors include choice of appropriate data structures and algorithms,
error message design and error-recovery procedures, and questions affecting
implementation efficiency. Students are graded on correctness of the compiler
as well as the efficiency of the implementation. Examinations include design
material.
ABET Category Content:
Engineering Science: 2 units
Engineering Design: 2 units
Goals:
Students will:
Student Outcomes:
Prepared by: R. Pandey (October 1997)
Overlap Statement:
This course does not duplicate any existing course.