[Soot-list] interprocedural reaching definitions

Peter Kim chpkim at gmail.com
Thu Aug 6 18:59:27 EDT 2015


Hi,

I'm using soot.jimple.toolkits.ide.exampleproblems.IFDSReachingDefinitions
but I'm only getting intraprocedural reaching definitions. For example,
against the following code:

public class ChpkimClass {
static int mystaticfield = -2;

        public static void foo(int x){}

public static void main(String args[]){
foo(mystaticfield);
}
}

At foo(), the only reaching definition is args[]. Since the call graph
includes the edge from main to clinit, whose active body includes the
statement <mypackage.ChpkimClass: int mystaticfield> = -2, shouldn't this
statement also be included in the resulting map?

Also, when the analysis given an instance field or array reference, the
reaching definitions seem to be empty. Am I not using the analysis
correctly or do I have to construct the reaching definitions manually in
these cases?

I'm using the analysis using the following code:

IFDSReachingDefinitions problem = new IFDSReachingDefinitions(iCfg);
solver = new IFDSSolver<Unit, Pair<Value, Set<DefinitionStmt>>,
     SootMethod, InterproceduralCFG<Unit, SootMethod>>(problem);
solver.solve();
Map result = solver.resultsAt(unit);

Thank you for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150806/97400a8e/attachment.html 


More information about the Soot-list mailing list