[Soot-list] How can I retrieve the read/write access sets of a statement?

Jochen Huck jochen.huck at student.kit.edu
Tue Jun 8 12:51:24 EDT 2010


Hi,

I am new to soot and I'd like to know whether I can use soot to retrieve 
the following information:

For a piece of source code like

         1    int[][] m1 = getMatrix();
         2    int[][] m2 = getMatrix();
         3    int[][] m3 = mult(m1, m1);
         4    int[][] m4 = mult(m2, m2);
         5    int[][] result = mult(m3, m4);
         6    print(result);

I'd like to create a new thread for each method call if it is safe to do 
so. The current execution shouldn't block before the result is needed. 
For line 3 I have to know: when will m3 be read the next time, can m1 
change before m3 is read. Which variables could mult(.,.) change before 
it returns?
I am aware of the fact that I will need a Points-to-Analysis for good 
results but at first it would be sufficient to know that a method 
doesn't write to any variables at all. I think that I will need a 
ForwardFlowAnalysis to retrieve the read/write information as well.

I am glad for every hint (is the analysis that I have in mind possible, 
are parts of the analysis available in soot yet, which soot classes are 
relevant, ...). Thanks in advance,

Jochen


More information about the Soot-list mailing list