[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EdgesOutOf



Guillaume Salagnac <guillaume.salagnac@imag.fr> wrote:
> Navindra, could you please execute my analysis with *your* version of
> soot, and tell me if it works ?
> Maybe i've missed something while patching/rebuilding soot.

First I tried it on Soot trunk but I got a lot of resolving errors
that I don't know the meaning of (and the wiki page mentioned in the
SVN logs seems unaccessible).  I'll check this one with Ondrej later.

My own branch isn't really suitable being in flux, but I tested Soot
2.1.0 with the patch I gave you.  This is the output I got:

[navindra@string ~/soot/tmp/guillaume] java -Xmx400m Main Foo
Soot started on Tue Sep 21 13:44:37 EDT 2004
Warning: Class java.security.cert.CertStoreParameters is a dynamic class, and you did not specify it as such; graph will be incomplete!
Warning: Class java.util.CurrencyData is a dynamic class, and you did not specify it as such; graph will be incomplete!
Warning: call to java.lang.reflect.Method: invoke() from <java.nio.channels.spi.AbstractInterruptibleChannel: void blockedOn(sun.nio.ch.Interruptible)>; graph will be incomplete!
Warning: call to java.lang.reflect.Method: invoke() from <java.io.ObjectStreamClass: java.lang.Object invokeReadResolve(java.lang.Object)>; graph will be incomplete!
Warning: call to java.lang.reflect.Method: invoke() from <java.io.ObjectStreamClass: void invokeReadObject(java.lang.Object,java.io.ObjectInputStream)>; graph will be incomplete!
Warning: call to java.lang.reflect.Method: invoke() from <java.io.ObjectStreamClass: void invokeReadObjectNoData(java.lang.Object)>; graph will be incomplete!
Warning: call to java.lang.reflect.Method: invoke() from <java.security.cert.CertificateFactory: java.security.cert.CertificateFactory getInstance(java.lang.String)>; graph will be incomplete!
======================================== Start freshness analysis
Application classes:

==================== Foo
========== <Foo: void <init>()>
3 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

specialinvoke r0.<java.lang.Object: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke r0.<java.lang.Object: void <init>()>()
    calls (sig)<java.lang.Object: void <init>()>
    calls (CG)<java.lang.Object: void <init>()>

return (class soot.jimple.internal.JReturnVoidStmt)
========== <Foo: void main(java.lang.String[])>
16 instructions

r0 := @parameter0: java.lang.String[] (class soot.jimple.internal.JIdentityStmt)

$r1 = new Foo (class soot.jimple.internal.JAssignStmt)

specialinvoke $r1.<Foo: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r1.<Foo: void <init>()>()
    calls (sig)<Foo: void <init>()>
    calls (CG)<Foo: void <init>()>

r2 = $r1 (class soot.jimple.internal.JAssignStmt)

$r5 = new RefObject (class soot.jimple.internal.JAssignStmt)

specialinvoke $r5.<RefObject: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r5.<RefObject: void <init>()>()
    calls (sig)<RefObject: void <init>()>
    calls (CG)<RefObject: void <init>()>

r3 = $r5 (class soot.jimple.internal.JAssignStmt)

r4 = virtualinvoke r2.<Foo: RefObject m1(RefObject)>(r3) (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke r2.<Foo: RefObject m1(RefObject)>(r3)
    calls (sig)<Foo: RefObject m1(RefObject)>
    calls (CG)<Foo: RefObject m1(RefObject)>

$r6 = <java.lang.System: java.io.PrintStream out> (class soot.jimple.internal.JAssignStmt)

$r7 = new java.lang.StringBuffer (class soot.jimple.internal.JAssignStmt)

specialinvoke $r7.<java.lang.StringBuffer: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r7.<java.lang.StringBuffer: void <init>()>()
    calls (sig)<java.lang.StringBuffer: void <init>()>
    calls (CG)<java.lang.StringBuffer: void <init>()>

$r8 = virtualinvoke $r7.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>("main:") (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r7.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>("main:")
    calls (sig)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>
    calls (CG)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>

$r9 = virtualinvoke $r8.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>(r4) (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r8.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>(r4)
    calls (sig)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>
    calls (CG)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>

$r10 = virtualinvoke $r9.<java.lang.StringBuffer: java.lang.String toString()>() (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r9.<java.lang.StringBuffer: java.lang.String toString()>()
    calls (sig)<java.lang.StringBuffer: java.lang.String toString()>
    calls (CG)<java.lang.StringBuffer: java.lang.String toString()>

virtualinvoke $r6.<java.io.PrintStream: void println(java.lang.String)>($r10) (class soot.jimple.internal.JInvokeStmt)
invokeExpr: virtualinvoke $r6.<java.io.PrintStream: void println(java.lang.String)>($r10)
    calls (sig)<java.io.PrintStream: void println(java.lang.String)>
    calls (CG)<java.io.PrintStream: void println(java.lang.String)>

return (class soot.jimple.internal.JReturnVoidStmt)
========== <Foo: RefObject m1(RefObject)>
14 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

r1 := @parameter0: RefObject (class soot.jimple.internal.JIdentityStmt)

$r2 = new java.lang.String (class soot.jimple.internal.JAssignStmt)

specialinvoke $r2.<java.lang.String: void <init>(java.lang.String)>("bli") (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r2.<java.lang.String: void <init>(java.lang.String)>("bli")
    calls (sig)<java.lang.String: void <init>(java.lang.String)>
    calls (CG)<java.lang.String: void <init>(java.lang.String)>

r3 = $r2 (class soot.jimple.internal.JAssignStmt)

virtualinvoke r1.<RefObject: void ref(java.lang.Object)>(r3) (class soot.jimple.internal.JInvokeStmt)
invokeExpr: virtualinvoke r1.<RefObject: void ref(java.lang.Object)>(r3)
    calls (sig)<RefObject: void ref(java.lang.Object)>
    calls (CG)<RefObject: void ref(java.lang.Object)>

virtualinvoke r0.<Foo: void m2(java.lang.Object)>(r3) (class soot.jimple.internal.JInvokeStmt)
invokeExpr: virtualinvoke r0.<Foo: void m2(java.lang.Object)>(r3)
    calls (sig)<Foo: void m2(java.lang.Object)>
    calls (CG)<Foo: void m2(java.lang.Object)>

r4 = virtualinvoke r0.<Foo: RefObject m3()>() (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke r0.<Foo: RefObject m3()>()
    calls (sig)<Foo: RefObject m3()>
    calls (CG)<Foo: RefObject m3()>

$r6 = new RefObject (class soot.jimple.internal.JAssignStmt)

specialinvoke $r6.<RefObject: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r6.<RefObject: void <init>()>()
    calls (sig)<RefObject: void <init>()>
    calls (CG)<RefObject: void <init>()>

r5 = $r6 (class soot.jimple.internal.JAssignStmt)

r5.<RefObject: java.lang.Object f> = r1 (class soot.jimple.internal.JAssignStmt)

virtualinvoke r1.<RefObject: void ref(java.lang.Object)>(r4) (class soot.jimple.internal.JInvokeStmt)
invokeExpr: virtualinvoke r1.<RefObject: void ref(java.lang.Object)>(r4)
    calls (sig)<RefObject: void ref(java.lang.Object)>
    calls (CG)<RefObject: void ref(java.lang.Object)>

return r5 (class soot.jimple.internal.JReturnStmt)
========== <Foo: void m2(java.lang.Object)>
12 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

r1 := @parameter0: java.lang.Object (class soot.jimple.internal.JIdentityStmt)

r2 = virtualinvoke r0.<Foo: RefObject m4()>() (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke r0.<Foo: RefObject m4()>()
    calls (sig)<Foo: RefObject m4()>
    calls (CG)<Foo: RefObject m4()>

r2.<RefObject: java.lang.Object f> = r1 (class soot.jimple.internal.JAssignStmt)

$r3 = <java.lang.System: java.io.PrintStream out> (class soot.jimple.internal.JAssignStmt)

$r4 = new java.lang.StringBuffer (class soot.jimple.internal.JAssignStmt)

specialinvoke $r4.<java.lang.StringBuffer: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r4.<java.lang.StringBuffer: void <init>()>()
    calls (sig)<java.lang.StringBuffer: void <init>()>
    calls (CG)<java.lang.StringBuffer: void <init>()>

$r5 = virtualinvoke $r4.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>("m2:") (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r4.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>("m2:")
    calls (sig)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>
    calls (CG)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>

$r6 = virtualinvoke $r5.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>(r2) (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r5.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>(r2)
    calls (sig)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>
    calls (CG)<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.Object)>

$r7 = virtualinvoke $r6.<java.lang.StringBuffer: java.lang.String toString()>() (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke $r6.<java.lang.StringBuffer: java.lang.String toString()>()
    calls (sig)<java.lang.StringBuffer: java.lang.String toString()>
    calls (CG)<java.lang.StringBuffer: java.lang.String toString()>

virtualinvoke $r3.<java.io.PrintStream: void println(java.lang.String)>($r7) (class soot.jimple.internal.JInvokeStmt)
invokeExpr: virtualinvoke $r3.<java.io.PrintStream: void println(java.lang.String)>($r7)
    calls (sig)<java.io.PrintStream: void println(java.lang.String)>
    calls (CG)<java.io.PrintStream: void println(java.lang.String)>

return (class soot.jimple.internal.JReturnVoidStmt)
========== <Foo: RefObject m3p()>
5 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

$r1 = new RefObject (class soot.jimple.internal.JAssignStmt)

specialinvoke $r1.<RefObject: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r1.<RefObject: void <init>()>()
    calls (sig)<RefObject: void <init>()>

r2 = $r1 (class soot.jimple.internal.JAssignStmt)

return r2 (class soot.jimple.internal.JReturnStmt)
========== <Foo: RefObject m3()>
4 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

$r1 = new RefObject (class soot.jimple.internal.JAssignStmt)

specialinvoke $r1.<RefObject: void <init>()>() (class soot.jimple.internal.JInvokeStmt)
invokeExpr: specialinvoke $r1.<RefObject: void <init>()>()
    calls (sig)<RefObject: void <init>()>
    calls (CG)<RefObject: void <init>()>

return $r1 (class soot.jimple.internal.JReturnStmt)
========== <Foo: RefObject m4()>
3 instructions

r0 := @this: Foo (class soot.jimple.internal.JIdentityStmt)

r1 = virtualinvoke r0.<Foo: RefObject m3()>() (class soot.jimple.internal.JAssignStmt)
invokeExpr: virtualinvoke r0.<Foo: RefObject m3()>()
    calls (sig)<Foo: RefObject m3()>
    calls (CG)<Foo: RefObject m3()>

return r1 (class soot.jimple.internal.JReturnStmt)
======================================= Finished freshness analysis
Transforming Foo...
Writing to sootOutput/Foo.shimple
Soot finished on Tue Sep 21 13:47:07 EDT 2004
Soot has run for 2 min. 29 sec.

How does this look?  As far as I can tell it is working.

Just in case, make sure your PackManager.java has this method
definition:

    private void runWholeProgramPacks() {
        if (Options.v().whole_shimple()) {
            ShimpleTransformer.v().transform();
            getPack("cg").apply();
            getPack("wstp").apply();
            getPack("wsop").apply();
        } else {
            getPack("cg").apply();
            getPack("wjtp").apply();
            getPack("wjop").apply();
            getPack("wjap").apply();
        }
    }

Also that PackManager.class is newly compiled and that your CLASSPATH
is pointing to the right stuff in case the update wasn't "in place".

Cheers,
Navin.