[Soot-list] First Use Point of an invocation

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Tue Jun 15 05:04:44 EDT 2010


Hi Amir.

Can you try to describe your problem in other words? I am not sure if
I understand your problem.

In general, is CombinedDUAnalysis really what you are looking for?

What if your method's code looks like this? ...

1: a=object.invokeA(params...);
2: b=a;
3: anotherObject.invokeB(b);

in this case, do you want the analysis to return statement 2 or
statement 3? (I am pretty sure that CombinedDUAnalysis would return
statement 2, because it is the first statement that "uses" a.)

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



2010/6/14 Amir Mehrabi <mehrabi at comp.iust.ac.ir>:
>
>  Hi all
> I use CombinedDUAnalysis to finding first use point of an invocation.
> for example:
>
>  10.    a=object.invokeA(params...);
>  20.   ...
>  30.    ...
>  40.    anotherObject.invokeB(a);                      <= first use point of
> invocation A
>  50.   ...
>
> to find first use point at line number 40, I use CombinedDUAnalysis like
> this:
>         // stmt is equivalent of invocation A in  jimple
>         UnitGraph graph = new ExceptionalUnitGraph(body);
>         CombinedDUAnalysis anlysis = (CombinedDUAnalysis)
> CombinedDUAnalysis.v(graph);
>         uses = anlysis.getUsesOf(stmt);
> but the problem is if there is more than one invocation that interleaved
> this method does not work!!!
> and cannot FIRST use point
>
> Does any one knows why?
>
> Regards
> Amir Mehrabi-Jorshary
> Iran University of Science and Technology
>
>
> _______________________________________________
> 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