[Soot-list] where the upcasting in soot?

Steven Arzt Steven.Arzt at cased.de
Wed May 27 10:42:54 EDT 2015


Hi Lulu,

 

In the Java code you submitted, there is only an implicit downcast. For
this, you do not need an explicit cast expression in Java and so Soot will
not generate one in Jimple either.

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von lulu chen
Gesendet: Dienstag, 5. Mai 2015 10:41
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] where the upcasting in soot?

 

Hi, all

           I'm considering Soot to develop some dataflow analysis in java
class files. I have a parent class class A and a child class  class B
extends A ,

My question is that I cannot find type cast in jimple body. The upcasting
stmt a=b ,become r5=r3 (r5,r3 are the same type) , just a AssignStmt.

Ihe relationship between r2 and r5 is missing in the jimple file. How can I
get the relationship between r2 and r5 ( such as castexptr).

My example :

public class Ctest{

       public static void main(String [] args){

              A a = new A();

              B b = new B();

          a=b;

       }

}

The Jimple body  :

    public static void main(java.lang.String[])

    {

        java.lang.String[] r0;

        A $r1, r2;

        B r3, $r4, r5;

 

        r0 := @parameter0: java.lang.String[];

        $r1 = new A;

        specialinvoke $r1.< A: void <init>()>();

        r2 = $r1;

        $r4 = new B;

        specialinvoke $r4.< B: void <init>()>();

        r3 = $r4;

        r5 = r3;

        return;

    }

~lulu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150527/40dfb98a/attachment-0001.html 


More information about the Soot-list mailing list