Back to results

McGill University

Programmer-friendly decompiled Java

Abstract

dc:description.abstract

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.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Grantor dc:publisher
McGill University
Year dc:date.issued
2006

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Naeem, Nomair A.

Subjects

dc:subject × 2

Rights

dc:rights
Statement dc:rights
  • © Nomair A. Naeem, 2006
  • All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
Language dc:language.iso
en

Identifiers

dc:identifier.*
OCLC
892079207
Dc Identifier Other
hyrax:6w924g88x

Chain of custody

source
Harvested from
McGill University
Base URL
mcgill.scholaris.ca/server/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Naeem, Nomair A.. Programmer-friendly decompiled Java. McGill University, 2006. https://doi.org/10.82308/34003