Soot Home

Introduction
Release Status
Soot Bug Tracking
Improvements
Download
Compilation
Documentation
Mailing List
Credits

Sable Home

Soot: a Java Optimization Framework

Latest version: 1.2.3 (May 8, 2002)


Need help using Soot? See the Soot tutorials.

Introduction top
Soot is a Java optimization framework. It provides three intermediate representations for analyzing and transforming Java bytecode:
  1. Baf: a streamlined representation of bytecode which is simple to manipulate.
  2. Jimple: a typed 3-address intermediate representation suitable for optimization.
  3. 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 Lesser General Public License.


Release Status top

The Soot Framework is an evolving research project. Our goal is to produce a highly robust research framework for optimizing Java which is easy to use.

The latest release is version 1.2.3, which fixes a few bugs from release 1.2.2 and incorporates some improvements of memory usage. Some other enhancements are an option for preserving line number tables, re-implementation of partial redundency elimination, some utility classes for viewing CFGs, and XML output of Jimple bodies. Jasmin has been upgraded to sable-1.2, which allows the length of a token more than 64K (this is often necessary for annotation).

The release 1.2.2 fixes a few bugs from release 1.2.1. It also improves its performance and stability over former versions. Jasmin has been upgraded to 1.06-s10, which fixes a bug in the grammar dealing with attribute data.

The release 1.2.1 fixes a few bugs from release 1.2.0. A big improvement is that the release 1.2.1 can accept .jar file in the --soot-classpath command option. Also Jasmin has been upgraded to 1.06-s9, which no longer depends on Soot. (Note that versions prior to 1.06-s8 also did not depend on Soot.)

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.

We plan the following releases for the near future:

  • The Dava decompiler is planned to have separate releases.
  • A points-to analysis package is in our release schedule.
  • Several new features will be included in our next major release, 1.3.0, which is scheduled for the end of the summer.

Improvements in version 1.2.3 top
Major improvements in version 1.2.3 are:
  • Improvements of memory usage reported by Michael Pan (pan@math.tau.ac.il).
  • Re-implementation of partial redundency elimination by Florian Loitsch (florian@loitsch.net).
  • Some utility classes helping SOOT produce Dot graphs.
  • An option (-A LineNumber) to preserve line number tables.
Jasmin sable-1.2 allows the length of a token more than 64K. A complete list of changes is in the
CHANGES file.

Major improvements in version 1.2.2

The release 1.2.2 improves the JSR eliminator to handle nested JSR/RETs, and corrects a misused method call in the method for building call graphs. Jasmin 1.06-s10 fixes a bug in the grammar.

Major improvements in version 1.2.1

The release 1.2.1 fixed the jar bug in older versions. Now Soot can accept `rt.jar' in the --soot-class-path command-line option.

Major improvements in version 1.2.0

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.
3. 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.3/soot/classes and soot-1.2.3/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. Release 1.2.3 has been tested on Sun's JDK 1.3.1_01 for Linux.


Compilation top
Soot is already compiled in the distribution. To recompile Soot, we use make using the Makefile in the main soot directory. The second choice is to use the SootCompiler class in the main soot/src directory. Note that in either case, jasmin must be in your classpath to compile Soot. Jasmin can be recompiled by using the script ./bin/compile_all.sh in the main Jasmin directory. Release 1.2.3 uses a new version of Jasmin, sable-1.2.

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. Both the provided Makefile and SootCompiler automatically copy these files as needed.


Documentation top
We have developed a number of documents describing Soot. Your main current sources of information are:
  • Our publication page has several conference papers describing Soot.
  • A set of tutorials 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.

Mailing List top
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.


Credits top
The official Soot maintainers are Patrick Lam, Feng Qian, and Ondrej Lhotak. For Soot support, write to the Soot mailing list at soot-list@sable.mcgill.ca.

Click here for the complete list of contributors and acknowledgements.


Last updated on May 8, 2002