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

Fwd: Scene Transformation in Soot 2.0.1



Matthew J Rummel <rummelm@allegheny.edu> writes:


Dear Sir or Madam:

I found your address under the listing of soot contributors.  I have tried twice to send the following message to the soot mailing list.  However, it has not been posted.  Could you please post this message for me?


Hello:

I working on extending an existing project that was written in Soot 1.2.5.  During the course of this work, I found out that it would be necessary to upgrade to 
Soot 2.0.1.  It would seem that there have been some changes in syntax regarding Scene transformations in this newer version of Soot, and I was wondering how I might convert the following 1.2.5 statements to version 2.0.1:

    // add a new ComputeLocalDefUseAssociations to the pack of transformers 
    // for this Scene (it will be the only one!) and then let 
    // Soot start working on this transformation .  ComputLocalDefUseAssociations is a transformation that was written
    // for this project. For each class being analyzed, the transformation finds all the def-uses and inserts profiling code before    
   // each.
 
    Scene.v().getPack("wjtp").add(new Transform("wjtp.instrumenter", 
   ComputeLocalDefUseAssociations.v()));


    // Note: if this is not set correctly, we will get Baf code and this
    // will create a class under test that is a mixture of Baf and Jimple;
    // this will lead to exceptions!
    soot.Main.setFinalRep("jimple");

I tried the following for the first statement but it does not work:

   PackManager.v().getPack("wjtp").add(new Transform("wjtp.instrumentor", 
   ComputeLocalDefUseAssociations.v()));

I have no idea how to implement the second statement.

Thank you for any advice offered,

Matt Rummel