[Soot-list] Looking for suggestion to modify a program's original source code

dingsun xyz031702 at hotmail.com
Mon Jun 9 03:58:13 EDT 2014


Dear All,

I have an application scenario as follows, would appreciate if you could give me some suggestions:

If I have a program:

void  func(int a, int b){
     .....
     If (a>1 && b >5){
          System.out.println("hello");
     }
}

I want to modify it into the following program automatically with the help of Soot: 
/*(I want to add several Boolean variable to represent each single predicate condition)*/
void  func(int a, int b){
     .....
     Boolean c1=a>1; // add this line
     Boolean c2=b<5; //add this line
     If (a>1 && b >5){
          System.out.println("hello");
     }
}

I know I can use line number tag to associate source code statement and Jimple statement.  But I didn't figure how to implement the above use case.

Need your kind suggestions. Thanks a lot!

Best regards,
Ding Sun


More information about the Soot-list mailing list