Package soot.toolkits.scalar
Interface FlowSet<T>
-
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
BoundedFlowSet<T>
- All Known Implementing Classes:
AbstractBoundedFlowSet,AbstractFlowSet,ArrayPackedSet,ArraySparseSet,CPFlowSet,DavaFlowSet,HashSparseSet,MonitorSet,ToppedSet,UnreachableCodeFinder.UnreachableCodeFlowSet
public interface FlowSet<T> extends Iterable<T>
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadd(T obj)Addsobjtothis.voidadd(T obj, FlowSet<T> dest)putsthisunionobjintodest.voidclear()Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)FlowSet<T>clone()Clones the current FlowSet.booleancontains(T obj)Returns true if this FlowSet containsobj.voidcopy(FlowSet<T> dest)Copies the current FlowSet into dest.default voidcopyFreshToExisting(FlowSet<T> dest)Copies a *fresh* copy of this to dest.voiddifference(FlowSet<T> other)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intothis.voiddifference(FlowSet<T> other, FlowSet<T> dest)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.FlowSet<T>emptySet()returns an empty set, most often more efficient than:((FlowSet)clone()).clear()voidintersection(FlowSet<T> other)Returns the intersection (meet) of this FlowSet andother, putting result intothis.voidintersection(FlowSet<T> other, FlowSet<T> dest)Returns the intersection (meet) of this FlowSet andother, putting result intodest.booleanisEmpty()Returns true if this FlowSet is the empty set.booleanisSubSet(FlowSet<T> other)Returns true if theotherFlowSet is a subset ofthisFlowSet.Iterator<T>iterator()returns an iterator over the elements of the flowSet.voidremove(T obj)Removesobjfromthis.voidremove(T obj, FlowSet<T> dest)Putsthisminusobjintodest.intsize()Returns the size of the current FlowSet.List<T>toList()Returns an unbacked list of contained objects for this FlowSet.voidunion(FlowSet<T> other)Returns the union (join) of this FlowSet andother, putting result intothis.voidunion(FlowSet<T> other, FlowSet<T> dest)Returns the union (join) of this FlowSet andother, putting result intodest.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
emptySet
FlowSet<T> emptySet()
returns an empty set, most often more efficient than:((FlowSet)clone()).clear()
-
clear
void clear()
Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
-
union
void union(FlowSet<T> other)
Returns the union (join) of this FlowSet andother, putting result intothis.
-
union
void union(FlowSet<T> other, FlowSet<T> dest)
Returns the union (join) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.
-
intersection
void intersection(FlowSet<T> other)
Returns the intersection (meet) of this FlowSet andother, putting result intothis.
-
intersection
void intersection(FlowSet<T> other, FlowSet<T> dest)
Returns the intersection (meet) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.
-
difference
void difference(FlowSet<T> other)
Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intothis.
-
difference
void difference(FlowSet<T> other, FlowSet<T> dest)
Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.dest,otherandthiscould 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(T obj)
Addsobjtothis.
-
remove
void remove(T obj)
Removesobjfromthis.
-
contains
boolean contains(T obj)
Returns true if this FlowSet containsobj.
-
isSubSet
boolean isSubSet(FlowSet<T> other)
Returns true if theotherFlowSet is a subset ofthisFlowSet.
-
iterator
Iterator<T> 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 doingtoList().iterator().
-
-