Programming Languages and Compilers I
198:515, Fall 2007
Announcements
- FINAL EXAM: Friday, December 14, 6:00-9:00pm,
CoRE A (301)
- EXTENSION for third project: Tuesday, December
18!
-
Homework problem set 6 has been posted.
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 (closure interpreters) ,
lambda calculus); data
abstraction; functional, object-oriented and declarative paradigms;
intermediate representations of programs; programming models for
mobile and dynamic networks. 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 (recommended), and 198:513. 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: Tuesday, 3:30-4:30pm
- John McCabe
Office: Hill 367
Office hours: Thursday, 5:00-6:00pm
Textbooks and Research Paper
- Sethi (required):
Programming Languages: Concepts and Constructs (2nd Edition)
Publisher: Addison-Wesley, ISBN10: 0201590654, SBN13: 9780201590654
- Aho, Lam, Sethi, Ullman (ALSU) (New Dragon Book) (recommended):
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. (recommended) :
Lex & Yacc (2nd Edition, 1992)
Publisher: O'Reilly, ISBN 1565920007
- Ni, Kremer, Stere, and Iftode. (required):
Programming Ad-Hoc Networks of Mobile and Resource-Constrained Devices .
ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'05),
Chicago, IL, June 2005.
Several copies of the dragon book and "lex & yacc" book will be available on reserve in the
math library. An online copy of the research paper can be obtained by clicking
on the link.
Homework and Project Questions
Please post questions regarding homeworks and projWednesday October
3rd
Friday October 5th.
ects using
Rutgers's Sakai
system
. Select Discussion and Private Messages in our
course group (16:198:515:01 F07).
DO NOT send homework or project
questions directly to the
TA or me. Thanks.
Lectures
Tuesday/Thursday, 1:30 - 2:50 p.m. ,
Location: Hill 254
- September 4, 2007 --- cancelled
- September 6, 2007 --- cancelled
- September 11, 2007 ---
Overview and introduction
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 1.1 -- 1.5
- September 13, 2007 ---
Top-down/predictive parsing,
LL(1) grammars, recursive descent parsers
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 4.1 - 4.4
- September 18, 2007 ---
Bottom-up/shift-reduce parsing,
SLR(1) grammars, table driven parsers
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 4.5 - 4.7
- September 20, 2007 ---
Bottom-up/shift-reduce parsing,
SLR/LR(1) grammars, LR(0) canonical collections, table driven parsers
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 4.5 - 4.7
- September 25, 2007 ---
LR(1) grammars, LR(1)
canonical collections, what can go wrong, lex/yacc
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 4.5 - 4.7
- September 27, 2007 ---
Attribute grammars
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 5.1 - 5.4,
Sethi: Chapter 13
- October 2, 2007 ---
Syntax directed translation
schemes, lex and yacc
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 5.1 - 5.4,
Sethi: Chapter 13
- October 4, 2007 ---
Code generation, common
subexpression elimination, first project.
Reading: Aho, Lam, Sethi, Ullman (ALSU): Chapters 6.1 - 6.4, 6.6 - 6.8
- October 9, 2007 ---
Predicate logic, Prolog
Reading: Sethi Chapter 11
- October 11, 2007 ---
Horn clauses, unification,
backchaining, procedural interpretation, lists in Prolog
Reading: Sethi Chapter 11
- October 16, 2007 ---
Occurs check, arithmetic in
Prolog, negation as failure
Reading: Sethi Chapter 11
- October 18, 2007 (Double Hour: 12:10pm -
2:50pm) ---
More on Prolog
Reading: Sethi Chapters 10
- October 23, 2007 ---
Lambda calculus
Reading: Sethi Chapter 10
- October 25, 2007 (Double Hour: 12:10pm -
2:50pm) ---
Recitation for midterm exam
during second hour.
Reading: Sethi Chapter 10
- October 30, 2007 --- Midterm exam . In class.
- November 1, 2007 ---
Closure interpreters
- November 6, 2007 ---
TINY basic interpreter, type
reconstrution, polymorphic type checking
- November 8, 2007 ---
Discussion of Scheme programming project (John McCabe)
- November 13, 2007 ---
OO Languages: Context-sensitive reference analysis
Reading (background):
- November 15, 2007 ---
OO Languages: Type-based call graph construction; reference
analysis of OO programs
- November 20, 2007 ---
no class Happy Thanksgiving!
- November 27, 2007 ---
Closure interpreters;
project hints
- November 29, 2007 ---
Optimizing compilers;
safety, profitability, opportunity; memory-hierarchy
optimizations
- December 4, 2007 ---
Source-level optimizations; loop unrolling, unroll-and-jam;
benefit analysis (see slides from Nov. 29)
- December 6, 2007 ---
Local vs. global
optimizations; basic blocks; data-flow analysis; AVAIL and RD
data flow problems
Reading: ALSU Chapters 9.1 - 9.3
- December 11, 2007 ---
last class
- December 13, 2007 ---
recitation session at class location and time
- December 14, 2007 ---
Final exam : Friday, 6:00pm, CoRE A (301)
Homeworks
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".
- PROLANGS
Home page of the programming language research group at Rutgers.
Acknowledgement
This course has been based on courses taught by Prof. Ryder and
Prof. Borgida at Rutgers University.