public class PointsToDomain extends java.util.LinkedHashMap<Symbol,java.util.HashSet<PointsToRel>> implements Domain
Implements the domain interface used by Cetus analysis passes for easier flexibility and sharing between passes. Specifically implements the merge, union, diff, intersect, kill and clone functionality.
Relationships inside of this domain are represented by
PointsToRel
.
PointsToRel
,
Domain
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
PointsToDomain.Universe
The Universe Domain is associated with the Points-To Domain
and hence the points-to analyzer.
|
Constructor and Description |
---|
PointsToDomain()
Create an empty Domain constructor
|
PointsToDomain(PointsToRel p_rel)
Create a domain with a single pointer relationship
|
Modifier and Type | Method and Description |
---|---|
void |
addRel(PointsToRel p_rel)
Add relationship to this domain
|
PointsToDomain |
clone()
Provides deep clone
|
boolean |
containsPTR(PointsToRel ptr)
Checks if the specified points-to relation is found.
|
Domain |
diffStrong(Domain other)
Returns a subtraction of the relationships that are
identical in the other domain.
|
Domain |
diffWeak(Domain other)
Not supported
|
boolean |
equals(Domain other)
Compares equality based on set comparison for
set of PointsToRel
|
Domain |
intersect(Domain other)
Extract all pointer relationships that are
identical in the other points-to domain and
return a domain representing the intersection
|
void |
kill(java.util.Set<Symbol> vars)
Not supported
|
Domain |
killSet(java.util.Set<Symbol> exps)
Provides a new Points-to domain that contains all
the pointer relationships for the symbols
provided as input to the kill Set.
|
Domain |
merge(Domain other)
Merge this domain with another.
|
static Domain |
merge(Domain s1,
Domain s2)
Static method to merge two Points-to domains.
|
java.lang.String |
toString() |
java.lang.String |
toString2() |
Domain |
union(Domain other)
Union two points-to domains.
|
public PointsToDomain()
public PointsToDomain(PointsToRel p_rel)
p_rel
- public PointsToDomain clone()
clone
in interface Domain
clone
in class java.util.HashMap<Symbol,java.util.HashSet<PointsToRel>>
public boolean equals(Domain other)
public void addRel(PointsToRel p_rel)
p_rel
- Relationship to be addedpublic Domain union(Domain other)
public static Domain merge(Domain s1, Domain s2)
s1
- First domain in the merges2
- Second domain in the mergepublic Domain intersect(Domain other)
public Domain diffStrong(Domain other)
diffStrong
in interface Domain
other
- the domain to be subtracted.public void kill(java.util.Set<Symbol> vars)
public Domain killSet(java.util.Set<Symbol> exps)
exps
- Symbols whose relationships must be killedpublic java.lang.String toString2()
public java.lang.String toString()
toString
in class java.util.AbstractMap<Symbol,java.util.HashSet<PointsToRel>>
public boolean containsPTR(PointsToRel ptr)