soot.toolkits.scalar
Class BranchedFlowAnalysis<N extends Unit,A>

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
      extended by soot.toolkits.scalar.BranchedFlowAnalysis<N,A>
Direct Known Subclasses:
ForwardBranchedFlowAnalysis

public abstract class BranchedFlowAnalysis<N extends Unit,A>
extends AbstractFlowAnalysis<N,A>

Abstract class providing functionality for branched flow analysis. A branched flow analysis is one which can propagate different information to the successors of a node. This is useful for propagating information past a statement like if(x > 0): one successor has x > 0 while the other successor has x ≤ 0.


Field Summary
protected  Map<Unit,ArrayList<A>> unitToAfterBranchFlow
           
protected  Map<Unit,ArrayList<A>> unitToAfterFallFlow
          Maps graph nodes to OUT sets.
 
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
filterUnitToBeforeFlow, graph, unitToBeforeFlow
 
Constructor Summary
BranchedFlowAnalysis(DirectedGraph<N> graph)
           
 
Method Summary
protected abstract  void flowThrough(A in, Unit s, List<A> fallOut, List<A> branchOuts)
          Given the merge of the in sets, compute the fallOut and branchOuts set for s.
 List<A> getBranchFlowAfter(Unit s)
           
 A getFallFlowAfter(Unit s)
           
 A getFlowBefore(Unit s)
          Accessor function returning value of IN set for s.
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
copy, doAnalysis, entryInitialFlow, isForward, merge, merge, mergeInto, newInitialFlow, treatTrapHandlersAsEntries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unitToAfterFallFlow

protected Map<Unit,ArrayList<A>> unitToAfterFallFlow
Maps graph nodes to OUT sets.


unitToAfterBranchFlow

protected Map<Unit,ArrayList<A>> unitToAfterBranchFlow
Constructor Detail

BranchedFlowAnalysis

public BranchedFlowAnalysis(DirectedGraph<N> graph)
Method Detail

flowThrough

protected abstract void flowThrough(A in,
                                    Unit s,
                                    List<A> fallOut,
                                    List<A> branchOuts)
Given the merge of the in sets, compute the fallOut and branchOuts set for s.


getFallFlowAfter

public A getFallFlowAfter(Unit s)

getBranchFlowAfter

public List<A> getBranchFlowAfter(Unit s)

getFlowBefore

public A getFlowBefore(Unit s)
Description copied from class: AbstractFlowAnalysis
Accessor function returning value of IN set for s.

Overrides:
getFlowBefore in class AbstractFlowAnalysis<N extends Unit,A>