[Soot-list] one question about InfoFlowAnalysis in the package soot.jimple.toolkits.infoflow

jiangfan shi jiangfan.shi at gmail.com
Thu Jan 15 09:57:03 EST 2009


I am sorry, this is my fault. I can change my call
InfoFlowAnalysis(false,false) to InfoFlowAnalysis(true,true) to active
the primitive type and class field variables, which are the case in my
small example.

Jiangfan

On Mon, Jan 5, 2009 at 2:42 AM, jiangfan shi <jiangfan.shi at gmail.com> wrote:
> Hi, All,
>
> I am trying to use InfoFlowAnalysis to analyze my program, but I did
> not see an expected data flow edges among different methods in
> different classes. By digging into the data flow graph for methods, I
> did not see edges among local variables in methods.
>
> To make my problem obvious to us, I created a tiny program, and I
> could not get an expected data flow dependency relationships among
> method and the local variable dependency information inside methods.
> Anybody can give me some hints? Or do I miss some options
>
> I listed my small program, the analysis arguments, the jimple file and
> the analyzed results (variable dependency directed graph) in the
> following:
>
> My program:
>
> package smallexample;
>
>
> public class Main4 {
>
>        static int fee1,fee2,fee3;
>
>        public static void main(String[] args){
>                fee1=10;
>                fee2=fee1+2;
>                fee3=fee2+3;
>        }
> }
>
> Analysis arguments:
>
> -w -main-class smallexample.Main4 -p cg.spark rta:true  -f jimple
> --app smallexample.Main4
>
> Jimple file:
>
> public class smallexample.Main4 extends java.lang.Object
> {
>    static int fee1;
>    static int fee2;
>    static int fee3;
>
>    public void <init>()
>    {
>        smallexample.Main4 r0;
>
>        r0 := @this: smallexample.Main4;
>        specialinvoke r0.<java.lang.Object: void <init>()>();
>        return;
>    }
>
>    public static void main(java.lang.String[])
>    {
>        java.lang.String[] r0;
>        int $i0, $i1, $i2, $i3;
>
>        r0 := @parameter0: java.lang.String[];
>        <smallexample.Main4: int fee1> = 10;
>        $i0 = <smallexample.Main4: int fee1>;
>        $i1 = $i0 + 2;
>        <smallexample.Main4: int fee2> = $i1;
>        $i2 = <smallexample.Main4: int fee2>;
>        $i3 = $i2 + 3;
>        <smallexample.Main4: int fee3> = $i3;
>        return;
>    }
> }
>
>
> Analyzed results:
>
> =============method<smallexample.Main4: void
> main(java.lang.String[])>'s info flow graph ============
> Node = r0
> Preds:
>     @parameter0: java.lang.String[]
> Succs:
> Node = @parameter0: java.lang.String[]
> Preds:
> Succs:
>     r0
> ===================
>
>
> There is no a generated dependency graph for the class level, and
> further more for the method, main(), I did not see fee1<-fee2<-fee3,
> which means fee3 depends on fee2 which depends on fee1.
>
> Any hint is highly appreciated.
>
> Thanks in advance!
>
> Jiangfan
>


More information about the Soot-list mailing list