Dava Home

Overview

Documentation

Publications

Download

Future Work and Available Projects

Sable Home

Future Work and Available Projects

Identifier Naming in Dava top

Dava currently performs some very basic heuristic-based naming of local variables. An interesting topic is how the decompiler could invent good identifier names. Although unobfuscated bytecode contains some names, the names of local identifiers are often lost, and further, obfuscators tend to changes all programmer identifiers to those which are difficult to understand.




Restructuring and Refactoring Decompiled Output top

Dava performs AST rewrites to simplify the decompiled output for program comprehension. These restructurings use pattern matching on the Abstract Syntax Tree representation of the decompiled code with or without the use of additional information available using flow analyses. A potential project would be to look at Dava's output and implement more restructurings inorder to make the output easier to read. Automatic refactoring support could also be added.




Generalizing Synchronized block detection top

Java constructs are detected during the Structure Encapsulation Tree (SET) generation stage of Dava. Since Dava works on arbitrary bytecode the detection algorithms are general in nature working on the control flow graph representation of the code. It has been noted that the algorithm used in the detection of the synchronized construct is not that general. More specifically, the algorithm counts on the presence of a pattern in the control flow graph. This results in Dava being unable to detect Synchronized blocks when the pattern does not match.

Note that this will not occur for normal javac generated bytecode since that is handled well by the detection algorithm.

The problem was first detected when decompiling AspectJ code produced by the abc compiler and was fixed by Nomair by specifying specific pattern based detection schemes in the SynchronizedBlockFinder stage of the SET creation. This was intended to be a temporary fix and the aim is to have a more general synchronized block detection algorithm.

The task involves desigining an algorithm working ONLY with the control flow graph to detect Syncrhonized blocks without any assumption of specific statement ordering and then implementing it in Dava.