[Soot-list] Extracting field usage information with Soot
Chris Pickett
chris.pickett at mail.mcgill.ca
Thu Jan 31 19:44:23 EST 2008
Hi Jaime,
You might want to look at the purity analysis work in Soot and also read
our PASTE'07 paper. We only ever had a very strong purity analysis in
Soot but you might still find it instructive. I don't think Haiying
ever committed the source code for it... Haiying, can you make a tar.gz
available?
There is also an existing stab at implementing Alex Salcianu's purity
analysis that Antoine Mine did in jimple/toolkits/annotation/purity.
Cheers,
Chris
P.S. A lot of the tutorial docs are actually about using the Soot API.
Jaime Quinonez wrote:
> Hello,
>
> I am developing a reference immutability inference tool for Java built
> on top of Soot. As part of my analysis, I need to determine which
> SootFields are read in a SootMethod and which fields are written to in a
> method. I believe the correct approach is to create a SceneVisitor and
> override visitBody() to use a custom soot.jimple.AbstractStmtSwitch to
> check each soot.jimple.Stmt, deconstructing a Stmt based on it's type.
> Is this the correct approach, or is there some existing feature of Soot
> that I am not aware of? Using this approach, would checking the result
> of Stmt.getFieldRef() suffice for determining field reads, and would
> checking the result of AssignStmt.getLeftOp() suffice for field writes?
>
> Additionally, is there any documentation for developers who wish to use
> and extend Soot programmatically? The documentation at
> http://www.sable.mcgill.ca/soot/tutorial/ seems to be primarily for
> people who only want to use Soot as a tool from the command line.
>
> Thanks,
>
> Jaime
> _______________________________________________
> 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