soot.toolkits.scalar
Class BranchedFlowAnalysis

java.lang.Object
  |
  +--soot.toolkits.scalar.BranchedFlowAnalysis
Direct Known Subclasses:
ForwardBranchedFlowAnalysis

public abstract class BranchedFlowAnalysis
extends java.lang.Object

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  UnitGraph graph
           
protected  java.util.Map unitToAfterBranchFlow
           
protected  java.util.Map unitToAfterFallFlow
          Maps graph nodes to OUT sets.
protected  java.util.Map unitToBeforeFlow
          Maps graph nodes to IN sets.
 
Constructor Summary
BranchedFlowAnalysis(UnitGraph graph)
           
 
Method Summary
protected abstract  void copy(java.lang.Object source, java.lang.Object dest)
           
protected  void customizeInitialFlowGraph()
           
protected abstract  void doAnalysis()
           
protected  java.lang.Object entryInitialFlow()
          For back compatibility, use the initial value of other nodes.
protected abstract  void flowThrough(java.lang.Object in, Unit s, java.util.List fallOut, java.util.List branchOuts)
           
 java.util.List getBranchFlowAfter(Unit s)
           
 java.lang.Object getFallFlowAfter(Unit s)
           
 java.lang.Object getFlowBefore(Unit s)
           
protected abstract  boolean isForward()
           
protected abstract  void merge(java.lang.Object in1, java.lang.Object in2, java.lang.Object out)
           
protected abstract  java.lang.Object newInitialFlow()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unitToBeforeFlow

protected java.util.Map unitToBeforeFlow
Maps graph nodes to IN sets.


unitToAfterFallFlow

protected java.util.Map unitToAfterFallFlow
Maps graph nodes to OUT sets.


unitToAfterBranchFlow

protected java.util.Map unitToAfterBranchFlow

graph

protected UnitGraph graph
Constructor Detail

BranchedFlowAnalysis

public BranchedFlowAnalysis(UnitGraph graph)
Method Detail

newInitialFlow

protected abstract java.lang.Object newInitialFlow()

entryInitialFlow

protected java.lang.Object entryInitialFlow()
For back compatibility, use the initial value of other nodes.


isForward

protected abstract boolean isForward()

flowThrough

protected abstract void flowThrough(java.lang.Object in,
                                    Unit s,
                                    java.util.List fallOut,
                                    java.util.List branchOuts)

merge

protected abstract void merge(java.lang.Object in1,
                              java.lang.Object in2,
                              java.lang.Object out)

copy

protected abstract void copy(java.lang.Object source,
                             java.lang.Object dest)

doAnalysis

protected abstract void doAnalysis()

customizeInitialFlowGraph

protected void customizeInitialFlowGraph()

getFallFlowAfter

public java.lang.Object getFallFlowAfter(Unit s)

getBranchFlowAfter

public java.util.List getBranchFlowAfter(Unit s)

getFlowBefore

public java.lang.Object getFlowBefore(Unit s)