(-For Dummies) Tom Hopkins-Selling for Dummies-IDG Books Worldwide (1995) (1)
Soot for dummies
-
Upload
leandro-lera-romero -
Category
Technology
-
view
170 -
download
3
description
Transcript of Soot for dummies
Soot
I Framework for analysis, transformation and optimization ofJava programs
I Support for both intra-procedural and inter-procedural
I Many built-in analyses and optimizations are available
I Provides intermediate representations of Java codeI Jimple, Shimple, Baf, Grimp
1 / 7
Jimple
Main intermediate representation used in Soot.
Key characteristics:
I Stackless, typed 3-address code
I Simplified set of instructions
I Suitable for analysis and optimization
2 / 7
From Java to Jimple: Example
3 / 7
Processing of Java classes via Soot
1. Parsing Java sources or class files into Jimple IR2. Processing of various IRs in several phases
Figura : Intra-procedural execution flow
4 / 7
Using data-flow framework
A checklist of your obligations:
1. Subclass*FlowAnalysisI ForwardFlowAnalysisI BackwardFlowAnalysisI ForwardBranchedFlowAnalysis
2. Implement abstraction: merge(), copy()
3. Implement flow function: flowThrough()
4. Implement initial values: newInitialFlow() andentryInitialFlow()
5. Implement constructor (it must call doAnalysis())
5 / 7
Using data-flow framework:TrulyLiveVariables
6 / 7
Soot for dummies
Leandro Lera Romero
1Departamento de ComputacionFacultad de Ciencias Exactas y Naturales
Universidad de Buenos Aires
5 de agosto de 2013