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

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Jun 9 02:06:00 EDT 2010


Dear Jochen.

Zou should look for literature on "speculative multi-threading", which
several people have tried before and sounds very similar to what you
are doing. Also look into "purity analysis", which can decide whether
or not a method makes changes to the heap. (Soot has some support for
that, see http://www.sable.mcgill.ca/publications/papers/#paste2007)
Then there is also the thread-local objects analysis by Halpert et al.
(http://www.sable.mcgill.ca/publications/papers/#pact2007) which
computes read/write sets for methods. In general I recommend to first
read up on some related work and then define exactly what you want to
do before you get started. A statement like "create a new thread for
each method call if it is safe to do so" is not going to get you very
far because you will not be able to decide exactly all cases where it
is safe to do so - you will need an approximation.

Hope that helps,
Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 8 June 2010 18:51, Jochen Huck <jochen.huck at student.kit.edu> wrote:
> 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
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


More information about the Soot-list mailing list