[2024]Digital Global Overview Report 2024 Meltwater.pdf
Soot for dummies
1.
2. Soot
Framework for analysis, transformation and optimization of
Java programs
Support for both intra-procedural and inter-procedural
Many built-in analyses and optimizations are available
Provides intermediate representations of Java code
Jimple, Shimple, Baf, Grimp
1 / 7
3. Jimple
Main intermediate representation used in Soot.
Key characteristics:
Stackless, typed 3-address code
Simplified set of instructions
Suitable for analysis and optimization
2 / 7
5. Processing of Java classes via Soot
1. Parsing Java sources or class files into Jimple IR
2. Processing of various IRs in several phases
Figura : Intra-procedural execution flow
4 / 7
6. Using data-flow framework
A checklist of your obligations:
1. Subclass*FlowAnalysis
ForwardFlowAnalysis
BackwardFlowAnalysis
ForwardBranchedFlowAnalysis
2. Implement abstraction: merge(), copy()
3. Implement flow function: flowThrough()
4. Implement initial values: newInitialFlow() and
entryInitialFlow()
5. Implement constructor (it must call doAnalysis())
5 / 7
8. Soot for dummies
Leandro Lera Romero
1Departamento de Computaci´on
Facultad de Ciencias Exactas y Naturales
Universidad de Buenos Aires
5 de agosto de 2013