CS510 Advanced Programming Language Implementation Spring 2014
Schedule and Assignments
- March 31: Introduction
- Apr 2 & 7: Compiler and Interpreter Architecture; the Java Virtual Machine (pdf slides) (pdf slides 4-up)
- Apr 9 & 14: Compilation challenges for Modern Languages
- Apr 16 & 21: Compilation challenges from Hardware
Trishul Chilimbi, Mark Hill, and James Larus, Cache-Conscious Data Structures, IEEE Computer, Dec. 2000
Mytkowicz, Diwan, Hawwirth, Sweeney, Producing Wrong Data Without Doing Anything Obviously Wrong!, ASPLOS09
- Homework 3 (due Apr 21)
- Apr 23 & 28: Efficient Interpretation (pdf slides) (pdf slides 4-up)
and Quick Compilation (rough notes)
- Berndl, Vitale, Zeleski, Brown, Context Threading: A flexible and efficient dispatch technique for virtual machine interpreters,CGO '05
- Shi, Casey, Ertl, Gregg, Virtual Machine Showdown: Stack vs. Registers, ACM TACO, 4(4), January 2008 (ACM Digital Library; free access from pdx.edu domain)
- Homework 4 (due Apr 28)
- Quick compilation implementation for SPARC zipped files
- Apr 30 & May 5: Garbage Collection (pdf slides) (pdf slides 4-up)
- May 7 & 12: Basic Compiler Optimizations and SSA; Dataflow Analysis (pdf slides) (pdf slides 4-up)
- May 14 & 19: Functional IR; Memory-based optimizations (functional IR) (examples) (pdf slides) (pdf slides 4-up)
- May 21 and 28: Correctness and verification (pdf slides) (Coq document) (executable Coq script)
- June 2: Dynamic Languages
- No homework this week, but please read the papers.
- Tim Lindholm & Frank Yellin, The Java Virtual Machine Specification, 2nd ed., happily available on-line.
(There are also updated versions for Java SE7 and SE8).
Java Implementations and Tools
For some homeworks, you'll need javac to generate byte code and a JVM (java) to run
the generated code for comparison with our interpreters. To make sure we all see
consistent behavior, you must use Java1.6.
A free implementation of 1.6 for linux or Windows is available
is typically pre-installed on MacOS.
It is also available on all the CS dept. machines.
- Jikes is an alternative Java front-end from IBM
that produces somewhat different byte-code than Sun's.
- Jasmin is stand-alone
assembler for Java bytecodes; you may find it useful for constructing
bytecode programs without writing Java sourcecode.
Other Useful Reading Material
- Books,etc.about Java
The official Java Language Specification, 3rd ed. is available on-line or can be purchased as a book.
Documentation for Sun's Java tools is here.
- The standard Java library (API) is documented here<
Ken Arnold, James Gosling, and David Holmes, The Java Programming Language, 4th ed., Addison--Wesley, 2005.
(earlier editions are also fine).
Bruce Eckel, Thinking in Java, 4th ed., Prentice-Hall, 2007.
The 3rd edition of this book is available free on the web from here,
but note that it only describes Java 1.4.
- There are also many tutorials on the net, such as
- Books about Java Bytecode and .NET
- Bill Venners, Inside the Java 2 Virtual Machine, McGraw-Hill, 1999.
Substantial portions of this book are also available
on-line. This is probably the best book to look at first.
- Jon Meyer & Troy Downing, Java Virtual Machine, O'Reilly 1997. This is available from the PSU library
as an ebook.
- Joshua Engel, Progrmamming for the Java Virtual Machine, Addison-Wesley, 1999.
- John Gough, Compiling for the .NET Common Language Runtime, Prentice Hall PTR, 2001.
- General Books on Compilers
- Keith Cooper and Linda Torczon, Engineering a Compiler 2nd ed., Morgan Kaufmann, 2012. (First edition is almost identical.)
- Al Aho, Monica Lam, Ravi Sethi, and Jeff Ullman, Compilers: Principles, Techniques, and Tools, 2nd ed. , Addison-Wesley, 2006.
- Steve Muchnick, Advanced Compiler Design & Implmentation, Morgan Kaufmann, 1997.
- Christopher Fraser and David Hanson,A Retargetable C Compiler: Design and Implementation, Benjamin/Cummings, 1995.
- Andrew Appel, Modern Compiler Implementation in Java, 2nd ed., Cambridge UP, 2002. (Or earlier editions;
be careful to check errata on author's web page.)
- Randy Allen and Ken Kennedy,Optimizing Compilers for Modern Architectures, Morgan Kaufmann, 2002.
- Robert Morgan,Building an Optimizing Compiler, Digital Press, 1998.
- Books on Garbage Collection
- Richard Jones, Antony Hosking, and Eliot Moss, The Garbage Collection Handbook, Chapman & Hall/CRC, 2011.
- Richard Jones and Rafael Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, Wiley, 1996.
- Books on Virtual Machines
- Jim Smith and Ravi Nair, Virtual Machines: Versatile Platforms for Systems and Processes,
Morgan Kauffman, 2005.
- Iain D. Craig, Virtual Machines, Springer, 2005.
JVM Implementations with Source-Code