[Soot-list] Clinits encountered in an inter-procedural analysis
Ahmer Ahmedani
aahmed12 at cs.mcgill.ca
Mon Jul 17 15:47:57 EDT 2006
Hi,
I am writing a context-sensitive inter-procedural analysis which begins at
the main method and then follows the called method edges.
In the example below, the field j of class Two is accessed for the first
time at the statement myInt2 = Two.j
The analysis, even though it follows the edges in the call graph, does not
go into the clinit method for class Two. I am not sure why since class Two
is touched for the first time at the mentioned statement.
Can you think of a plausible reason.
Regards,
Ahmer
public class FirstTest{
@High public static int x = 100;
public static void main (String[] args){
int myInt, myInt2;
myInt2 = Two.j;
Two obj1, obj2;
obj1 = new Two();
obj2 = new Two();
obj1.i = x;
obj2.i = 4;
myInt = obj2.i;
}
}
class Two{
public int i;
public static int j = 50;
public Two(){
}
}
More information about the Soot-list
mailing list