SlideShare a Scribd company logo
1 of 21
JAVA DE-COMPLIER
1
13-03-2015
Contents
• Introduction
• Examples of base program
• Steps to de-compile java
• Input of the program
• Algorithm
• Output of the program
2
13-03-2015
Introduction
• A de-compiler is a computer program that performs the reverse operation to that of
a compiler.
• The term de-compiler is most commonly applied to a program which translates
executable programs (the output from a compiler) into source code in a high level
language, when compiled, will produce an executable whose behavior is the same as
the original executable program.
13-03-2015
3
Steps to de-compilation
• Parse Java class file
• Recreate signatures
• Convert byte code to Java executable code
Verify byte code
Perform trivial conversion
Reconstruct control structures
Scope & Type Variables
• Simplify code
13-03-2015
4
Examples of base program
Consider the following example :
Public static int plus(int a, int b)
{
int c = a+b;
return c;
}
13-03-2015
5
• Byte code :
Public static int plus(int, int)
Code :
Stack=2, locals=3, arguments =2;
0 : iload_0 // load int a
1 : iload_1 // load int b
2 :
13-03-2015
6
• If- else :
public int greaterThen(int intOne, int intTwo)
{
if (intOne > intTwo)
{
return 0;
}
else
{
return 1;
}
}
13-03-2015
7
• The above method results in following byte code :
• 0: iload_1
• 1: iload_2
• 2: if_icmple 7
• 5: iconst_0
• 6: ireturn
• 7:iconst_1
• 8: ireturn
13-03-2015
8
• Switch :
public int simpleSwitch(int intOne)
{
switch (intOne)
{
case 0: return 3;
case 1: return 2;
case 4: return 1;
default: return -1;
}
}
13-03-2015
9
• The above code produces following byte code :
0: iload_1
1: tableswitch
{
default: 42
min: 0
max: 4
0: 36
1: 38
2: 42
3: 42
4: 40
}
13-03-2015
10
36: iconst_3
37: ireturn
38: iconst_2
39: ireturn
40: iconst_1
41: ireturn
42: iconst_m1
43: ireturn
13-03-2015
11
• While loop :
public void whileLoop()
{
int i = 0;
while (i < 2)
{
i++;
}
}
13-03-2015
12
• The above code produces following byte code :
0: iconst_0
1: istore_1
2: iload_1
3: iconst_2
4: if_icmpge 13
7: iinc 1, 1
10: goto 2
13: return
13-03-2015
13
• For loop :
public void forLoop()
{
for(int i = 0; i < 2; i++)
{
}
}
The byte code produced by the for loop is similar to while loop.
13-03-2015
14
• Do- while :
public void doWhileLoop()
{
int i = 0;
do
{
i++;
}
while (i < 2);
}
13-03-2015
15
• The above code generates the following byte code :
0: iconst_0
1: istore_1
2: iinc 1, 1
5: iload_1
6: iconst_2
7: if_icmplt 2
10: return
13-03-2015
16
• Try- catch block :
public void tryCatchCatchFinally(int i)
{
Try
{
i = 2;
}
catch (RuntimeException e)
{
i = 3;
}
finally
{
i = 4;
} }
13-03-2015
17
Input of the program
• Input of the program is the byte code generated by Java Virtual Machine(JVM).
Consider the following byte code :
0: iload_0
1: iload_1
2: iadd
3: istore_2
4 : iload_2
5 : return
13-03-2015
18
Algorithm
• Algorithm for Java de-complier.
13-03-2015
19
Output of the program
• The output of the de-complied byte code is java source code .
13-03-2015
20
Thank You
21
13-03-2015

More Related Content

What's hot

Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingGera Paulos
 
Middleware fourth unit
Middleware fourth unitMiddleware fourth unit
Middleware fourth unitselva kumar
 
Intro to elixir metaprogramming
Intro to elixir metaprogrammingIntro to elixir metaprogramming
Intro to elixir metaprogrammingAnton Mishchuk
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++Vaibhav Khanna
 
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Anton Mishchuk
 
Reactive cocoa 101改
Reactive cocoa 101改Reactive cocoa 101改
Reactive cocoa 101改Jeff Lee
 
Pluggable Pipelines
Pluggable PipelinesPluggable Pipelines
Pluggable Pipelinessetitesuk
 
Whats new in .NET for 2019
Whats new in .NET for 2019Whats new in .NET for 2019
Whats new in .NET for 2019Rory Preddy
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilogNallapati Anindra
 
Inline functions & macros
Inline functions & macrosInline functions & macros
Inline functions & macrosAnand Kumar
 
Massif - the love child of Matlab Simulink and Eclipse
Massif - the love child of Matlab Simulink and EclipseMassif - the love child of Matlab Simulink and Eclipse
Massif - the love child of Matlab Simulink and EclipseÁkos Horváth
 
Inline function in C++
Inline function in C++Inline function in C++
Inline function in C++Jenish Patel
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manualSami Said
 

What's hot (20)

Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
 
Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programming
 
Middleware fourth unit
Middleware fourth unitMiddleware fourth unit
Middleware fourth unit
 
Intro to elixir metaprogramming
Intro to elixir metaprogrammingIntro to elixir metaprogramming
Intro to elixir metaprogramming
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
 
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.
 
Bitstuffing
BitstuffingBitstuffing
Bitstuffing
 
Reactive cocoa 101改
Reactive cocoa 101改Reactive cocoa 101改
Reactive cocoa 101改
 
Pluggable Pipelines
Pluggable PipelinesPluggable Pipelines
Pluggable Pipelines
 
Whats new in .NET for 2019
Whats new in .NET for 2019Whats new in .NET for 2019
Whats new in .NET for 2019
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilog
 
Inline functions & macros
Inline functions & macrosInline functions & macros
Inline functions & macros
 
Python component in mule
Python component in mulePython component in mule
Python component in mule
 
Massif - the love child of Matlab Simulink and Eclipse
Massif - the love child of Matlab Simulink and EclipseMassif - the love child of Matlab Simulink and Eclipse
Massif - the love child of Matlab Simulink and Eclipse
 
Yacc
YaccYacc
Yacc
 
05 coms 525 tcpip - icmp
05   coms 525 tcpip - icmp05   coms 525 tcpip - icmp
05 coms 525 tcpip - icmp
 
Inline function in C++
Inline function in C++Inline function in C++
Inline function in C++
 
C# p3
C# p3C# p3
C# p3
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
 
Intake 37 ef2
Intake 37 ef2Intake 37 ef2
Intake 37 ef2
 

Viewers also liked

Strategic R&D collaboration to enable p..
Strategic R&D collaboration to enable p..Strategic R&D collaboration to enable p..
Strategic R&D collaboration to enable p..Guan Wang
 
WTCEME2017 Event Brochure_Updated
WTCEME2017 Event Brochure_UpdatedWTCEME2017 Event Brochure_Updated
WTCEME2017 Event Brochure_UpdatedNadeem Mohamed
 
Short film analysis 'The Moped Diaries' (NOT FINISHED)
Short film analysis 'The Moped Diaries' (NOT FINISHED)Short film analysis 'The Moped Diaries' (NOT FINISHED)
Short film analysis 'The Moped Diaries' (NOT FINISHED)ellieschool
 
Group 6 video presentation 5
Group 6 video presentation 5Group 6 video presentation 5
Group 6 video presentation 5Raysza Cardoze
 
Jorge monsalve actividad1 2_mapac
Jorge monsalve actividad1 2_mapacJorge monsalve actividad1 2_mapac
Jorge monsalve actividad1 2_mapacTheteacher Jam
 
Curriculum Vitae-Urs Flueckiger OM152
Curriculum Vitae-Urs Flueckiger OM152Curriculum Vitae-Urs Flueckiger OM152
Curriculum Vitae-Urs Flueckiger OM152Urs Flueckiger
 
Homemade flashlight2
Homemade flashlight2Homemade flashlight2
Homemade flashlight2MrsT56
 
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudie
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudieBiomekanisk testning af kørestolsrugbyatleter, Et pilotstudie
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudieWilliam Bond
 
Netwalk - Un piccolo ecommerce contro i colossi della rete
Netwalk - Un piccolo ecommerce contro i colossi della reteNetwalk - Un piccolo ecommerce contro i colossi della rete
Netwalk - Un piccolo ecommerce contro i colossi della reteFabio Fogolin
 
Kejang demam-neurology-2012
Kejang demam-neurology-2012Kejang demam-neurology-2012
Kejang demam-neurology-2012Agung Zukhruf
 
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)Tom Pheby
 
NBTC Exhitibition Stands
NBTC Exhitibition StandsNBTC Exhitibition Stands
NBTC Exhitibition StandsNadeem Mohamed
 
Baby rats2
Baby rats2Baby rats2
Baby rats2MrsT56
 

Viewers also liked (20)

Anusha
AnushaAnusha
Anusha
 
c v ziouane
c v  ziouanec v  ziouane
c v ziouane
 
Strategic R&D collaboration to enable p..
Strategic R&D collaboration to enable p..Strategic R&D collaboration to enable p..
Strategic R&D collaboration to enable p..
 
WTCEME2017 Event Brochure_Updated
WTCEME2017 Event Brochure_UpdatedWTCEME2017 Event Brochure_Updated
WTCEME2017 Event Brochure_Updated
 
Short film analysis 'The Moped Diaries' (NOT FINISHED)
Short film analysis 'The Moped Diaries' (NOT FINISHED)Short film analysis 'The Moped Diaries' (NOT FINISHED)
Short film analysis 'The Moped Diaries' (NOT FINISHED)
 
Group 6 video presentation 5
Group 6 video presentation 5Group 6 video presentation 5
Group 6 video presentation 5
 
Jorge monsalve actividad1 2_mapac
Jorge monsalve actividad1 2_mapacJorge monsalve actividad1 2_mapac
Jorge monsalve actividad1 2_mapac
 
Curriculum Vitae-Urs Flueckiger OM152
Curriculum Vitae-Urs Flueckiger OM152Curriculum Vitae-Urs Flueckiger OM152
Curriculum Vitae-Urs Flueckiger OM152
 
인터렉1
인터렉1인터렉1
인터렉1
 
Homemade flashlight2
Homemade flashlight2Homemade flashlight2
Homemade flashlight2
 
Guide to tummy tuck surgery
Guide to tummy tuck surgeryGuide to tummy tuck surgery
Guide to tummy tuck surgery
 
DOS AmberAdam
DOS AmberAdamDOS AmberAdam
DOS AmberAdam
 
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudie
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudieBiomekanisk testning af kørestolsrugbyatleter, Et pilotstudie
Biomekanisk testning af kørestolsrugbyatleter, Et pilotstudie
 
Netwalk - Un piccolo ecommerce contro i colossi della rete
Netwalk - Un piccolo ecommerce contro i colossi della reteNetwalk - Un piccolo ecommerce contro i colossi della rete
Netwalk - Un piccolo ecommerce contro i colossi della rete
 
Kejang demam-neurology-2012
Kejang demam-neurology-2012Kejang demam-neurology-2012
Kejang demam-neurology-2012
 
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)
Creative Industries Marketing Plan Presentation - S. Jay (University Assignment)
 
NBTC Exhitibition Stands
NBTC Exhitibition StandsNBTC Exhitibition Stands
NBTC Exhitibition Stands
 
cpd ch 9
cpd ch 9cpd ch 9
cpd ch 9
 
Baby rats2
Baby rats2Baby rats2
Baby rats2
 
SUMMARY – RECENT EXPERIENCES 2016 q1
SUMMARY – RECENT EXPERIENCES 2016 q1SUMMARY – RECENT EXPERIENCES 2016 q1
SUMMARY – RECENT EXPERIENCES 2016 q1
 

Similar to Java Decompiler

Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design LogsAk
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Windows Developer
 
No liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failureNo liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failureRogue Wave Software
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on androidKoan-Sin Tan
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and importiamluqman0403
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler designKuppusamy P
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_featuresNirav Desai
 
Hot Code Replacement - Alexei Sholik
Hot Code Replacement - Alexei SholikHot Code Replacement - Alexei Sholik
Hot Code Replacement - Alexei SholikElixir Club
 
Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015Raimon Ràfols
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
embeddedc-lecture1-160404055102.pptx
embeddedc-lecture1-160404055102.pptxembeddedc-lecture1-160404055102.pptx
embeddedc-lecture1-160404055102.pptxsangeetaSS
 
Improving Android Performance at Mobiconf 2014
Improving Android Performance at Mobiconf 2014Improving Android Performance at Mobiconf 2014
Improving Android Performance at Mobiconf 2014Raimon Ràfols
 

Similar to Java Decompiler (20)

Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design
 
ESL report
ESL reportESL report
ESL report
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
 
No liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failureNo liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failure
 
Introduction to C ++.pptx
Introduction to C ++.pptxIntroduction to C ++.pptx
Introduction to C ++.pptx
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
 
CS4961-L9.ppt
CS4961-L9.pptCS4961-L9.ppt
CS4961-L9.ppt
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and import
 
Compiler tricks
Compiler tricksCompiler tricks
Compiler tricks
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_features
 
GCF
GCFGCF
GCF
 
Hot Code Replacement - Alexei Sholik
Hot Code Replacement - Alexei SholikHot Code Replacement - Alexei Sholik
Hot Code Replacement - Alexei Sholik
 
Embedded _c_
Embedded  _c_Embedded  _c_
Embedded _c_
 
Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
embedded C.pptx
embedded C.pptxembedded C.pptx
embedded C.pptx
 
embeddedc-lecture1-160404055102.pptx
embeddedc-lecture1-160404055102.pptxembeddedc-lecture1-160404055102.pptx
embeddedc-lecture1-160404055102.pptx
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
 
Improving Android Performance at Mobiconf 2014
Improving Android Performance at Mobiconf 2014Improving Android Performance at Mobiconf 2014
Improving Android Performance at Mobiconf 2014
 

Recently uploaded

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Recently uploaded (20)

Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 

Java Decompiler

  • 2. Contents • Introduction • Examples of base program • Steps to de-compile java • Input of the program • Algorithm • Output of the program 2 13-03-2015
  • 3. Introduction • A de-compiler is a computer program that performs the reverse operation to that of a compiler. • The term de-compiler is most commonly applied to a program which translates executable programs (the output from a compiler) into source code in a high level language, when compiled, will produce an executable whose behavior is the same as the original executable program. 13-03-2015 3
  • 4. Steps to de-compilation • Parse Java class file • Recreate signatures • Convert byte code to Java executable code Verify byte code Perform trivial conversion Reconstruct control structures Scope & Type Variables • Simplify code 13-03-2015 4
  • 5. Examples of base program Consider the following example : Public static int plus(int a, int b) { int c = a+b; return c; } 13-03-2015 5
  • 6. • Byte code : Public static int plus(int, int) Code : Stack=2, locals=3, arguments =2; 0 : iload_0 // load int a 1 : iload_1 // load int b 2 : 13-03-2015 6
  • 7. • If- else : public int greaterThen(int intOne, int intTwo) { if (intOne > intTwo) { return 0; } else { return 1; } } 13-03-2015 7
  • 8. • The above method results in following byte code : • 0: iload_1 • 1: iload_2 • 2: if_icmple 7 • 5: iconst_0 • 6: ireturn • 7:iconst_1 • 8: ireturn 13-03-2015 8
  • 9. • Switch : public int simpleSwitch(int intOne) { switch (intOne) { case 0: return 3; case 1: return 2; case 4: return 1; default: return -1; } } 13-03-2015 9
  • 10. • The above code produces following byte code : 0: iload_1 1: tableswitch { default: 42 min: 0 max: 4 0: 36 1: 38 2: 42 3: 42 4: 40 } 13-03-2015 10
  • 11. 36: iconst_3 37: ireturn 38: iconst_2 39: ireturn 40: iconst_1 41: ireturn 42: iconst_m1 43: ireturn 13-03-2015 11
  • 12. • While loop : public void whileLoop() { int i = 0; while (i < 2) { i++; } } 13-03-2015 12
  • 13. • The above code produces following byte code : 0: iconst_0 1: istore_1 2: iload_1 3: iconst_2 4: if_icmpge 13 7: iinc 1, 1 10: goto 2 13: return 13-03-2015 13
  • 14. • For loop : public void forLoop() { for(int i = 0; i < 2; i++) { } } The byte code produced by the for loop is similar to while loop. 13-03-2015 14
  • 15. • Do- while : public void doWhileLoop() { int i = 0; do { i++; } while (i < 2); } 13-03-2015 15
  • 16. • The above code generates the following byte code : 0: iconst_0 1: istore_1 2: iinc 1, 1 5: iload_1 6: iconst_2 7: if_icmplt 2 10: return 13-03-2015 16
  • 17. • Try- catch block : public void tryCatchCatchFinally(int i) { Try { i = 2; } catch (RuntimeException e) { i = 3; } finally { i = 4; } } 13-03-2015 17
  • 18. Input of the program • Input of the program is the byte code generated by Java Virtual Machine(JVM). Consider the following byte code : 0: iload_0 1: iload_1 2: iadd 3: istore_2 4 : iload_2 5 : return 13-03-2015 18
  • 19. Algorithm • Algorithm for Java de-complier. 13-03-2015 19
  • 20. Output of the program • The output of the de-complied byte code is java source code . 13-03-2015 20