soot.jimple.toolkits.scalar
Class ToppedSet

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowSet
      extended by soot.jimple.toolkits.scalar.ToppedSet
All Implemented Interfaces:
Iterable, FlowSet

public class ToppedSet
extends AbstractFlowSet

Represents information for flow analysis, adding a top element to a lattice. A FlowSet is an element of a lattice; this lattice might be described by a FlowUniverse. If add, remove, size, isEmpty, toList and contains are implemented, the lattice must be the powerset of some set.


Constructor Summary
ToppedSet(FlowSet under)
           
 
Method Summary
 void add(Object obj)
          Adds obj to this.
 void clear()
          implemented, but *very* inefficient.
 ToppedSet clone()
          Clones the current FlowSet.
 boolean contains(Object obj)
          Returns true if this FlowSet contains obj.
 void copy(FlowSet d)
          Copies the current FlowSet into dest.
 void difference(FlowSet o, FlowSet d)
          Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest.
 Object emptySet()
          implemented, but inefficient.
 boolean equals(Object o)
           
 void intersection(FlowSet o, FlowSet d)
          Returns the intersection (meet) of this FlowSet and other, putting result into dest.
 boolean isEmpty()
          Returns true if this FlowSet is the empty set.
 boolean isTop()
           
 void remove(Object obj)
          Removes obj from this.
 void setTop(boolean top)
           
 int size()
          Returns the size of the current FlowSet.
 List toList()
          Returns an unbacked list of contained objects for this FlowSet.
 String toString()
           
 void union(FlowSet o, FlowSet d)
          Returns the union (join) of this FlowSet and other, putting result into dest.
 
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
 

Constructor Detail

ToppedSet

public ToppedSet(FlowSet under)
Method Detail

setTop

public void setTop(boolean top)

isTop

public boolean isTop()

clone

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

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

copy

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

Specified by:
copy in interface FlowSet
Overrides:
copy 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

union

public void union(FlowSet o,
                  FlowSet d)
Description copied from interface: FlowSet
Returns the union (join) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.

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

intersection

public void intersection(FlowSet o,
                         FlowSet d)
Description copied from interface: FlowSet
Returns the intersection (meet) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.

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

difference

public void difference(FlowSet o,
                       FlowSet d)
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

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

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

add

public void add(Object obj)
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

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

toList

public List toList()
Description copied from interface: FlowSet
Returns an unbacked list of contained objects for this FlowSet.

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

equals

public boolean equals(Object o)
Overrides:
equals in class AbstractFlowSet

toString

public String toString()
Overrides:
toString in class AbstractFlowSet