CS510JIP Understanding Java Implementation (Winter 1998)
Projects!
Here is a selection of results from student projects.
Tools
-
Version 1.1.1 of Sun's Java Development Kit is installed on the
PSU CS network; do "
addpkg jdk1.1.1
" to add it to your set of
configured packages.
-
You can fetch a copy of the latest release (currently 1.1.5)
for your own Sparc or MS system
directly from Sun.
-
Other tools are installed on the PSU CS system in
/u/jipacc
.
These include:
-
jasmin
- a JVM assembler.
-
D-Java
- a JVM disassembler that can produce jasmin
-format output (unlike SUN's javap -c
).
- To use, add
/u/jipacc/D-Java/bin
to your path.
- For
jasmin
-compatible output, use the -o jasmin
option.
- For detailed use information, consult the file
/u/jipacc/D-Java/readme
.
- You can download your own copy from
here.
-
mocha
- a bytecode-to-Java decompiler
- To use, consult
/u/jipacc/mocha/Readme.txt
.
- You can download your own copy from
here.
Note the legal controversy.
- Try out another decompiler called SourceAgain (sometimes crashes my browser).
- For more information about decompilers,
take a look at Dave Dyer's article "Java decompilers compared".
-
kaffe
- a JVM interpreter and JIT compiler with public source
- To use, consult
/u/jipacc/kaffe-0.9.2/README
.
- Have a look at the source code in
/u/jipacc/kaffe-0.9.2/kaffe/kaffevm
.
- You can download your own copy from
here.
- Reading and writing .class files.
-
To write Java .class files, try generating text output that can
be fed to the jas assembler
(installed in the class account as part of
jasmin
).
-
For an example of how to read Java .class files into C, take a
look at the
kaffe
source code.
-
To read or write .class files directly in Java, consider Java Class.
- For those wanting to do code generation for the PCAT language,
a complete front end (for the SPARC)
and (C-based) tools for manipulating abstract
syntax are now installed in
/u/jipacc/pcat
, or you can
download them.
Syllabus
Jan. 8 Introduction; the Java language. (4up postscript)
Jan. 15 Java Virtual Machine specification. (4up postscript)
Jan. 22 JVM Specification (continued). (Notes incomplete.) (4up postscript)
Jan. 29 Internal structure of Java Virtual Machine. (Outline only.) Mini-interpreter source code
Feb. 5 Interpretation vs. just-in-time compilation.
Reading:
-
Hummel, Azevedo, Kolson, and Nicolau, "Annotating the Java Bytecodes in Support of Optimization,"
ACM 1997 Workshop on Java for Science and Engineering Computation, Las Vegas, Nevada, June 1997.
-
Krall and Grafl, "CACAO - A 64 bit JavaVM Just-in-Time Compiler",
ACM 1997 Workshop on Java for Science and Engineering Computation, Las Vegas, Nevada, June 1997.
Feb. 12 Garbage collection. (4up postscript) Deadline for agreeing on project/report topics
Feb. 19 Security for mobile code. (No lecture notes available.)
Reading:
-
Drew Dean, Edward W. Felten, Dan S. Wallach, and Dirk Balfanz,
Java Security: Web Browsers and Beyond,
Technical Report 566-97, Department of Computer Science, Princeton University, February 1997.
-
Dan S. Wallach, Dirk Balfanz, Drew Dean, and Edward W. Felten,
Extensible Security Architectures for Java.
16th Symposium on Operating Systems Principles (Saint-Malo, France),
October, 1997.
Feb. 26 Mobile code.
Reading:
- Sun's RMI Interface
- Thorn, Programming Languages
for Mobile Code, (link broken?) ACM Computing Surveys, September 1997.
- Cardelli, Mobile Computing.
- Cardelli,
A language with Distributed Scope (about Oblique).
- Knabe, Language Support for Mobile Agents.
- Henry Cejtin, Suresh Jagannathan, and Richard Kelsey,
Higher-Order Distributed Objects, ACM
Transactions on Programming Languages and Systems, September 1995. (about Kali Scheme)
Mar. 5 Whole-program optimization. Project/report due.
Reading:
- Urs Hoelzle, and David Ungar, Reconciling Responsiveness with Performance in Pure Object-Oriented Languages. ACM Transactions of Programming
Languages and Systems, 1996.
-
Craig Chambers, Jeffrey Dean, and David Grove,
Whole-program optimization of object-oriented languages.
Tech. Rep. 96-06-02, Dept. of Computer Science,
Univ. of Washington, (June, 1996).
- David Bacon,
Fast and Effective Optimization of Statically Typed
Object-Oriented Languages. Dissertation, University of California at Berkeley, 1997.
Mar. 12 Wrap-up; presentation of student projects.
Other Topics
General Java Implementation Links
Compiling to the JVM from other languages.