Java 6 Decompiler - PowerPoint PPT Presentation

About This Presentation
Title:

Java 6 Decompiler

Description:

Signature recreation: Valid for any method, field, class. Enums, ... Some simple types convertible. Some scoping and typing of variables. Minimal verification ... – PowerPoint PPT presentation

Number of Views:407
Avg rating:3.0/5.0
Slides: 8
Provided by: joshuac2
Learn more at: https://www.tjhsst.edu
Category:

less

Transcript and Presenter's Notes

Title: Java 6 Decompiler


1
  • Java 6 Decompiler
  • Joshua Cranmer

2
Steps of Decompilation
  • Parse Java class file
  • Recreate signatures
  • Convert bytecode to Java executable code
  • Verify bytecode
  • Perform trivial conversion
  • Reconstruct control structures
  • Scope Type Variables
  • Simplify code

3
Last Time
  • Class parsing
  • All required information recovered
  • Java 5 attributes recovered signature, varargs,
    enums
  • Debug attributes recovered variable names
  • Signature recreation
  • Valid for any method, field, class
  • Enums, annotations partially destroyed
  • No inner classes

4
Now
  • Class parsing
  • Annotations fully recoverable
  • Signature recreation
  • All information relating to annotations updated
  • Bytecode conversion
  • Some simple types convertible
  • Some scoping and typing of variables
  • Minimal verification

5
Bytecode conversion
  • Successive iterations of transforms
  • Many can be condensed at this point
  • Two main runs StackAnalyzer assorted
  • StackAnalyzer verifies bytecode, performs SSA
    analysis, asserts certain invariants
  • Assorted transforms provides trivial
    decompilation
  • Trivial
  • aload_0 invokesuper ltinitgt()V return becomes
  • super() return

6
Variable Scoping and Typing
  • MOST DIFFICULT PART
  • Creation of SSA form
  • Each variable is only assigned to once
  • Maximal variable assumption
  • SSA unification ongoing research
  • Type is easy iff variables are not over-scoped

7
Future
  • Cleanup of transformation sequences
  • Start converting control structures
  • Handle variables better
Write a Comment
User Comments (0)
About PowerShow.com