CS/SE 153 Concepts of Compiler Design
Section 1: TuTh 1:30 - 2:45 PM room MH 422
Assignments
| # |
Date |
Due |
Assignment |
|
Aug 20 |
Aug 24 |
Submit proof of prerequisites to Canvas:
Assignments/Miscellaneous/Course prerequisites
|
|
Aug 20 |
Aug 26 |
Submit project team info (one submission per team) to Canvas:
Assignments/Miscellaneous/Project team info
|
Lectures
| Week |
Date |
Content |
| 1 |
Aug 22 |
Slides:
Goals; course learning outcomes; project teams; grading;
postmortem assessment report; types of programming languages;
it's all about translation; language classes during translation;
Pascal; example translations: conversion, execution, debugging, compilation
Example Pascal program:
SquareRootTable.pas
Example language conversion (Pascal to Java):
SquareRootTable.java
Example object code (Jasmin):
SquareRootTable.j
|
Goals of the course
This course will concentrate on practical aspects of compiler
construction, programming language design, and engineering a
large, complex software application.
-
Language conversion.
Convert a program written in one high-level language to an
equivalent program written in another high-level language.
-
Interpreter with an interactive symbolic debugger.
Execute a program written in a procedural language and be
able to set breakpoints, single-step, examine and set
variable values, etc.
-
Compiler construction and language design.
Design and build a working compiler for a programming
language that you invented. Write sample programs in your
language and then compile them into executable machine code
that you can run.
-
Software engineering.
Employ the best practices of object-oriented design and
team-based software engineering. A compiler is a large,
complex program! Managing the development of such a program
requires learning critical job skills that are highly
desired by employers.
This is a challenging course that will demand much
of your time and effort throughout the semester.
Course Learning Outcomes (CLO)
-
CLO 2: Develop a scanner
and a parser for a programming language.
-
CLO 3: Use the ANTLR 4
compiler-compiler tools.
-
CLO 4: Perform syntactic and
semantic analyses of source programs.
-
CLO 3: Generate symbol tables
and intermediate code for source programs.
-
CLO 4: Develop an interpreter
with an interactive symbolic debugger that
executes a source program in a suitable runtime environment.
-
CLO 5: Generate parse trees
and symbol tables for source programs.
-
CLO 6: Develop a language converter that converts a program from one language to another..
-
CLO 7: Develop an interpreter with an interactive symbolic debugger that executes a source program in a suitable runtime environment.
-
CLO 8: Develop a compiler that translates a source program into executable machine code.
-
CLO 9: Engineer a large, complex software application.
Prerequisites
Department policy is to enforce
all course prerequisites strictly
CS 47 Introduction to Computer Systems
or CMPE 102 Assembly Language Programming
|
grade C- or better |
|
CS 146 Data Structures and Algorithms
|
grade C- or better |
|
CS 154 Formal Languages and Computability
|
grade C- or better |
Required book
The Definitive ANTLR 4 Reference, 2nd edition
Terence Parr
Pragmatic Bookshelf, 2012
ISBN: 978-1934356999
http://www.antlr.org/
|
Online Pascal tutorials
We will use Pascal as the example source language.
|
Pascal Tutorial looks very good. It has an
online Pascal compiler.
|
|
Learn Pascal also looks good, although it doesn't
appear to cover set types.
|
Online Pascal development sites
You can edit, compile, and run Pascal programs online.
Other useful tutorials.
Software to Install
You should install and use an interactive development environment (IDE) such as Eclipse or IntelliJ. To develop translators for your language, you will need to download and install the ANTLR 4 package and its Eclipse or IntelliJ plugin, and then modify them to generate the necessary compiler components in Java. Instructions for ANTLR 4 will be provided when the time comes.
Project teams
You will form small project teams. Team membership is mandatory for this class. The teams will last throughout the semester. Once the teams are formed, you will not be allowed to move from one team to another, so form your teams wisely!
Course Requirements and Assignments
You must have good Java programming skills and be familiar with development tools such as Eclipse or IntelliJ.
Team-based lab assignments will provide practice with compiler design techniques and give you experience adding new features to a large legacy code base. Each student on a team will receive the same score for each team assignment.
Each team will submit its assignments into Canvas, where the rubric for scoring each will be displayed. Late assignments will lose 20 points and an additional 20 points for each 24 hours after the due date.
This is a challenging course that will demand much of your time and effort throughout the semester.