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.

124 questions
7
votes
1 answer

Soot: Reload class after source-file changed

I'm writing an IntelliJ-Plugin to analyse java-program code. Thus i use Soot to write static analyses. Every time a user triggers the analyse-action of my plugin, I take the current VirtualFile of the current context like this: …
osanger
  • 2,057
  • 3
  • 24
  • 28
7
votes
1 answer

What does .v() mean in soot library?

I work with soot library. In different examples I see .v() method, for example Jimple.v(), scene.v(), ... . Now I want ask what does it mean? Specially in Jimple.v().
jody abbot
  • 193
  • 1
  • 14
4
votes
2 answers

AOT compilation or native code compilation of Scala?

My scala application needs to perform simple operations over large arrays of integers & doubles, and performance is a bottleneck. I've struggled to put my finger on exactly when certain optimizations kick in (e.g. escape analysis) although I can…
Josh Marcus
  • 1,749
  • 17
  • 27
4
votes
0 answers

Recommendations for a binary expression tree library for boolean expressions in Java

I'm doing some very simple program analyses/transformations in Java using Soot, and I find myself needing to do some simple combinations of boolean expressions. So for example, during my analysis, I'll have an expression like (a < 25) && (b >= 10)…
Sean
  • 554
  • 1
  • 3
  • 11
3
votes
4 answers

How to create a simple static call graph in Java?

I would like to generate a simple call graph in order to be able to analyze the flow of execution in methods in java. So for example, if in the code I'm able to go from method X to method Y in a number of method calls, then I would like to generate…
ict1991
  • 1,900
  • 4
  • 24
  • 31
3
votes
1 answer

Soot Java bytecode framework: How to compile a single class file to Jimple/Shimple

I'm trying to figure out how to use Soot in an existing project (a metacircular interpreter). Specifically, I want to use Soot to convert java bytecode into a convenient 3-address code (either Jimple or Shimple) that I can interpret. I may want to…
Li Haoyi
  • 13,576
  • 15
  • 69
  • 130
3
votes
1 answer

Is it Possible to Use the Soot Analyses Without Calling soot.Main.main(...)?

I want to use Soot to do a static analysis of Java programs, including for example the control flow graph. The various tutorials say that the "standard way" to use Soot is to create a main method where one adds custom transforms to the Soot pipeline…
rolve
  • 9,021
  • 4
  • 50
  • 70
2
votes
0 answers

How to retain original variable names in jimple (soot)?

I have the below Java program public class tester3 { int bar1(int x) { int a=10; System.out.println(x+" "+a); return 0; } } I have a driver code as below Options.v().setPhaseOption("jb",…
srccode
  • 635
  • 3
  • 14
2
votes
1 answer

soot, identity stmts and the control flow during exception handling

I'm trying to write a try-catch block in soot. Let's decompile public class A { public static void main(String[] args) { try{ String a = args[9999]; }catch(Throwable t){ t.printStackTrace(); } …
User1291
  • 6,231
  • 5
  • 34
  • 75
2
votes
1 answer

Receiving couldn't find class error even Setting Soot library classpath

I use soot for instrumenting a java program. I know for adding invocation to specific class in soot, we must set "Soot class-path" to the directory contains that class, .class file. So I do this in main method of main class. I bring the snippet of…
JachobTailor
  • 77
  • 10
2
votes
2 answers

Call graphs in Soot

How do I use SOOT to build at Call graph? Or are there any better programs for this? I have been sent around the same five pages looking for answers and I can't find what I am looking for. There are also a problem with the plugin version to Eclipse.…
Mattias
  • 21
  • 1
  • 4
2
votes
1 answer

Inserting read and write barriers at field accesses using SOOT in Java code

Sorry if it's a basic question but even after searching a lot, I'm not able to figure this out. I'm using SOOT to instrument my code. I'm able to check whether my statement accesses a field using stmt.containsFieldRef() but I want to differentiate…
Racing
  • 66
  • 1
  • 11
2
votes
1 answer

Using Soot programmatically to analyze .java source files

I have just started playing around with Soot in order to analyze .java files programmatically. From what I've read, Soot seems to be a very powerful tool for source code analysis but most of the material I found online talks about using it as a…
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,485
  • 4
  • 26
  • 50
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
  • 7
1
2 3
8 9