Soot: a Java Optimization Framework
Latest version: 1.2.0
Need help using Soot? See the Soot tutorials.
Soot is a Java optimization framework. It provides three intermediate
representations for analyzing and transforming Java bytecode:
- Baf: a streamlined representation of bytecode which is simple to
manipulate.
- Jimple: a typed 3-address intermediate representation suitable for
optimization.
- Grimp: an aggregated version of Jimple suitable for decompilation and
code inspection.
Soot can be used as a stand alone tool to optimize or inspect class files, as well
as a framework to develop optimizations or transformations on Java
bytecode.
Soot is free software and is licensed under the GNU Library General Public
License.
The Soot Framework is an evolving research project. Our goal is to produce a
highly robust framework for optimizing Java which is easy to use.
The 1.2.0 release is our second official
release. The major new feature in 1.2.0 is support for classfile
annotation (courtesy of Feng Qian and Patrice Pominville). There is
also an improved typing system, due to Etienne Gagnon. Variable-Type
Analysis was cleanly reimplemented by Felix Kwok and we have included
it in our release of Soot for the first time. We also fixed a few
bugs reported against version 1.0.0.
In the future, we will develop a mechanism to support
whole-program analysis based on a program's call graph.
Major improvements in version 1.2.0 |
top |
This is a subset of changes in version 1.2.0; a more complete listing is in the CHANGES file.
1. An annotation framework was added to the project.
2. A new implementation of the typing system is included.
2. A clean implementation of VTA is finally included in Soot.
Download and Installation |
top |
Get Soot from our software repository at http://www.sable.mcgill.ca/software.
To install it you must unjar(untar) it, and add the classes directories
soot-1.2.0/soot/classes and
soot-1.2.0/jasmin/classes to your CLASSPATH.
To test your installation of Soot, try:
java soot.Main
for some options on processing classfiles. They are documented in more detail in the
usage document.
Note that Soot requires at least JDK 1.2 (Java 2), as it uses Java Collections.
We have experienced some problems with the sunwjit JIT compiler; we do
not recommend the use of this JIT. In particular, common subexpression
elimination has triggered JIT problems with sunwjit.
Soot is already compiled in the distribution. To recompile Soot,
we use the jams tool, a modified version of jam by Raffaele Sena.
This is included in the soot-1.2.0/jams directory of the distribution.
Invoking jams from the soot-1.2.0/soot will recompile Soot as necessary.
It may be tricky to compile both Soot and jasmin at the same time
because of dependences. An easy way is to use the compiled jasmin
when compiling Soot.
NOTE: The Jimple parser is generated by SableCC.
It requires lexer.dat and parser.dat files to be in the classes directory;
they are provided in the src directory. Also, Soot uses peephole optimization to improve the
generated bytecode. This requires the peephole.dat file be copied to
the classes directory.
If you have jams correctly set up, the `foo' target will copy these .dat
files from the src/ directory to the classes/ directory. Use the command
jams foo in the main Soot directory.
We have developed a number of documents describing Soot. Your main
current sources of information are:
- There are 2 accepted conference papers
describing Soot.
- A set of documents describing Soot, both as a Java application optimizer and
as a compiler framework.
- The Soot API. Most of the
functionality is self-explanatory. This API is included in the Soot
distribution.
- The Soot source itself. It is full of examples on how to use the API.
- The Soot mailing list. You can get a human response to your questions as
well as browse the archive.
The mailing list soot-list@sable.mcgill.ca is the primary forum
for questions, discussions and comments on the Soot framework.
To subscribe, send an e-mail to majordomo@sable.mcgill.ca with
subscribe soot-list in the body.
To unsubscribe, send an e-mail to majordomo@sable.mcgill.ca with
unsubscribe soot-list in the body.
You can also view the mailing list archive.
The official Soot maintainers are
Raja Vallee-Rai,
Patrick Lam, and
Feng Qian.
Click here for the complete list of contributors and acknowledgements.
Last updated on Octumber 2, 2000
|