|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.DisjointSet scale.alias.steensgaard.ECR
public class ECR
A class which represents an Equivalence Class Representative (ECR) with associated type information.
$Id: ECR.java,v 1.43 2005-06-15 04:17:05 asmith Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The ECR is an extension of a fast union/find data structure.
Field Summary | |
---|---|
static boolean |
classTrace
True if traces are to be performed. |
Constructor Summary | |
---|---|
ECR()
Create an Equivalence Class Representative (ECR) that is associated with the BOTTOM type (upside down T). |
|
ECR(AliasType type,
TypeVar var)
Create a new Equivalence Class Representative (ECR) with a given type. |
Method Summary | |
---|---|
void |
addECRs(Vector<ECR> v)
Add the list of elements represented by this disjoint set to the vector. |
void |
cjoin(ECR e)
A conditional join of two ECRs. |
void |
cleanup()
Remove any un-needed stuff after analysis has been performed. |
static int |
created()
Return the current number of instances of this class. |
int |
getID()
Return the unique identifier number representing the ECR. |
int |
getsetID()
Return the set representative identifier number for the ECR. |
AliasType |
getType()
Return the type associated with the ECR. |
TypeVar |
getTypeVar()
Return the type variable that is represented by this ECR. |
void |
join(ECR e)
Join the types represented by this ECR and the specified ECR. |
static void |
nextVisit()
Set up for a new points-to graph traversal - that is, use the next color va * lue. |
void |
setType(AliasType t)
Set the type of the ECR. |
void |
setVisited()
Associate the current color value with an ECR. |
java.lang.String |
toString()
Return a string representation of an ECR. |
java.lang.String |
toStringShort()
Return a string representation of an ECR. |
void |
unionPendingSets(ECR e1,
ECR e2)
Create a new pending set which is the union of the pending sets from two other ECRs. |
boolean |
visited()
Return true if this Chord has been visited during the current visit. |
Methods inherited from class scale.common.DisjointSet |
---|
addElements, equivalent, find, getElement, getElements, isRepresentative, size, union |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean classTrace
Constructor Detail |
---|
public ECR()
public ECR(AliasType type, TypeVar var)
type
- the initial type of the ECR.var
- the variable that this ECR represents.Method Detail |
---|
public static int created()
public final AliasType getType()
public final int getID()
public final int getsetID()
public final TypeVar getTypeVar()
public void addECRs(Vector<ECR> v)
public final void unionPendingSets(ECR e1, ECR e2)
e1
- an ECR containing a pending set to be unionede2
- an ECR containing a pending set to be unionedpublic final void cjoin(ECR e)
e
- the given ECR.public final void join(ECR e)
e
- the specified ECR.public final void setType(AliasType t)
t
- the type.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringShort()
public static void nextVisit()
public void setVisited()
public boolean visited()
public void cleanup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |