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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int idx) Adds n to this set, returns true if idx was not already in this set.boolean
addAll
(PointsToSetInternal other, PointsToSetInternal exclude) Adds contents of other into this set, returns true if this set changed.void
clear()
boolean
contains
(int idx) Returns true iff the set contains idx.void
flushNew()
Sets all newly-added nodes to old nodes.boolean
Calls 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.boolean
Returns true if this set shares some objects with other.boolean
isEmpty()
Returns true if this set contains no run-time objects.iterator()
int
size()
-
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:
isEmpty
in classPointsToSetInternal
-
hasNonEmptyIntersection
Returns true if this set shares some objects with other.- Overrides:
hasNonEmptyIntersection
in classPointsToSetInternal
-
size
public int size()- Specified by:
size
in classPointsToSetInternal
-
iterator
- Specified by:
iterator
in classPointsToSetInternal
-
clear
public void clear()- Specified by:
clear
in classPointsToSetInternal
-
addAll
Adds contents of other into this set, returns true if this set changed.- Specified by:
addAll
in classPointsToSetInternal
-
forall
Calls v's visit method on all nodes in this set.- Specified by:
forall
in classPointsToSetInternal
-
add
public boolean add(int idx) Adds n to this set, returns true if idx was not already in this set.- Specified by:
add
in 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:
contains
in classPointsToSetInternal
-