[Soot-list] incomplete callgraph

Toth.Gabriella.2 at stud.u-szeged.hu Toth.Gabriella.2 at stud.u-szeged.hu
Tue Jan 23 04:06:15 EST 2007


Hi!
I have this example:

class A{
   int a;
   public A(int i){
     a=i;
   }
   public int geta(){
     return a;
   }
   public void seta(int i){
	a=i;
   }
}

class B{
   int b;
   public B(int j){
       b=j;
     }
	 public int getb(){
     return b;
   }
     void setb(int i){
       b=i;
     }
}
class C2{
	int c;
   A a=new A(5);
   static B b=new B(6);
	 public C2(int j){
       c=j;
     }
   public int c(){

    return b.getb()+6/a.geta();
   }

   public static void main(){
     C2 c = new C2(3);
	b.setb(c.c());    <---
   }
}


---------------------------------------------

I create callgraph:

	CallGraphBuilder cgb = new CallGraphBuilder();
		cgb.build();
		cg = cgb.getCallGraph();

The callgraph:

CLINIT edge: $r1 = <C2: B b> in <C2: int c()> ==> <java.lang.Object:  
void <clinit>()>
CLINIT edge: $r0 = <C2: B b> in <C2: void main()> ==>  
<java.lang.Object: void <clinit>()>
SPECIAL edge: specialinvoke r0.<java.lang.Object: void <init>()>() in  
<C2: void <init>()> ==> <java.lang.Object: void <init>()>
VIRTUAL edge: $i0 = virtualinvoke $r1.<B: int getb()>() in <C2: int  
c()> ==> <B: int getb()>
VIRTUAL edge: $i1 = virtualinvoke $r2.<A: int geta()>() in <C2: int  
c()> ==> <A: int geta()>
VIRTUAL edge: virtualinvoke $r0.<B: void setb(int)>($i0) in <C2: void  
main()> ==> <B: void setb(int)>
SPECIAL edge: specialinvoke r0.<java.lang.Object: void <init>()>() in  
<A: void <init>(int)> ==> <java.lang.Object: void <init>()>
SPECIAL edge: specialinvoke r0.<java.lang.Object: void <init>()>() in  
<B: void <init>(int)> ==> <java.lang.Object: void <init>()>

I don't find edge to c.c(). What should I do? I tried options but the  
callgraph didn't change.

Thanks
Gabi

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Soot-list mailing list