[Soot-list] Generate Program Dependency Graph

nie nie at informatik.uni-kiel.de
Mon Mar 18 13:58:09 EDT 2013


Hi,

I am trying to generate a program dependency graph using Soot. My 
attempt was to add an own BodyTransformer to intercept the graph and to 
use HashMutablePDG to generate the PDG:

protected void internalTransform(final Body b, final String phaseName, 
final Map options) {
	final UnitGraph cfg = new ExceptionalUnitGraph(b);
	final HashMutablePDG pdg = new HashMutablePDG(cfg);

	final CFGToDotGraph cfgToDot = new CFGToDotGraph();
	final DotGraph dotGraph = cfgToDot.drawCFG(pdg, cfg.getBody());
	dotGraph.plot(b.getMethod().getName() + ".out");
}

The resulting graph seems to contain usually only two nodes though. Is 
this an user error or isn't the PDG part of Soot implemented yet?

Regards,

Nils


More information about the Soot-list mailing list