[Soot-list] Heros question

Henddher Pedroza hpedro2 at uic.edu
Tue Apr 9 16:49:16 EDT 2013


Never mind. I found the problem on my end.
On Apr 9, 2013 11:22 AM, "Henddher Pedroza" <hpedro2 at uic.edu> wrote:

> Hello all,
>
> I am trying to use Heros but I am having difficulties.
>
> I have a simple Java stand-alone app composed of 2 classes, DummyMain and
> ClassC:
>
> public class DummyMain {
>
> public static void main(String[] args) {
> Thread ttt = new Thread(new Runnable() {
> public void run() {
> ClassC c = new ClassC();
> c.doSomething();  // Statement Sx
> }
> });
> ttt.start();
> }
> }
>
> public class ClassC {
> public void doSomething() {
> System.out.println(this + " doSomething");
> }
> }
>
> I am using IFDSUninitializedVariables but I think it does not matter in
> this case since I am not looking at the solution produced by the Solver.
>
> The issue I am observing is the following:
>
> I added "System.out.println" to each callback method in FlowFunctions
> of IFDSUninitializedVariables. Basically, I want to see how/when these are
> called by the framework.
>
> However, I NEVER see any callback for the "c.doSomething()" invocation
> inside the "run" method of my dummy Thread t (statement Sx).
>
> How is this possible?
>
> I think "c.doSomething()" is reachable from "DummyMain.main(String[])".
>  Am I flat-out wrong?
>
> Why is it that none of the FlowFunctions callbacks is ever invoked for the
> unit corresponding to statement Sx?
>
> The initialSeeds I am "feeding" into the framework are each of the start
> units of each of the default entry points. IOW, this:
>
> protected void internalTransform(String phaseName, @SuppressWarnings(
> "rawtypes") Map options) {
>
> this.cg = new JimpleBasedInterproceduralCFG();
>
> for (SootMethod sm : Scene.v().getEntryPoints()) {
> if (!sm.isConcrete()) {
> System.out.println("WARN: found no callers of entrypoint method " +
> sm.getSignature());
> continue;
> }
> Set<Unit> unitEntryPoints = cg.getStartPointsOf(sm);
> assert unitEntryPoints != null;
> if (unitEntryPoints.isEmpty()) {
> System.out.println("WARN: found no callers of entrypoint method " +
> sm.getSignature());
> }
> else {
> initialSeeds.addAll(unitEntryPoints);
> }
> }
>
>  ....
>
> IFDSTabulationProblem<Unit,Pair<Local,
> BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>> problem
> = new ...
> ...
> IFDSSolver<Unit,Pair<Local,
> BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>> solver
> = new IFDSSolver<Unit,Pair<Local,
> BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>>(problem);
>
>
> solver.solve();
> }
>
> Also, my running settings are as follow:
> -cp ../Dummy/bin/ -process-dir ../Dummy/bin/ -pp -w
> -no-bodies-for-excluded -allow-phantom-refs
> -Xmx4000m -ea
>
> I am also following the example Main.java located at
> soot/soot/jimple/toolkits/ide
>
> Any help is appreciated.
>
> Thanks in advance.
>
> - Henddher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130409/948ddc4f/attachment-0001.html 


More information about the Soot-list mailing list