Package qilin.core.sets
Class DoublePointsToSet
java.lang.Object
qilin.core.sets.PointsToSetInternal
qilin.core.sets.DoublePointsToSet
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int idx) Adds n to this set, returns true if idx was not already in this set.booleanaddAll(PointsToSetInternal other, PointsToSetInternal exclude) Adds contents of other into this set, returns true if this set changed.voidclear()booleancontains(int idx) Returns true iff the set contains idx.voidflushNew()Sets all newly-added nodes to old nodes.booleanCalls v's visit method on all nodes in this set.Returns set of newly-added nodes since last call to flushNew.Returns set of nodes already present before last call to flushNew.booleanReturns true if this set shares some objects with other.booleanisEmpty()Returns true if this set contains no run-time objects.iterator()intsize()
-
Field Details
-
newSet
-
oldSet
-
-
Constructor Details
-
DoublePointsToSet
public DoublePointsToSet()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns true if this set contains no run-time objects.- Specified by:
isEmptyin classPointsToSetInternal
-
hasNonEmptyIntersection
Returns true if this set shares some objects with other.- Overrides:
hasNonEmptyIntersectionin classPointsToSetInternal
-
size
public int size()- Specified by:
sizein classPointsToSetInternal
-
iterator
- Specified by:
iteratorin classPointsToSetInternal
-
clear
public void clear()- Specified by:
clearin classPointsToSetInternal
-
addAll
Adds contents of other into this set, returns true if this set changed.- Specified by:
addAllin classPointsToSetInternal
-
forall
Calls v's visit method on all nodes in this set.- Specified by:
forallin classPointsToSetInternal
-
add
public boolean add(int idx) Adds n to this set, returns true if idx was not already in this set.- Specified by:
addin classPointsToSetInternal
-
getOldSet
Returns set of nodes already present before last call to flushNew. -
getNewSet
Returns set of newly-added nodes since last call to flushNew. -
getNewSetCopy
-
flushNew
public void flushNew()Sets all newly-added nodes to old nodes. -
contains
public boolean contains(int idx) Returns true iff the set contains idx.- Specified by:
containsin classPointsToSetInternal
-