Programming Languages and Compilers I
198:515, Fall 2011
Announcements
- There will be a review session on Monday,
December 19, from 5:30pm to 6:30pm.
in Hill 120, our regular class room.
- All homework sample solutions are now available.
- The code generation procedure for the third project does not
require the implementation of loop distribution as part of
vectorization. Please see the project description for details.
- The midterm grades are available now.
Here is a
sample solution.
Please first look over this sample solution
- The Project 3 submission site is now open.
.
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: Tuesdays, 2:00-3:00pm or by appointment
- Jason Perry
Office: CoRE 329
Office hours: Mondays, noon - 2: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
Thursdays - 3:20 - 6:20p.m.,
Location: Hill 120
- September 1, 2011 ---
Lecture 1
Overview and introduction; top-down/predictive parsing,
LL(1) grammars
Reading: Scott: Chapters 1, 2.1 - 2.2, 2.3.1 - 2.3.2;
ALSU: 1.1 - 1.5, 4.1 - 4.4
- September 8, 2011 --- no class; Monday class schedule applies
- September 15, 2011 ---
Lecture 2
Recursive descent parsing; bottom-up/shift-reduce parsing
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.5 - 4.6
- September 22, 2011 --- no class;
- September 26, 2011 --- Lecture 3
ROOM HILL254, TIME 6:15pm - 9:00pm
Bottom-up/shift-reduce parsing, syntax-directed translation
schemes, lex and yacc, first project
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.5 - 4.6, 5.4
- September 29, 2011 --- Lecture 4
LR(0) and LR(1) canonical collections; SLR(1) and LALR(1); error
recovery in LR parsing;
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.5 - 4.7
- October 6, 2011 --- Lecture 5
LALR(1) revisited; simple code generation; local common
subexpression elimination; attribute grammars.
Reading: Scott: Chapters 2.3.3 - 2.3.4; 2.4 - 2.5 ; ALSU: Chapters
4.5 - 4.7, 5.1- 5.3, 6.1, 6.4.3, 6.7.3
- October 13, 2011 --- Lecture 6
Lambda calculus, beta-reductions, Church-Rosser theorems,
call-by-name and call-by-value evaluation order, data
representations, Y combinator, introduction to Scheme.
Reading: Scott: Chapter 10;
- October 20, 2011 --- Lecture 7
Introduction to Scheme, higher-order functions, Scheme examples
(recursive programming)
Reading: Scott: Chapter 10 and web resources (lambda calculus);
- October 27, 2011 --- Lecture 8
the TINY language with its interpreters;
Reading: Scott: Chapter 7.1 - 7.2;
- November 3, 2011 --- Midterm exam
- November 10, 2011 --- Lecture 9
Type and type systems, polymorphic types, type conconstruction
algorithm based on unification
Reading: Scott: Chapter 7.1 - 7.2, ALSU 6.5 ;
- November 15, 2011 --- Scheme Programming
LOCATION: Hill120 - our usual class room
Scheme programming and introduction to second project
program set 1 ,
program set 2 ,
program set 3
- November 17, 2011 --- Lecture 10
Predicate Logic, Prolog
Reading: Scott: Chapter 11
- December 1, 2011 --- Lecture 11
Dependence analysis, vectorization, parallelization, loop
transformations, basic vectorization algorithm
Reading: TBA
- December 6, 2011 --- Project 3 Code Walk
LOCATION: CoRE 301 - large conference room, TIME: 6:00pm
Code description for the vectorizing compiler project
- December 8, 2011 --- Lecture 12
Abstract data types, object oriented programming, subtyping in C++,
virtual functions, constructors and destructors
Reading: Scott: Chapter 9.1 - 9.4
- December 19, 2011 --- Review session, 5:30pm-6:30pm; Location: Hill 120 (in class)
- December 20, 2011 --- Final exam
Time: 1:00pm-4:00pm; Location: Hill 120 (in class)
Homeworks
Projects
- Project 1
Due date: Monday, October 24, at 11:59pm EST
Please submit your project through
Rutgers's Sakai
system . The submission site will be set up a few days before
the submission deadline. You may submit multiple times, and only
your last submission will be graded.
- Project 2
NEW due date: Wednesday, November 30, at 11:59pm EST
Please submit your project through
Rutgers's Sakai
system . You may submit multiple times, and only
your last submission will be graded.
- Project 3
due date: Saturday, December 17, at 11:59pm EST
Please submit your project through
Rutgers's Sakai
system . You may submit multiple times, and only
your last submission will be graded.
Useful Links
- 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