[Soot-list] Paddle: Parsing all the objects potentially reached from a local variable

Benoit Claudel benoit.claudel at inrialpes.fr
Fri Nov 13 11:24:36 EST 2009


Hello,

I am attempting to use Paddle to know all the objects that can be  
potentially reached
from a local variable.

For this, I am using a 1-call-site-sensitive analysis and a context- 
sensitive heap abstraction.

For each object Local, a call to the method reaching returns an object  
PointsToSetReadOnly.

PointsToSetReadOnly pts = pta.reachingObject(local);

For all the ContextAllocNode of this points-to-set, I retrieve an  
iterator of ContextAllocDotField.

pts.forall(new P2SetVisitor() {
	public void visit(ContextAllocNode n) {
		Iterator<ContextAllocDotField> fi = n.fields();
		System.out.printlnt(fi.hasNext());

		while(fi.hasNext()) { ... }
	}
}

Considering the following snippet of code:

Bar b = new Bar();
b.foo = new Foo();

The result of my analysis shows that the iterator fi has no members  
while the object Bar pointed by
the local variable b can reached the object Foo trough his foo field.

You will find enclosed the source file PointsToAnalysis.java.

Thanks so much for your answers.

Benoit.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PointsToAnalysis.java
Type: application/octet-stream
Size: 3547 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20091113/14b1d401/attachment.obj 
-------------- next part --------------



More information about the Soot-list mailing list