Package soot.jimple.spark.sets
Class DoublePointsToSet
- java.lang.Object
-
- soot.jimple.spark.sets.PointsToSetInternal
-
- soot.jimple.spark.sets.DoublePointsToSet
-
- All Implemented Interfaces:
EqualsSupportingPointsToSet,PointsToSet
public class DoublePointsToSet extends PointsToSetInternal
Implementation of points-to set that holds two sets: one for new elements that have not yet been propagated, and the other for elements that have already been propagated.- Author:
- Ondrej Lhotak
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class soot.jimple.spark.sets.PointsToSetInternal
PointsToSetInternal.P2SetVisitorDefaultTrue, PointsToSetInternal.P2SetVisitorInt
-
-
Field Summary
Fields Modifier and Type Field Description protected PointsToSetInternalnewSetprotected PointsToSetInternaloldSet-
Fields inherited from class soot.jimple.spark.sets.PointsToSetInternal
type
-
-
Constructor Summary
Constructors Constructor Description DoublePointsToSet(Type type, PAG pag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Node n)Adds n to this set, returns true if n was not already in this set.booleanaddAll(PointsToSetInternal other, PointsToSetInternal exclude)Adds contents of other into this set, returns true if this set changed.booleancontains(Node n)Returns true iff the set contains n.voidflushNew()Sets all newly-added nodes to old nodes.booleanforall(P2SetVisitor v)Calls v's visit method on all nodes in this set.static P2SetFactorygetFactory(P2SetFactory newFactory, P2SetFactory oldFactory)PointsToSetInternalgetNewSet()Returns set of newly-added nodes since last call to flushNew.PointsToSetInternalgetOldSet()Returns set of nodes already present before last call to flushNew.booleanhasNonEmptyIntersection(PointsToSet other)Returns true if this set shares some objects with other.booleanisEmpty()Returns true if this set contains no run-time objects.voidmergeWith(PointsToSetInternal other)Merges other into this set.Set<Type>possibleTypes()Set of all possible run-time types of objects in the set.voidunFlushNew()Sets all nodes to newly-added nodes.-
Methods inherited from class soot.jimple.spark.sets.PointsToSetInternal
getBitMask, getType, pointsToSetEquals, pointsToSetHashCode, possibleClassConstants, possibleStringConstants, setType, size, toString
-
-
-
-
Field Detail
-
newSet
protected PointsToSetInternal newSet
-
oldSet
protected PointsToSetInternal oldSet
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Returns true if this set contains no run-time objects.
-
hasNonEmptyIntersection
public boolean hasNonEmptyIntersection(PointsToSet other)
Returns true if this set shares some objects with other.- Specified by:
hasNonEmptyIntersectionin interfacePointsToSet- Overrides:
hasNonEmptyIntersectionin classPointsToSetInternal
-
possibleTypes
public Set<Type> possibleTypes()
Set of all possible run-time types of objects in the set.- Specified by:
possibleTypesin interfacePointsToSet- Overrides:
possibleTypesin classPointsToSetInternal
-
addAll
public boolean addAll(PointsToSetInternal other, PointsToSetInternal exclude)
Adds contents of other into this set, returns true if this set changed.- Overrides:
addAllin classPointsToSetInternal
-
forall
public boolean forall(P2SetVisitor v)
Calls v's visit method on all nodes in this set.- Specified by:
forallin classPointsToSetInternal
-
add
public boolean add(Node n)
Adds n to this set, returns true if n was not already in this set.- Specified by:
addin classPointsToSetInternal
-
getOldSet
public PointsToSetInternal getOldSet()
Returns set of nodes already present before last call to flushNew.- Overrides:
getOldSetin classPointsToSetInternal
-
getNewSet
public PointsToSetInternal getNewSet()
Returns set of newly-added nodes since last call to flushNew.- Overrides:
getNewSetin classPointsToSetInternal
-
flushNew
public void flushNew()
Sets all newly-added nodes to old nodes.- Overrides:
flushNewin classPointsToSetInternal
-
unFlushNew
public void unFlushNew()
Sets all nodes to newly-added nodes.- Overrides:
unFlushNewin classPointsToSetInternal
-
mergeWith
public void mergeWith(PointsToSetInternal other)
Merges other into this set.- Overrides:
mergeWithin classPointsToSetInternal
-
contains
public boolean contains(Node n)
Returns true iff the set contains n.- Specified by:
containsin classPointsToSetInternal
-
getFactory
public static P2SetFactory getFactory(P2SetFactory newFactory, P2SetFactory oldFactory)
-
-