Package soot.jimple.toolkits.scalar
Class ToppedSet<T>
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowSet<T>
-
- soot.jimple.toolkits.scalar.ToppedSet<T>
-
public class ToppedSet<T> extends AbstractFlowSet<T>
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.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisTopprotected FlowSet<T>underlyingSet
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T obj)Addsobjtothis.voidclear()implemented, but *very* inefficient.ToppedSet<T>clone()Clones the current FlowSet.booleancontains(T obj)Returns true if this FlowSet containsobj.voidcopy(FlowSet<T> d)Copies the current FlowSet into dest.voiddifference(FlowSet<T> o, FlowSet<T> d)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.FlowSet<T>emptySet()implemented, but inefficient.booleanequals(Object obj)inthashCode()voidintersection(FlowSet<T> o, FlowSet<T> d)Returns the intersection (meet) of this FlowSet andother, putting result intodest.booleanisEmpty()Returns true if this FlowSet is the empty set.booleanisTop()Iterator<T>iterator()returns an iterator over the elements of the flowSet.voidremove(T obj)Removesobjfromthis.voidsetTop(boolean top)intsize()Returns the size of the current FlowSet.List<T>toList()Returns an unbacked list of contained objects for this FlowSet.StringtoString()voidunion(FlowSet<T> o, FlowSet<T> d)Returns the union (join) of this FlowSet andother, putting result intodest.-
Methods inherited from class soot.toolkits.scalar.AbstractFlowSet
add, difference, intersection, isSubSet, remove, union
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface soot.toolkits.scalar.FlowSet
copyFreshToExisting
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
clone
public ToppedSet<T> clone()
Description copied from interface:FlowSetClones the current FlowSet.
-
copy
public void copy(FlowSet<T> d)
Description copied from interface:FlowSetCopies the current FlowSet into dest.
-
emptySet
public FlowSet<T> emptySet()
Description copied from class:AbstractFlowSetimplemented, but inefficient.
-
clear
public void clear()
Description copied from class:AbstractFlowSetimplemented, but *very* inefficient.
-
union
public void union(FlowSet<T> o, FlowSet<T> d)
Description copied from interface:FlowSetReturns the union (join) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.
-
intersection
public void intersection(FlowSet<T> o, FlowSet<T> d)
Description copied from interface:FlowSetReturns the intersection (meet) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.- Specified by:
intersectionin interfaceFlowSet<T>- Overrides:
intersectionin classAbstractFlowSet<T>
-
difference
public void difference(FlowSet<T> o, FlowSet<T> d)
Description copied from interface:FlowSetReturns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.- Specified by:
differencein interfaceFlowSet<T>- Overrides:
differencein classAbstractFlowSet<T>
-
isEmpty
public boolean isEmpty()
Description copied from interface:FlowSetReturns true if this FlowSet is the empty set.
-
size
public int size()
Description copied from interface:FlowSetReturns the size of the current FlowSet.
-
contains
public boolean contains(T obj)
Description copied from interface:FlowSetReturns true if this FlowSet containsobj.
-
toList
public List<T> toList()
Description copied from interface:FlowSetReturns an unbacked list of contained objects for this FlowSet.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractFlowSet<T>
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractFlowSet<T>
-
toString
public String toString()
- Overrides:
toStringin classAbstractFlowSet<T>
-
iterator
public Iterator<T> iterator()
Description copied from interface:FlowSetreturns 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().
-
setTop
public void setTop(boolean top)
-
isTop
public boolean isTop()
-
-