CS577 Modern Language Processors Spring 2011
Schedule and Assignments
- March 28: Introduction (rough lecture notes)
- March 30 & Apr 4: Compiler and Interpreter Architecture; the Java Virtual Machine (pdf slides) (pdf slides 4-up)
- Apr 6 & 11: Compilation challenges for Modern Languages
- Apr 13 & 18: Compilation challenges from Hardware
- Apr 20 & 25: 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
- Homework 4 (due Apr 25)
- Quick compilation implementation for SPARC
- zipped files
- Apr 27: Basic Compiler Optimizations and SSA (pdf slides) (pdf slides 4-up)
- No Reading or Homework; get a head start on your project
- May 2: Project sharing day
- May 4 & 9 : Dataflow Analysis; Memory Optimizations; Functional IRs (pdf slides)(pdf slides 4-up)
- May 11 & 16 : Garbage Collection
- May 18 & 23 : Dynamic Languages
- Gal, Eich, et al., Trace-based Just-in_Time Type Specialization for Dynamic Languages,PLDI 2009.
- Hoelzle, Chambers, Ungar, Debugging Optimized Code with Dynamic Deoptimization, PLDI 1992.
- Homework 7 (due May 23)
- May 25 & June 1 : Safety and Verification
- Tim Lindholm & Frank Yellin, The Java Virtual Machine Specification, 2nd ed., happily available on-line
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 for linux or Windows is available
is pre-installed on MacOS (you may need to update to get 1.6).
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, Morgan Kaufmann, 2004.
- 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 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