Questions tagged [soot]

Soot is an open source Java optimization framework.

Soot is an open source Java optimization framework that provides different intermediate representations for Java bytecode. Besides optimization, Soot can be used for static analyses and bytecode manipulation.

GitHub home page @ github.com
Legacy home page @ sable.mcgill.ca

131 questions
2
votes
0 answers

How to use soot to modify a byte code file, so that I can print some things?

I have a target.java: static void main(){ int a = 0; a++; a++; return 0; } I want to use soot to insert a command so that target.java can output the following sentence "a is = 2" (I do not need the same code format as…
sflee
  • 1,659
  • 5
  • 32
  • 63
2
votes
1 answer

Analyzing Android application with Soot

I am writing some code that analyze android source code, basically to trace the definitions of local variables, and I want to use Soot in my code to extract some information from Android source code and build a high level call graph of the classes ,…
Jana
  • 63
  • 8
2
votes
2 answers

Pros/Cons of Static and Dynamic Instrumentation

There are many static and dynamic instrumentation tools. Soot is a static instrumentation tool for Java bytecode. Pin and Valgrind are dynamic instrumentation tools for binaries. What are pros and cons for static and dynamic instrumentation tools? I…
Sangmin
  • 415
  • 1
  • 6
  • 15
2
votes
1 answer

Soot - How to prevent loadClassAndSupport to create an empty SootClass?

Using the soot framework (v.2.5.0) I'm trying to load a certain class: SootClass clazz = Scene.v().loadClassAndSupport("example.MyClass"); Before calling Scene#loadClassAndSupport the class example.MyClass is NOT within the scene - which is…
Marc-Christian Schulze
  • 3,154
  • 3
  • 35
  • 45
2
votes
3 answers

How to easily create Java bytecode dependent regression tests?

I have identified a bug in my application (which processes bytecode using soot) that only arises on specific bytecode instructions. I want to create a test for that specific case. However, I'm not able to reliably write test code, that will compile…
phant0m
  • 16,595
  • 5
  • 50
  • 82
2
votes
1 answer

Run functions using Soot

I am trying to use soot to measure execution time for every function in a particular class. I have tried to read all tutorials of Soot Framework by Eric Bodden. What I have come up till now is this, package test; import java.util.Map; import…
Akshay Patil
  • 611
  • 1
  • 10
  • 23
2
votes
1 answer

How can I get to know variables defined in the methods of a jimple file correspond to what variables in a java class file?

Soot transforms a java class file into a jimple file with local variables renamed. Now I want to know the scheme based on which Soot does that.
user1520332
1
vote
1 answer

NoClassDefFoundError exception when trying to use SOOT

I'm trying to use SOOT to generate call graphs. However when I pass it some class to be analyzed, the exception NoClassDefFoundError is being thrown. I'm using the following two tutorials to be able to execute some of the…
ict1991
  • 2,060
  • 5
  • 26
  • 34
1
vote
1 answer

Points-to analysis - A definition

I'm looking to perform some dependence analysis using a call-graph that I will build using the Soot framework. I read in a guide that using 'points-to' analysis can improve the precision of a call graph. What exactly is 'points-to' analysis and how…
Joeblackdev
  • 7,217
  • 24
  • 69
  • 106
1
vote
2 answers

What is the difference between wala and soot?

I need to chose a framework for following tasks in Java: extract control flow graph interprocedural and intraprocedural analysis dataflow analysis PDG different souce code analysis tasks (like method body extraction, test code extraction) Which…
Exploring
  • 2,493
  • 11
  • 56
  • 97
1
vote
0 answers

Use Soot to analyze a Java program

I am trying to use Soot to perform data flow analysis on a java file which is called Example.java. Here is my Example.java file, my goal is to know which saySomething method animal.saySomething() will call. Here is the code for Example.java I am…
1
vote
1 answer

How can I get a precise callgraph for a web Application using spring FrameWork by soot SPARK?

I want to get a precise callgraph (using soot SPARK) when analysising a web Application using spring FrameWork, but I have one big problem to solve: Spring use DI (Dependency Injection) to manage beans , which means we don't need to create an…
duan5858
  • 11
  • 1
1
vote
3 answers

How to create and add a Java class in an APK using Soot?

I want to instrument an APK to count the number of executions of its callback methods (similar to this SO post). To do so, I want to create a static class from scratch (similar to this link) which keeps the counting numbers. Then add this class to…
noidsirius
  • 409
  • 2
  • 12
1
vote
1 answer

Missing a local variable in Soot's Jimple representation

It seems that there is some internal optimization in soot to reuse local variables while transforming java byte code to Jimple. Therefore, in the Jimple representation, a local variable may be replaced by another local variable. Now I want to…
liushan CHEN
  • 801
  • 8
  • 11
1
vote
1 answer

How to implement a backward dataflow analysis pass in LLVM? Do we need to implement the worklist algorithm by ourselves?

I want to do backward dataflow analysis using LLVM. Currently, I just create a new Pass class: class BwdfPass: public llvm::ModulePass{} Then, implement the runOnModule method and runOnFunction method. However, I just saw some examples like: void…
Ya Xiao
  • 861
  • 8
  • 16
1
2
3
8 9