[Soot-list] [Beginnger] A few questions about cfg and Soot
Olaf Neugebauer
olaf.neugebauer at tu-dortmund.de
Wed Jul 8 08:55:28 EDT 2009
Hello,
i'm quite new to Soot. For bytecode analysis i used ASM but it is more a
manipulation than analyzing framework.
I read the survival guide and a few papers. But i can't figure out how
to construct an inter-procedural control flow graph and traverse through
it.
Here is a simple example
class Adder{
public static void main(...){
Calc calc = new Calc();
int a = 10;
int b = 5;
calc.printadd(a,b);
}
}
class Calc{
private int add(int a, int b){
return a+b;
}
public void printadd(int a, int b){
int res = add(a,b);
System.out.println("res: " + res);
}
}
I want to know, if there is a call for the add(int,int) method which i
can reach from the main method?
Is there a way to construct an inter-procedural cfg, so that i can go
from main to every node i can reach?
In this example a and b are constants, is it possible if i know, there
is a call for add, to calculated the arguments? (maybe a kind of
inter-procedural "constant" propagation + folding)
The general question is: can i reach a method A form entry E -> if there
is a call, which arguments are used? (constant values or every int < 10
is possible ?)
Can i define my own entry method? The programs i want to analyze don't
have a main method (kind of services).
Ok, i hope that someone can help me.
Regards
Olaf
More information about the Soot-list
mailing list