/** * Constructs a {@link BriefBlockGraph} representing the <tt>Unit</tt>-level control flow represented by the passed * {@link BriefUnitGraph}. * * @param unitGraph * the {@link Body} for which to build a graph. */ public BriefBlockGraph(BriefUnitGraph unitGraph) { super(unitGraph); soot.util.PhaseDumper.v().dumpGraph(this, mBody); } }
public EnhancedBlockGraph(EnhancedUnitGraph unitGraph) { super(unitGraph); soot.util.PhaseDumper.v().dumpGraph(this, mBody); } }
/** * Constructs a <tt>ZonedBlockGraph</tt> corresponding to the <tt>Unit</tt>-level control flow represented by the passed * {@link BriefUnitGraph}. * * @param unitGraph * The <tt>BriefUnitGraph</tt> for which to produce a <tt>ZonedBlockGraph</tt>. */ public ZonedBlockGraph(BriefUnitGraph unitGraph) { super(unitGraph); soot.util.PhaseDumper.v().dumpGraph(this, mBody); }
/** * Constructs an <tt>ArrayRefBlockGraph</tt> corresponding to the <tt>Unit</tt>-level control flow represented by the * passed {@link BriefUnitGraph}. * * @param unitGraph * The <tt>BriefUnitGraph</tt> for which to build an <tt>ArrayRefBlockGraph</tt>. */ public ArrayRefBlockGraph(BriefUnitGraph unitGraph) { super(unitGraph); soot.util.PhaseDumper.v().dumpGraph(this, mBody); }
/** * Constructs a graph for the blocks found by partitioning the the {@link Unit}s in an {@link ExceptionalUnitGraph}. * * @param unitGraph * The <code>ExceptionalUnitGraph</code> whose <code>Unit</code>s are to be split into blocks. */ public ExceptionalBlockGraph(ExceptionalUnitGraph unitGraph) { super(unitGraph); soot.util.PhaseDumper.v().dumpGraph(this); }
/** * Constructs a graph for the blocks found by partitioning the the units in a {@link ClassicCompleteUnitGraph}. * * @param unitGraph * A {@link ClassicCompleteUnitGraph} built from <tt>body</tt>. The <tt>CompleteBlockGraph</tt> constructor uses * the passed <tt>graph</tt> to split the body into blocks. */ public ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph) { super(unitGraph); // Adjust the heads and tails to match the old CompleteBlockGraph. Unit entryPoint = getBody().getUnits().getFirst(); List<Block> newHeads = new ArrayList<Block>(1); for (Block b : getBlocks()) { if (b.getHead() == entryPoint) { newHeads.add(b); break; } } mHeads = Collections.unmodifiableList(newHeads); mTails = Collections.emptyList(); soot.util.PhaseDumper.v().dumpGraph(this, mBody); } }
public void apply() { Map<String, String> options = PhaseOptions.v().getPhaseOptions(phaseName); if (PhaseOptions.getBoolean(options, "enabled")) { if (Options.v().verbose()) { logger.debug("" + "Applying phase " + phaseName + " to the scene."); } } if (DEBUG) { PhaseDumper.v().dumpBefore(getPhaseName()); } ((SceneTransformer) t).transform(phaseName, options); if (DEBUG) { PhaseDumper.v().dumpAfter(getPhaseName()); } }
public void apply(Body b) { Map<String, String> options = PhaseOptions.v().getPhaseOptions(phaseName); if (PhaseOptions.getBoolean(options, "enabled")) { if (Options.v().verbose()) { logger.debug("" + "Applying phase " + phaseName + " to " + b.getMethod() + "."); } } if (DEBUG) { PhaseDumper.v().dumpBefore(b, getPhaseName()); } ((BodyTransformer) t).transform(b, phaseName, options); if (DEBUG) { PhaseDumper.v().dumpAfter(b, getPhaseName()); } }
soot.util.PhaseDumper.v().dumpGraph(this);
/** * Constructs a BriefUnitGraph given a Body instance. * * @param body * The underlying body we want to make a graph for. */ public BriefUnitGraph(Body body) { super(body); int size = unitChain.size(); if (Options.v().time()) { Timers.v().graphTimer.start(); } unitToSuccs = new HashMap<Unit, List<Unit>>(size * 2 + 1, 0.7f); unitToPreds = new HashMap<Unit, List<Unit>>(size * 2 + 1, 0.7f); buildUnexceptionalEdges(unitToSuccs, unitToPreds); buildHeadsAndTails(); if (Options.v().time()) { Timers.v().graphTimer.end(); } soot.util.PhaseDumper.v().dumpGraph(this, body); }
/** * Constructs the graph from a given Body instance. * * @param the * Body instance from which the graph is built. */ public TrapUnitGraph(Body body) { super(body); int size = unitChain.size(); if (Options.v().time()) { Timers.v().graphTimer.start(); } unitToSuccs = new HashMap<Unit, List<Unit>>(size * 2 + 1, 0.7f); unitToPreds = new HashMap<Unit, List<Unit>>(size * 2 + 1, 0.7f); buildUnexceptionalEdges(unitToSuccs, unitToPreds); buildExceptionalEdges(unitToSuccs, unitToPreds); buildHeadsAndTails(); if (Options.v().time()) { Timers.v().graphTimer.end(); } soot.util.PhaseDumper.v().dumpGraph(this, body); }
public void writeOutput() { setupJAR(); if (Options.v().verbose()) { PhaseDumper.v().dumpBefore("output"); } if (Options.v().output_format() == Options.output_format_dava) { postProcessDAVA(); outputDava(); } else if (Options.v().output_format() == Options.output_format_dex || Options.v().output_format() == Options.output_format_force_dex) { writeDexOutput(); } else { writeOutput(reachableClasses()); tearDownJAR(); } postProcessXML(reachableClasses()); if (!Options.v().no_writeout_body_releasing()) { releaseBodies(reachableClasses()); } if (Options.v().verbose()) { PhaseDumper.v().dumpAfter("output"); } }