jppa - a Java Pointer and Purity Analysis tool
Summary
Short Description
jppa is a research prototype implementation of the
pointer analysis for Java bytecode programs developed by Alex Salcianu as part of his
PhD thesis at MIT. Descriptions of preliminary versions of the
analysis can be found in Alex Salcianu's SM
Thesis (MIT'01) and in a later VMCAI'05
publication focusing on the purity analysis.
NOTE: Please notice the following words in the above
description:
- research prototype: this is not
production-quality code. While the author (Alex Salcianu) made a lot
of efforts to deliver a good tool (at the cost of delaying the
completion of his PhD for a long, long time), there is no guarantee
that this prototype will work on your benchmarks. Actually, due to
limitations in the underlying compiler infrastructure (Flex, from
MIT), it is very likely that this implementation will choke on your
benchmarks and that you will have to do a lot of work to fix the
problems you encounter. You have been warned!
- Java bytecode: the tool parses Java bytecode (i.e.,
.class
format files), not Java sources.
- program: currently, the tool analyzes whole
programs (i.e., it works under a closed world assumption). A program
is defined as all code (user and library) that is transitively
reachable from the main method. If you need to analyze a library
(without knowing its clients), then
jppa
cannot help you
(at least not now).
The currently implemented clients of the pointer analysis include
- Stack-allocation of captured objects. This program optimization
reduces the GC overhead. It is pretty effective because of the large
number of local objects in Java programs (
StringBuffer
s,
Iterator
s, etc.). Most importantly, it is a very radical
test for the correctness of the pointer analysis: if an escaping
object is mistakenly allocated on the stack, the executable segfaults
very badly, with a very high probability.
- Purity analysis. This analysis detects pure
methods à la JML: a method is
pure iff it does not mutate any objects that already exist when the
method is invoked; a pure method is free to mutate newly allocated
objects. We expect the purity analysis to be the most useful part of
jppa; hence, the main release of the
jppa project is a purity kit.
Several other clients (e.g., synchronization removal) were present in
earlier implementations of the pointer analysis. Their code has not
been maintained over the years and they are not included in
jppa.
A little bit of history:The pointer and purity analysis was
implemented in the context of the Flex compiler infrastructure from
MIT (retrospectively, not the best choice, but it is too late to
change anything now). In February 2006, Alex Salcianu decided to
separate from the MIT Flex CVS repository and move to SourceForge, in
the hope of making collaboration with other people easier.
jppa is released under the terms of the GNU GPL Licence, except for those parts that
explicitly state a different licence.
Currently, Flex fully supports only applications compiled against the
GNU Classpath
0.08 implementation of the Java standard library. We implemented
a few additional classes to make sure that Flex can parse itself.
What this means is that if your application invokes some standard
library method that is not implemented in GNU Classpath 0.08 or in our
extensions, then we cannot analyze it ...
Currently, we were able to able to perform stack-allocation and purity
analysis on all Java SPECjvm98 and JOlden
benchmarks, as well as on Java Lex and Java CUP. We were also able to
perform the purity analysis on the analyzer itself, as well as on the
Eclipse compiler and on the Daikon tool. We are not
able to generate native executables for these larger tools, and hence,
we were unable to perform stack allocation on them.
To get the jppa sources, you have two choices:
- Anonymous (read-only) CVS access to the sources
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jppa co Harpoon
Press Enter if prompted for a password.
- Developer CVS access:
First, you need to create an account on SourceForge and contact the project admin to
obtain the right to edit the source. Next, you can start with the following
commands:
export CVS_RSH=ssh
cvs -z3 -d:ext:developername@cvs.sourceforge.net:/cvsroot/jppa co Harpoon
After you get the sources, go into the Harpoon
directory
and read the README
file.
Mailing List(s)
- jppa developers:
jppa-devel@lists.sourceforge.net
Archives/Subscribe/Unsubscribe
- Currently, no separate mailing lists for users. We assume that
each user is a bit of a developer.
Hosted by
Copyright (c) 2006 - Alexandru Salcianu