Skip navigation.
Home
PhD student, teacher, programmer

A New Decompiler

I am currently implementing my own decompiler to help me fully understand the problems decompilers encounter and discover ways to improve decompilers. The decompiler is based on the ASM Java bytecode engineering library.

At first, I wish to decompile the 10 test programs from Godfrey Nolan's Decompiling JavaDecompiling Java contains a lot of information about Java bytecode, class files, obfuscation, security and decompilation. It includes two chapters (about half the book) detailing the design and implementation of a simple decompiler. This decompiler is built using the CUP parser generator for Java and the implementation chapter details how to implement a decompiler to decompile the 10 test programs.

I'm taking a different approach by taking advantage of a bytecode framework which provides an easy way to manipulate and analyse Java class files through a visitor based API.

The ten programs are attached to this post.

AttachmentSize
HelloWorld.java111 bytes
Basics.java210 bytes
MathOps.java242 bytes
DoWhile.java272 bytes
IfTest.java169 bytes
Recurses.java247 bytes
WhileLoop.java217 bytes
ForLoop.java230 bytes
ArrayTest.java181 bytes
ArrayInit.java344 bytes