SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Dernier (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 

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