Virtual Invokes only triggers getCallToReturnFlowFunction
dliang2000 opened this issue · comments
We are trying to build an IFDS Solver to trace mock objects in test suites.
We tested several types of invokes (VirtualInvoke, StaticInvoke, SpecialInvoke), and it seems like only StaticInvoke could trigger getCallFlowFunction and getReturnFlowFunction, whereas VirtualInvoke could only trigger getCallToReturnFlowFunction.
I would like to know if this is the expected behavior of heros. If so, how could I manage to trace to the method of virtualInvoke?
Our microbenchmark for testing: https://github.com/dliang2000/MockAbstraction/blob/master/Benchmarks/microbenchmark/src/test/java/ca/liang/RootDriver.java
Our developing IFDS Problem:
https://github.com/dliang2000/MockAbstraction/blob/master/src/main/java/ca/uwaterloo/liang/IFDSProblem.java
Output for objects B, C, D in testing: message.txt
We originally had more options setting for cg.spark, resulted in an incomplete callgraph:
Options.v().setPhaseOption("cg.spark","enabled:true");
Options.v().setPhaseOption("cg.spark","verbose:true");
Options.v().setPhaseOption("cg.spark","on-fly-cg:true");
Options.v().setPhaseOption("cg.spark", "string-constants:true");
Now we only enable cg.spark and it triggers all flows:
Options.v().set_whole_program(true);
Options.v().setPhaseOption("cg.spark", "enabled:true");
...
PackManager.v().runPacks();
Thank you very much for the help!
Best,
David