Programming Languages and Compilers I
198:515, Fall 2009
Announcements
- The second project is now available.
- Homework problem set 5 is now available.
Course Description
This course covers topics in programming languages and compilers such
as: LL(1) and LR parsing techniques with error handling;
attribute grammars and their use in syntax-directed translation; type
systems and polymorphism; models of programming language
semantics (i.e., operational semantics through closure interpreters );
data abstraction; functional, logical, and object-oriented paradigms;
intermediate representations of programs; examples of novel
programming models for cyber-physical systems; parallel programming
models; automatic parallelization.
The follow-up course
198:516 will focus on advanced, optimizing compiler design and
typically includes a programming project to write an optimizing compiler.
Prerequisites
The prerequisites include familiarity with an imperative programming
language (e.g., C), an undergraduate or graduate compilers
course, and an undergraduate or graduate data structures / algorithms
course. Permission of the instructor must be obtained if you lack a
prerequisite.
Staff
- Ulrich (Uli) Kremer
(uli@cs.rutgers.edu)
Office: CoRE 318, 445-6450 x 4974
Office hours: Thursday 1:00pm - 2:00pm, or by appointment
- Thang Le
Office: Hill 408
Office hours: Tuesday, 3:00pm - 5:00pm
Textbooks
- Michael L. Scott (required):
Programming Language Pragmatics, 3rd Edition
Publisher: Morgan Kaufmann (Elsevier), ISBN: 978-0-12-374514-9
- Aho, Lam, Sethi, Ullman (ALSU) (New Dragon Book) (suggested):
Compilers: Principles, Techniques, and Tools 2/E (2007)
Publisher: Addison-Wesley, ISBN10: 0321486811, ISBN13: 9780321486813
Note: the Old Dragon Book is also fine.
Aho, Sethi, Ullman (ASU)
Compilers: Principles, Techniques, and Tools (Edition 1986)
Publisher: Addison-Wesley, ISBN10: 0201100886, ISBN13: 9780201100884
- Levine et al. (suggested) :
Lex & Yacc (2nd Edition, 1992)
Publisher: O'Reilly, ISBN 1565920007
Several copies of the dragon book and "lex & yacc" book will be available on reserve in the
math library (Hill Center).
Homework and Project Questions
Please post questions regarding homeworks and projects using
Rutgers's Sakai
system
. Select Discussion and Private Messages in our
course group (16:198:515:01 F09).
DO NOT send homework or project
questions directly to the
TA or me. Thanks.
Lectures
Mondays noon - 3:00 p.m.,
Location: Hill 254
- Tuesday, CoRE 301 , September 8, 2009 ---
Lecture 1
Overview and introduction; top-down/predictive parsing,
LL(1) grammars, recursive descent parsers
Reading: Scott: Chapters 1, 2.1 - 2.2, 2.3.1 - 2.3.2;
ALSU: 1.1 - 1.5, 4.1 - 4.4
- September 14, 2009 ---
Lecture 2
Bottom-up/shift-reduce parsing, SLR(1)/LR(1) grammars
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.5 - 4.6
- September 21, 2009 --- cancelled
- September 25, 2009 ---
Lecture 3
Make-up lecture: Friday, 3:00pm, Hill 254
What can go wrong?, LR(1) canonical collection, table driven
parsers, LALR(1) parsing, lex/yacc, error recovery
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.7.1 - 4.7.4
- September 28, 2009 ---
Lecture 4
Attribute grammars (syntax-directed definitions), syntax-directed
translation schemes
Reading: Scott: Chapters 5.1-5.4; ALSU: Chapters
4.1 - 4.6
- October 5, 2009 ---
Lecture 5
Syntax-directed translation schemes, simple code generation,
introduction to first project.
Reading: Scott: Chapters 5.1-5.4; ALSU: Chapters
4.1 - 4.6
- October 12, 2009 ---
Lecture 6
Common-subexpression elimination, lambda calculus, introduction
to functional programming.
Reading: Scott: Chapter 10; ALSU: Chapters
4.1 - 4.6
- October 19, 2009 ---
Lecture 7
Programming project Part III:
Instruction
scheduling overview . More on lambda calculus, introduction
to functional programming.
Reading: Scott: Chapter 10
- October 26, 2009 ---
Lecture 8
Purely functional languages, Scheme, basic functions, recursive
programming, higher-order functions, introduction to closure
interpreters, the TINY language.
Reading: Scott: Chapter 10
- October 30, 2009 --- Ricitation for midterm,
11:00am - noon, Hill482
- November 2, 2009 --- Midterm exam ; closed
book, closed notes, 80 minutes
- November 9, 2009 ---
Lecture 9
Closure interpreters, the TINY language.
- November 16, 2009 ---
Lecture 10
Types, type systems, type checking, polymorphic types;
dependences, dependence analysis, vectorization, parallelization,
source-to-source loop transformations.
Homeworks
- Problem Set 1
If you want this homework to be graded ( there is no
credit ),
you need to submit the homework by Friday, September 25,
before 3:00pm. All problems, with the exception of problem
2.6, should be submitted as paper hard copies. Please submit
a single tar file for problem 2.6 through Sakai Assignments.
Sample Solution (without
program, i.e., problem 2.6). The sample parser
RDParser.java
(problem 2.6) can
also be found on the ilab machines in directory
~uli/cs515/homeworks/RDParser.java. The file contains
instructions
of how to compile and execute the parser.
- Problem Set 2
If you want this homework to be graded ( there is no
credit ), please submit the homework by Monday, October
5, before class (noon).
Sample solutions:
Problems 1 and 2 ,
Problem 3
- Problem Set 3
If you want this homework to be graded ( there is no
credit ), please submit the homework by Monday, October
19, before class (noon).
Sample solution
- Problem Set 4
If you want this homework to be graded ( there is no
credit ), please submit the homework by Monday, November
9, before class (noon).
Sample solution
- Problem Set 5
If you want this homework to be graded ( there is no
credit ), please submit the homework by Monday, November
16, before class (noon).
Sample solution
Projects
Useful Links
- Graduate Department of Computer Science
Contains links to online user manuals for Quintus Prolog and Scheme (scm)
- LCSR Computing Facility
This home page includes documentation for both Macs and Unix. Documents cover
topics such as "Getting Started", "Basic Unix Commands", "Using the X Window System",
"Programming in C Under Unix", "Electronic Mail", and "Working at Home".
- ilab
ilab cluster at Rutgers