use of soot.toolkits.graph.CompleteUnitGraph in project soot by Sable.
the class MultiCalledMethods method byMCalledS0.
private void byMCalledS0(PegCallGraph pcg) {
Iterator it = pcg.iterator();
while (it.hasNext()) {
SootMethod sm = (SootMethod) it.next();
UnitGraph graph = new CompleteUnitGraph(sm.getActiveBody());
CallGraph callGraph = Scene.v().getCallGraph();
MultiRunStatementsFinder finder = new MultiRunStatementsFinder(graph, sm, multiCalledMethods, callGraph);
FlowSet fs = finder.getMultiRunStatements();
}
}
use of soot.toolkits.graph.CompleteUnitGraph in project soot by Sable.
the class JavaTranslator method translate.
private void translate() {
st = new StmtTranslator(this);
Collection<SootClass> app = Scene.v().getApplicationClasses();
for (SootClass ac : app) {
st.setCurrentClass(ac);
List<SootMethod> sootMethods = ac.getMethods();
for (SootMethod sm : sootMethods) {
if (sm.isConcrete()) {
Method method = methodsignaturToMethod.get(sm.getSignature());
st.setCurrentMethod(sm);
CompleteUnitGraph cug = new CompleteUnitGraph(sm.retrieveActiveBody());
Iterator si = cug.iterator();
while (si.hasNext()) {
Stmt stmt = (Stmt) si.next();
st.translateStmt(stmt);
}
// System.err.println("Setting up link between entry and first stmt of the method...");
si = cug.getHeads().iterator();
while (si.hasNext()) {
Stmt stmt = (Stmt) si.next();
method.getEntry().addSucc(st.getFirst(stmt));
}
si = cug.iterator();
// System.err.println("Setting up link between the last statement and the first statement...");
while (si.hasNext()) {
Stmt stmt = (Stmt) si.next();
Iterator si2 = cug.getSuccsOf(stmt).iterator();
while (si2.hasNext()) {
Stmt stmt2 = (Stmt) si2.next();
st.getLast(stmt).addSucc(st.getFirst(stmt2));
}
}
// System.err.println("!!!!!!!!!!!!!!!!!!"+sm.getName()+"!!!!!!!!!!!!!!!!!!!!");
// si = cug.iterator();
// while (si.hasNext()) {
// Stmt stmt = (Stmt)si.next();
// System.err.println("The stmt: "+stmt+" translates to "+st.getFirst(stmt));
// //System.err.println(st.getFirst(stmt).getSuccs());
// }
// System.err.println("######################################");
}
}
}
}
Aggregations