soot.toolkits.scalar
Interface FlowSet

All Known Subinterfaces:
BoundedFlowSet
All Known Implementing Classes:
AbstractBoundedFlowSet, AbstractFlowSet, ArrayPackedSet, ArraySparseSet, CPFlowSet, DavaFlowSet, MonitorSet, ToppedSet, UnreachableCodeFinder.UnreachableCodeFlowSet

public interface FlowSet

Represents information for flow analysis. 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.


Method Summary
 void add(Object obj)
          Adds obj to this.
 void add(Object obj, FlowSet dest)
          puts this union obj into dest.
 void clear()
          Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
 FlowSet clone()
          Clones the current FlowSet.
 boolean contains(Object obj)
          Returns true if this FlowSet contains obj.
 void copy(FlowSet dest)
          Copies the current FlowSet into dest.
 void difference(FlowSet other)
          Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into this.
 void difference(FlowSet other, FlowSet dest)
          Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest.
 Object emptySet()
          returns an empty set, most often more efficient than: ((FlowSet)clone()).clear()
 void intersection(FlowSet other)
          Returns the intersection (meet) of this FlowSet and other, putting result into this.
 void intersection(FlowSet other, FlowSet dest)
          Returns the intersection (meet) of this FlowSet and other, putting result into dest.
 boolean isEmpty()
          Returns true if this FlowSet is the empty set.
 Iterator iterator()
          returns an iterator over the elements of the flowSet.
 void remove(Object obj)
          Removes obj from this.
 void remove(Object obj, FlowSet dest)
          Puts this minus obj into dest.
 int size()
          Returns the size of the current FlowSet.
 List toList()
          Returns an unbacked list of contained objects for this FlowSet.
 void union(FlowSet other)
          Returns the union (join) of this FlowSet and other, putting result into this.
 void union(FlowSet other, FlowSet dest)
          Returns the union (join) of this FlowSet and other, putting result into dest.
 

Method Detail

clone

FlowSet clone()
Clones the current FlowSet.


emptySet

Object emptySet()
returns an empty set, most often more efficient than: ((FlowSet)clone()).clear()


copy

void copy(FlowSet dest)
Copies the current FlowSet into dest.


clear

void clear()
Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)


union

void union(FlowSet other)
Returns the union (join) of this FlowSet and other, putting result into this.


union

void union(FlowSet other,
           FlowSet dest)
Returns the union (join) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.


intersection

void intersection(FlowSet other)
Returns the intersection (meet) of this FlowSet and other, putting result into this.


intersection

void intersection(FlowSet other,
                  FlowSet dest)
Returns the intersection (meet) of this FlowSet and other, putting result into dest. dest, other and this could be the same object.


difference

void difference(FlowSet other)
Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into this.


difference

void difference(FlowSet other,
                FlowSet dest)
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.


isEmpty

boolean isEmpty()
Returns true if this FlowSet is the empty set.


size

int size()
Returns the size of the current FlowSet.


add

void add(Object obj)
Adds obj to this.


add

void add(Object obj,
         FlowSet dest)
puts this union obj into dest.


remove

void remove(Object obj)
Removes obj from this.


remove

void remove(Object obj,
            FlowSet dest)
Puts this minus obj into dest.


contains

boolean contains(Object obj)
Returns true if this FlowSet contains obj.


iterator

Iterator iterator()
returns an iterator over the elements of the flowSet. Note that the iterator might be backed, and hence be faster in the creation, than doing toList().iterator().


toList

List toList()
Returns an unbacked list of contained objects for this FlowSet.