0

I am new to soot, and I started to write a class which extends ForwardFlowAnalysis. In my main function, I want to new a ForwardFlowAnalysis obj by using a constructor. But seems like the constructor is not executed for some reason, as a result only "1" is printed out. Anybody knows what is going on?

public class MyMain{
    public static void main(String[] args) {
        PackManager.v().getPack("jtp").add(
            new Transform("jtp.myTransform", new BodyTransformer() {
                protected void internalTransform(Body body, String phase, Map options) {
                    G.v().out.println("1");
                    new MyAnalysis(new ExceptionalUnitGraph(body));
                    G.v().out.println("3");
}}));

    soot.Main.main(args);
}


public static class MyAnalysis extends ForwardFlowAnalysis  {
    public MyAnalysis(ExceptionalUnitGraph g) {
        super(g);
        G.v().out.println("2");
        doAnalysis();
    }
}
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

0 Answers0