|Lecture:||Thursdays, 5:10-7:00pm, CIWW 312|
|Instructors:||Eva Rose (firstname.lastname@example.org) and Kristoffer H. Rose (email@example.com)|
|Instructors's office hours:||Thursdays, 4-5pm, CIWW 328|
|Prerequisites:||G22.1170 (algorithms), G22.2110 (programming languages), and G22.2250 (operating systems)|
Compilers: Principles, Techniques, and Tools (2nd Edition), aka the |
by Aho/Lam/Sethi/Ullman. Addison-Wesley, 2007.
|Grader:||Weicheng Ma (firstname.lastname@example.org)|
|Grader's office hours:||Tuesday, 6-7pm, in CIWW 229 (the computer lab)|
The course description below is quoted from the Graduate School of Arts and Science Bulletin:
This is a capstone course based on compilers and modern programming languages. The topics covered include structure of one-pass and multiple-pass compilers; symbol table management; lexical analysis; traditional and automated parsing techniques, including recursive descent and LR parsing; syntax-directed translation and semantic analysis; run-time storage management; intermediate code generation; introduction to optimization; and code generation. The course includes a special compiler-related capstone project, which ties together concepts of algorithms, theory (formal languages), programming languages, software engineering, computer architecture, and other subjects covered in the MS curriculum. This project requires a substantial semester-long programming effort, such as construction of a language compilation or translation system that includes lexical and syntactic analyzers, a type checker, and a code generator.
Specifically, the course will follow the
(second edition) as the text book. In the semester-long programming
project, we will implement a fully functional compiler for a simple
programming language. The implementation will use a custom NYU
version of the compiler-generator infrastructure
CRSX, called HACS.
Here is the schedule. Each lecture links to the slides for that
lecture, as they become available. Paragraph references are to the
dragon book, except
H references to sections of
the HACS documentation.
Note that the contents of every provided link is subject to change up to end of the lecture it is associated with.
|Date||Lecture topic||Reading||Homework||Project milestone|
|Thur 9/4||1. Introduction||1.1-1.2 (12p)||hw1|
|Thur 9/11||2. Lexical analysis||3.1-3.4,3.6,3.7 (50p), H1+H2||hw2|
|Thur 9/18||3. Top-down syntax analysis||2.4 + 4.1-4.4 (50p), H3||hw3||pr1 (due 10/6) samples (zip).|
|Thur 9/25||4. Syntax-directed translation (SDT)||2.3 + 5.1-5.3 (30p), H4||hw4|
|Thur 10/2||5. Name analysis||1.6 + 2.7 (15p), H7||hw5|
|Thur 10/9||6. Type analysis||6.3 + 6.5 (20p), H6||hw6||pr2a (due 11/3)|
|Thur 10/16||7. Intermediate code generation||6.1, 6.2, 6.4, 6.6, 6.9 (34p), H5||hw7||pr2b (due 11/25) Pr2Base.hx sample (zip)|
|Thur 10/23||Midterm exam|
|Thur 10/30||8. Runtime environments||7.1-7.4 (36p)||hw8|
|Thur 11/6||9. Code generation||8.1-8.4 + 8.6 (34p)||hw9|
|Thur 11/13||10. Register allocation||8.8 (5p)||hw10|
|Thur 11/20||11. Bottom-up syntax analysis||4.5-4.6 (26p)||hw11|
|Thur 11/27||Thanksgiving recess|
|Thur 12/4||12. Optimization||8.5 + 8.7 + 9.1 (26p)||pr3 (due 12/16) Pr3Base.hx samples (zip) hints|
|Thur 12/11||13. Burka: The Shape of an Object||final announcements|
|Thur 12/18||Final exam|
The Shape of an Object
The layout of structures in memory is often an after-thought in the early designs of languages and their runtime systems. However there are a surprising number of choices available to the designer, with interesting trade-offs in speed, determinism, memory requirements, memory-management options, and other capabilities. Some of these are old techniques known to assembly programmers of yore, but forgotten by most high-level programmers. Others are still largely academic.
Peter worked at IBM for 14 years, mostly on the J9 Java Virtual Machine team. In this talk we'll explore some of the techniques used to optimize object shape in the J9 VM, as well as some more speculative options.
There are homework assignments most weeks (the schedule indicates when homework is assigned). These test your understanding of material beyond the immediate hands-on knowledge needed for the project. Each homework assignment is made available after the appropriate lecture, and must be submitted into the NYUClasses system before the specified deadline, typically in the morning on the day of the subsequent lecture.
There are project milestones, which involve a substantial amount of programming (the schedule indicates when they are assigned). Each milestone builds on code from the previous milestone, however, reference code will be made available before each as an alternative to your own code from the previous stage. Project milestones must be submitted into NYUClasses system no later than the specified due date.
You can develop the project on your own machine, but must make sure that it works on the energon1.cims.nyu.edu to energon4.cims.nyu.edu machines at NYU, as we will test the code there.
There are two exams: a midterm and a final. The exams cover similar questions as the homeworks. The final exam is cumulative: it will cover material from the entire semester.
Final grades will be calculated to 15% from homeworks, 45% from the project, 15% from the midterm exam, and 25% from the final exam.
|Machines at Courant:||http://cims.nyu.edu/webapps/content/systems/resources/computeservers|
|Graduate cs.nyu.edu courses:||http://cs.nyu.edu/webapps/fall2014/Graduate/courses|
|Graduate cs.nyu.edu calendar:||http://cs.nyu.edu/webapps/Graduate/calendar|
|Previous Incarnations:||Spring'14 (Kristoffer Rose with Eva Rose), Fall'13 (Martin Hirzel and Kristoffer Rose), Spring'13 (Hubertus Franke), Fall'12 (Mohamed Zahran), Fall'11 (Martin Hirzel), Spring'09 (Allan Gottlieb)|
|Academic integrity policy:||http://cs.nyu.edu/web/Academic/Graduate/academic_integrity.html|