The classes in soot.toolkits.graph which represent control flow have been reorganized to provide facilities for pruning exceptional control flow. In particular:

  1. BlockGraph is now an abstract class. Code which has instantiated BlockGraph directly should replace invocations of the BlockGraph constructor as follows
    • BlockGraph(body, BlockGraph.BRIEF) => BriefBlockGraph(body)
    • BlockGraph(body, BlockGraph.ZONED) => ZonedBlockGraph(body)
    • BlockGraph(body, BlockGraph.COMPLETE) => CompleteBlockGraph(body) (but only as a quick fix, see point 3)
    • BlockGraph(body, BlockGraph.ARRAYREF) => ArrayRefBlockGraph(body)
  2. UnitGraph is now an abstract class. Code which currently instantiates UnitGraph directly should replace invocations of the UnitGraph constructor as follows:

    • UnitGraph(body, false, false) => BriefUnitGraph(body)
    • UnitGraph(body, false, true) => BriefUnitGraph(body)
    • UnitGraph(body, true, false) => CompleteUnitGraph(body) (but only as a quick fix; see point 3)
    • UnitGraph(body, true, true) => TrapUnitGraph(body)
  3. CompleteUnitGraph and CompleteBlockGraph are included for backwards compatibility; new code should use ExceptionalUnitGraph and ExceptionalBlockGraph instead, since they provide the option to prune unrealizable exceptional control flow from the CFG, and their interface allows callers to distinguish exceptional control flow from regular control flow. See the javadoc for ExceptionalGraph, ExceptionalUnitGraph, and ExceptionalBlockGraph for details.
  4. There are two differences between the graphs produced by the old implementation of CompleteUnitGraph and the implementation provided in this release
    • this release will include edges from Units that branch into the middle of a protected region to the handler protecting the region;
    • this release will include an exception handler among the heads of the graph when the first Unit in the method may throw an exception caught by the handler.
  5. Both differences are bug fixes, but the latter may surprise client code that assumes CompleteUnitGraph.getHeads() always returns a single Unit.
  6. now takes the output filename as an argument, rather than deriving it from the method name.
  7. soot.Main now has command line options that specify how to treat exceptional control flow (the options change the default values for parameters to the ExceptionalUnitGraph(Body) constructor). See the documentation for "--throw-analysis", "--omitExceptingUnitEdges", "--trim-cfgs", and "--phase-help".
  8. soot.Main now has options for dumping CFGs and method bodies at intermediate points during the soot run. The output is voluminous and likely of use only to people maintaining Soot's internals. See the documentation for "--dump-body" and "--dump-cfg".
  9. The command line options for have been completely reworked, with no provision for backwards compatibility (to allow for a wider variety of graph types, intermediate representations, and soot transformations). See the output of "soot.util.CFGViewer --help" for details.
  10. The new package soot.toolkits.exceptions provides support for exceptional control flow analysis.
  11. The new package soot.util.cfgcmd provides support for the reimplementation of soot.util.CFGViewer and the "--dump-cfg" option.