use of soot.Transform in project soot by Sable.
the class Main method main.
/**
* @param args
*/
public static void main(String[] args) {
PackManager.v().getPack("jtp").add(new Transform("jtp.fixedie", new BodyTransformer() {
@Override
protected void internalTransform(Body b, String phaseName, Map<String, String> options) {
for (Unit u : b.getUnits()) {
Stmt s = (Stmt) u;
if (s.containsInvokeExpr()) {
InvokeExpr ie = s.getInvokeExpr();
if (FixedMethods.isFixed(ie)) {
System.err.println("+++ " + ie);
yes++;
} else {
System.err.println(" - " + ie);
no++;
}
}
}
}
}));
soot.Main.main(args);
System.err.println("+++ " + yes);
System.err.println(" - " + no);
}
use of soot.Transform in project soot by Sable.
the class ReflInliner method main.
public static void main(String[] args) {
PackManager.v().getPack("wjpp").add(new Transform("wjpp.inlineReflCalls", new ReflectiveCallsInliner()));
Scene.v().addBasicClass(Object.class.getName());
Scene.v().addBasicClass(SootSig.class.getName(), SootClass.BODIES);
Scene.v().addBasicClass(UnexpectedReflectiveCall.class.getName(), SootClass.BODIES);
Scene.v().addBasicClass(IUnexpectedReflectiveCallHandler.class.getName(), SootClass.BODIES);
Scene.v().addBasicClass(DefaultHandler.class.getName(), SootClass.BODIES);
Scene.v().addBasicClass(OpaquePredicate.class.getName(), SootClass.BODIES);
Scene.v().addBasicClass(ReflectiveCalls.class.getName(), SootClass.BODIES);
ArrayList<String> argList = new ArrayList<String>(Arrays.asList(args));
argList.add("-w");
argList.add("-p");
argList.add("cg");
argList.add("enabled:false");
argList.add("-app");
Options.v().set_keep_line_number(true);
logger.debug("TamiFlex Booster Version " + ReflInliner.class.getPackage().getImplementationVersion());
try {
soot.Main.main(argList.toArray(new String[0]));
} catch (CompilationDeathException e) {
logger.debug("\nERROR: " + e.getMessage() + "\n");
logger.debug("The command-line options are described at:\n" + "http://www.sable.mcgill.ca/soot/tutorial/usage/index.html");
if (Options.v().verbose()) {
throw e;
} else {
logger.debug("Use -verbose to see stack trace.");
}
usage();
}
}
use of soot.Transform in project soot by Sable.
the class OptionsBase method getPhaseUsage.
protected String getPhaseUsage() {
StringBuffer b = new StringBuffer();
b.append("\nPhases and phase options:\n");
for (Pack p : PackManager.v().allPacks()) {
b.append(padOpt(p.getPhaseName(), p.getDeclaredOptions()));
for (Iterator<Transform> phIt = p.iterator(); phIt.hasNext(); ) {
final HasPhaseOptions ph = (HasPhaseOptions) phIt.next();
b.append(padVal(ph.getPhaseName(), ph.getDeclaredOptions()));
}
}
return b.toString();
}
use of soot.Transform in project soot by Sable.
the class BadFields method main.
public static void main(String[] args) {
PackManager.v().getPack("cg").add(new Transform("cg.badfields", new BadFields()));
soot.Main.main(args);
}
use of soot.Transform in project soot by Sable.
the class NullTransformer method main.
public static void main(String[] argv) {
Pack jtp = soot.G.v().PackManager().getPack("jtp");
jtp.add(new Transform("jtp.nt", new NullTransformer()));
jtp.add(new Transform("jtp.nac", new NullnessAnalysisColorer()));
soot.Main.main(argv);
}
Aggregations