Return to search

Programmer-friendly decompiled Java

Java decompilers convert Java class files to Java source. Common Java decompilers are javac-specific decompilers since they target bytecode produced from a particular javac compiler. We present work carried out on Dava, a tool-independent decompiler that decompiles bytecode produced from any compiler. A known deficiency of tool-independent decompilers is the generation of complicated decompiled Java source which does not resemble the original source as closely as output produced by javac-specific decompilers. This thesis tackles this short-coming, for Dava, by introducing a new back-end consisting of simplifying transformations. / The work presented can be broken into three major categories: transformations using tree traversals and pattern matching to simplify the control flow, the creation of a flow analysis framework for an Abstract Syntax Tree (AST) representation of Java source code and the implementation of flow analyses with their use in complicated transformations. / The pattern matching transformations rewrite the ASTs to semantically-equivalent ASTs that correspond to code that is easier for programmers to understand. The targeted Java constructs include If and If-Else aggregation, for-loop creation and the removal of abrupt control flow. Pattern matching using tree traversals has its limitations. Thus, we introduce a new structure-based data flow analysis framework that can be used to gather information required by more complex transformations. Popular compiler analyses e.g., reaching definitions, constant propagation etc. were implemented using the framework. Information from these analyses is then leveraged to perform more advanced AST transformations. / We performed experiments comparing different decompiler outputs for different sources of bytecode. The results from these experiments indicate that the new Dava back-end considerably improves code comprehensibility and readability.

Identiferoai:union.ndltd.org:LACETR/oai:collectionscanada.gc.ca:QMM.101644
Date January 2006
CreatorsNaeem, Nomair A.
PublisherMcGill University
Source SetsLibrary and Archives Canada ETDs Repository / Centre d'archives des thèses électroniques de Bibliothèque et Archives Canada
LanguageEnglish
Detected LanguageEnglish
TypeElectronic Thesis or Dissertation
Formatapplication/pdf
CoverageMaster of Science (School of Computer Science.)
Rights© Nomair A. Naeem, 2006
Relationalephsysno: 002593872, proquestno: AAIMR32760, Theses scanned by UMI/ProQuest.

Page generated in 0.0015 seconds