Dava is a decompiler for arbitrary Java bytecode. It can be used to decompile
bytecode produced by Java compilers, compilers for other languages (AspectJ, SML, C)
that generate Java bytecode and tools like Java bytecode obfuscators, instrumentors and
optimizers. Dava detects Java constructs using novel Structure Encapsulation algorithms
(a detailed explanation of this can be found in Jerome's
To handle obfuscated code and to simplify decompiled output for program comprehension
Dava employs three types of structuring algorithms.
- Basic Transformations: These are transformation on the Abstract Syntax Tree (AST) produced
by dava to make the decompiled output adhere to common programming idioms. This includes the use
of shortcut increment statements (i++ instead of i = i+1) and the use of unary boolean operators
(!list.isEmpty() instead of list.isEmpty() == false).
- Simple Pattern Based Transformations: These transformations apply pattern matching to simplify
the control flow of the decompiled code. Patterns implemented include aggregation of
if-else statements using boolean && and || operators, strengthening of loop conditions, creation
for loops, removal of abrupt control flow due to
statements and the simplification of control flow by minimizing labeled blocks.
- Advanced Transformations using flow-analysis information:Pattern matching provides a limitied
scope of transformations to simplify decompiler output. More sophisticated analyses are implemented in Dava
using information obtained through data flow analyses. A structure-based flow analysis framework has been implemented
for Dava which allows for easy implementation of common compiler optimization analyses. Information from such analyses
can then be leveraged to apply more complicated transformations on Dava's AST. Common compiler analyses like
reaching definitions, reaching copies, constant propagation etc have been implemented.
Detailed information on making Dava programmer-friendly is available in Nomair's
To obtain Dava you need to download Soot.
Install the latest Soot release or checkout the latest copy from the Subversion repository.
Use java soot.Main --help for help.
For instructions on how to install soot in eclipse see
Alternately if you are a developer for Dava you might want to use Eclipse along with SVN.