[Soot-list] CallGraph creation difficulties

Henddher Pedroza hpedro2 at uic.edu
Wed May 1 19:42:13 EDT 2013


Thank you Mark-Andre,

I just tried adding "enabled:true" to "-p cg.spark" to make sure spark is enabled and still the same issue. If I recall correctly, whenever any option is declared for a phase, that phase becomes enabled automatically but I agree with you: it's better to explicitly set it to enabled.

My test does *not* have a main (I am dealing with Android, fyi).

I am setting only *one* entry point explicitly before invoking PackManager.runPacks(). My entry point is <A: void m0(boolean)>

i.e.
List<SootMethod> eps = Scene.v().getEntryPoints().clear(); // empty list
epsSootMethod = Scene.v().getSootMethod("<A: void m0(boolean)>");
eps.add(m1SootMethod);
Scene.v().setEntryPoints(eps);
… 
PackManager.runPacks()



On May 1, 2013, at 6:16 PM, Marc-André Laverdière-Papineau <marc-andre.laverdiere-papineau at polymtl.ca> wrote:

> Hello,
> 
> IRC, if you don't turn on Spark or Paddle, the default (CHA) kicks in. 
> Is your test case having a main?
> 
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
> 
> On 05/01/2013 06:08 PM, Henddher Pedroza wrote:
>> Hello all,
>> 
>> I am having issues with inter procedural call-graph construction.
>> 
>> Consider the following code:
>> 
>> Class A {
>>   String s;
>>   void m0(boolean b) {
>>       if (b)
>>           m1();
>>       else
>>           m2();
>>   }
>>   void m1() {
>>     this.s = String.valueOf(true);
>>   }
>>   void m2() {
>>     this.s = String.valueOf(false);
>>   }
>> }
>> 
>> Inside my SceneTransformer (of my IFDS impl), I create a cg as follows:
>> cg = new JimpleBasedInterproceduralCFG();
>> 
>> When I inspect the cg created, I observe the following:
>> 
>> 1. When using cg option "-p cg
>> all-reachable:true,verbose:true,safe-forname:true,safe-newinstance:true", the
>> constructed cg looks ok (I see edges from m0 to m1 and m2 correctly).
>> 
>> 2. When using the options above in addition to "-p cg.spark
>> verbose:true", the constructed cg shows NO edges at all (cg.edges is
>> empty). Also, cg.srcMethodToEdge, cg.srcUnitToEdge, and cg.tgtToEdge
>> Maps are all empty too.
>> 
>> I am explicitly setting only ONE entry point:
>> <A: m0(boolean>
>> 
>> Any advice?
>> 
>> Thanks in advance.
>> 
>> - Henddher
>> 
>> 
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



More information about the Soot-list mailing list