soot.dava.toolkits.base.AST.structuredAnalysis
Class DavaFlowSet

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowSet
      extended by soot.dava.toolkits.base.AST.structuredAnalysis.DavaFlowSet
All Implemented Interfaces:
Iterable, FlowSet
Direct Known Subclasses:
CPFlowSet, UnreachableCodeFinder.UnreachableCodeFlowSet

public class DavaFlowSet
extends AbstractFlowSet


Field Summary
 Object[] elements
           
 
Constructor Summary
DavaFlowSet()
           
DavaFlowSet(DavaFlowSet other)
           
 
Method Summary
 void add(Object e)
          Adds obj to this.
 void addToBreakList(String labelBroken, DavaFlowSet set)
          When an explicit break statement is encountered this method should be called to store the current davaflowset
 void addToContinueList(String labelContinued, DavaFlowSet set)
          When an explicit continue statement is encountered this method should be called to store the current davaflowset
 void addToImplicitBreaks(DAbruptStmt ab, DavaFlowSet set)
          The next two methods take an abruptStmt as input along with a flowSet.
 void addToImplicitContinues(DAbruptStmt ab, DavaFlowSet set)
           
 void clear()
          implemented, but *very* inefficient.
 DavaFlowSet clone()
          Clones the current FlowSet.
 boolean contains(Object obj)
          Returns true if this FlowSet contains obj.
 void copy(FlowSet destFlow)
          Copies the current FlowSet into dest.
 void copyInternalDataFrom(Object fromThis)
           
 void difference(FlowSet otherFlow, FlowSet destFlow)
          Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest.
 Object emptySet()
          implemented, but inefficient.
 boolean equals(Object otherFlow)
          Notice that the equals method only checks the equality of the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be checked by invoking the internalDataMatchesTo method
 List getBreakSet(String label)
           
 List getContinueSet(String label)
           
 HashMap<Serializable,List<DavaFlowSet>> getImplicitBreaks()
           
 HashMap<Serializable,List<DavaFlowSet>> getImplicitContinues()
           
 List getImplicitlyBrokenSets(ASTNode node)
           
 List getImplicitlyContinuedSets(ASTNode node)
           
 boolean internalDataMatchesTo(Object otherObj)
           
 void intersection(FlowSet otherFlow, FlowSet destFlow)
          Notice that the intersection method only merges the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be merged using the copyInternalDataFrom method
 boolean isEmpty()
          Returns true if this FlowSet is the empty set.
 void remove(Object obj)
          Removes obj from this.
 int size()
          Returns the size of the current FlowSet.
 List toList()
          Returns a unbacked list of elements in this set.
 String toString()
           
 void union(FlowSet otherFlow, FlowSet destFlow)
          Notice that the union method only merges the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be merged using the copyInternalDataFrom method
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowSet
add, difference, hashCode, intersection, iterator, remove, union
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

elements

public Object[] elements
Constructor Detail

DavaFlowSet

public DavaFlowSet()

DavaFlowSet

public DavaFlowSet(DavaFlowSet other)
Method Detail

clone

public DavaFlowSet clone()
Description copied from interface: FlowSet
Clones the current FlowSet.

Specified by:
clone in interface FlowSet
Specified by:
clone in class AbstractFlowSet

emptySet

public Object emptySet()
Description copied from class: AbstractFlowSet
implemented, but inefficient.

Specified by:
emptySet in interface FlowSet
Overrides:
emptySet in class AbstractFlowSet

clear

public void clear()
Description copied from class: AbstractFlowSet
implemented, but *very* inefficient.

Specified by:
clear in interface FlowSet
Overrides:
clear in class AbstractFlowSet

size

public int size()
Description copied from interface: FlowSet
Returns the size of the current FlowSet.

Specified by:
size in interface FlowSet
Specified by:
size in class AbstractFlowSet

isEmpty

public boolean isEmpty()
Description copied from interface: FlowSet
Returns true if this FlowSet is the empty set.

Specified by:
isEmpty in interface FlowSet
Specified by:
isEmpty in class AbstractFlowSet

toList

public List toList()
Returns a unbacked list of elements in this set.

Specified by:
toList in interface FlowSet
Specified by:
toList in class AbstractFlowSet

add

public void add(Object e)
Description copied from interface: FlowSet
Adds obj to this.

Specified by:
add in interface FlowSet
Specified by:
add in class AbstractFlowSet

remove

public void remove(Object obj)
Description copied from interface: FlowSet
Removes obj from this.

Specified by:
remove in interface FlowSet
Specified by:
remove in class AbstractFlowSet

union

public void union(FlowSet otherFlow,
                  FlowSet destFlow)
Notice that the union method only merges the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be merged using the copyInternalDataFrom method

Specified by:
union in interface FlowSet
Overrides:
union in class AbstractFlowSet

intersection

public void intersection(FlowSet otherFlow,
                         FlowSet destFlow)
Notice that the intersection method only merges the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be merged using the copyInternalDataFrom method

Specified by:
intersection in interface FlowSet
Overrides:
intersection in class AbstractFlowSet

difference

public void difference(FlowSet otherFlow,
                       FlowSet destFlow)
Description copied from interface: FlowSet
Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.

Specified by:
difference in interface FlowSet
Overrides:
difference in class AbstractFlowSet

contains

public boolean contains(Object obj)
Description copied from interface: FlowSet
Returns true if this FlowSet contains obj.

Specified by:
contains in interface FlowSet
Specified by:
contains in class AbstractFlowSet

equals

public boolean equals(Object otherFlow)
Notice that the equals method only checks the equality of the elements of the flow set DavaFlowSet also contains information regarding abrupt control flow This should also be checked by invoking the internalDataMatchesTo method

Overrides:
equals in class AbstractFlowSet

copy

public void copy(FlowSet destFlow)
Description copied from interface: FlowSet
Copies the current FlowSet into dest.

Specified by:
copy in interface FlowSet
Overrides:
copy in class AbstractFlowSet

addToBreakList

public void addToBreakList(String labelBroken,
                           DavaFlowSet set)
When an explicit break statement is encountered this method should be called to store the current davaflowset


addToContinueList

public void addToContinueList(String labelContinued,
                              DavaFlowSet set)
When an explicit continue statement is encountered this method should be called to store the current davaflowset


addToImplicitBreaks

public void addToImplicitBreaks(DAbruptStmt ab,
                                DavaFlowSet set)
The next two methods take an abruptStmt as input along with a flowSet. It should be only invoked for abrupt stmts which do not have explicit labels The node being targeted by this implicit stmt should be found Then the flow set should be added to the list within the appropriate hashmap


addToImplicitContinues

public void addToImplicitContinues(DAbruptStmt ab,
                                   DavaFlowSet set)

getImplicitBreaks

public HashMap<Serializable,List<DavaFlowSet>> getImplicitBreaks()

getImplicitContinues

public HashMap<Serializable,List<DavaFlowSet>> getImplicitContinues()

getImplicitlyBrokenSets

public List getImplicitlyBrokenSets(ASTNode node)

getImplicitlyContinuedSets

public List getImplicitlyContinuedSets(ASTNode node)

copyInternalDataFrom

public void copyInternalDataFrom(Object fromThis)

internalDataMatchesTo

public boolean internalDataMatchesTo(Object otherObj)

getContinueSet

public List getContinueSet(String label)

getBreakSet

public List getBreakSet(String label)

toString

public String toString()
Overrides:
toString in class AbstractFlowSet