[Soot-list] PointsToAnalysis RuntimeError Aliasing
Florian Strauß
f_straus at cs.uni-kl.de
Mon Feb 6 12:08:46 EST 2012
Hi everyone,
thanks for your help last time.
I have an exception that I dont understand. Maybe you have an idea:
I try to implement an aliasing analysis, which based on soot
pointsTo-Interfaces.
Goal: All aliases of the local variable variable
Step 1 - Get all reachable objects:
p2Analysis = Scene.v().getPointsToAnalysis();
PointsToSet variablePointsTo = p2Analysis.reachingObjects(variable);
Step 2 Unfortunately I dont see a way to go backwards: From a referenced
object to the variable.* Hence, the next step is visiting all other
variables:
Step 2.1 Compare variable with all other local variables:
for (Local local : allLocals) {
if(local != variable){
PointsToSet localPointsTo =
p2Analysis.reachingObjects(local);
if(localPointsTo.hasNonEmptyIntersection(variablePointsTo)){
aliases.add(local);
}
}
}
Step 2.2 Compare variable with fields:
for (SootField field : allFields) {
if(field.isStatic()){
PointsToSet staticFieldPointsTo =
p2Analysis.reachingObjects(field);
if(staticFieldPointsTo.hasNonEmptyIntersection(variablePointsTo)){
aliases.add(field);
}
}else{
for (Local local : allLocals) {
PointsToSet fieldPointsTo =
p2Analysis.reachingObjects(local, field); //raises RuntimeErrors
if(fieldPointsTo.hasNonEmptyIntersection(variablePointsTo)){
aliases.add(field);
}
}
}
Step 2.1 works fine, but step 2.2 crashes and I do not see the reason. The
annotated line causes a runtime error:
Exception in thread "main" java.lang.RuntimeException: unnumbered:
<java.lang.String: int offset>
at soot.util.ArrayNumberer.get(ArrayNumberer.java:51)
at soot.util.JeddNumberer.get(JeddNumberer.java:35)
at jedd.internal.Jedd.literal(Jedd.java:158)
at
soot.jimple.paddle.BDDPointsToAnalysis.reachingObjects(BDDPointsToAnalysis.j
ava:103)
at
soot.jimple.paddle.BDDPointsToAnalysis.reachingObjects(BDDPointsToAnalysis.j
ava:122)
*) Up to now, I use paddle. Maybe spark has the opportunity to go backwards
(at least internal?).
What am I doing wrong?
Best regards,
Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120206/bf3190a8/attachment.html
More information about the Soot-list
mailing list