[Soot-list] Side-effects and native methods

Anatole LE ale44 at cs.mcgill.ca
Sun Sep 17 06:30:10 EDT 2006


Hi Antonio,

> Hi everybody.
> I have to perform a dataflow analysis, but I need to include
> side-effects information at method call statements.
>
> First of all: I can't understand how to use Spark's side-effects
> analysis. I need to know which objects (AllocNodes), static fields, etc.
> can be modified / are used by a method. Is there a way to extract this
> information from Spark's side-effects analysis?

There is quite a bit of documentation that explains how to use
side-effect analysis in Soot. The tutorial "Using Side-Effect Attributes"
would be your quickest way to get up to speed on how to invoke Soot to add
side-effect attributes to class files. It also explains the attribute
format and shows an example on how to use it to eliminate a redundant
load in the presence of method calls.

http://www.sable.mcgill.ca/soot/tutorial/sideeffect/index.html

More detailed information can also be found in Sections 2 and 3 of the paper:
http://www.sable.mcgill.ca/publications/papers/2005-2/sable-paper-2005-2.ps

Or even more in the theses:

http://www.sable.mcgill.ca/publications/thesis/masters-ale/sable-thesis-2005-masters-ale.pdf (Chapters 3 and 4)

http://www.sable.mcgill.ca/publications/thesis/masters-olhotak/sable-thesis-2003-masters-olhotak.ps (Chapter 6)

> Most important: what about native methods? My idea was to run Spark,
> then analyze each method to see which AllocNodes, static fields, etc
> were modified / used, then propagate this information to the caller.
> I can do this for concrete methods, but this approach fails
> with native methods because I can't build bodies for them.
> Do you have any suggestion?

There is a bit in the side-effect attribute that indicates whether an
invoke statement may call a native method (see Section 6.2.4 of Ondrej's
thesis above). Spark also contains a Native Method Simulator that is
used to model the effects of native methods. Ondrej could probably
elaborate more on this.

Anatole

>
> Thank you,
> Antonio Castaldo D'Ursi
>
> --
>
> Entia non sunt multiplicanda praeter necessitatem
> _______________________________________________
> 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