scale.score.analyses
Class AliasAnnote

java.lang.Object
  extended by scale.annot.Annotation
      extended by scale.score.analyses.AliasAnnote
All Implemented Interfaces:
DisplayNode

public class AliasAnnote
extends Annotation

An annotation to represent alias variables. The alias variables

$Id: AliasAnnote.java,v 1.19 2007-08-27 18:26:51 burrill Exp $

Copyright 2007 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

The alias variables are used by the alias analyzer as an abstraction. We add the alias annotation to each of the declaration nodes in a program.


Field Summary
 
Fields inherited from class scale.annot.Annotation
knownAnnotations
 
Method Summary
static java.lang.Object annotationKey()
          Define a unique key for the annotation which is used for comparisons.
static Annotation create(Declaration n, Creator c, Support s, AliasVar av)
          Create a alias annotation.
static Annotation create(Expr n, Creator c, Support s, AliasVar av)
          Create a alias annotation.
 boolean equivalent(Annotation a)
          Return true if the annotations are equivalent.
 AliasVar getAliasVar()
          Get the alias variable.
 java.lang.String getDisplayLabel()
          Return a String suitable for labeling this node in a graphical display.
 java.lang.Object getKey()
          Return the key for the alias annotation.
 boolean isUnique()
          Indicates that a node is only allowed one instance of this annotation.
 java.lang.String toStringSpecial()
          Return a string representation of the alias annotation.
 
Methods inherited from class scale.annot.Annotation
addNode, allAnnotations, allMatchingAnnotations, annotationName, equals, getAnnotation, getCreator, getDisplayColorHint, getDisplayName, getDisplayShapeHint, getNodeID, getSupport, hasAnnotation, hasEqualAnnotation, hashCode, removeAllAnnotationTables, removeNode, removeNode, sameSupport, toString, toStringAnnotations, toStringClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Annotation create(Expr n,
                                Creator c,
                                Support s,
                                AliasVar av)
Create a alias annotation. The annotation is added the node representing a declaration.

Parameters:
n - is the node to which the annotation will be attached
c - the tool which creates the annotation
s - the support values for the annotation (belief/combination)
av - the alias variable representing the declaration.
Returns:
the new annotation

create

public static Annotation create(Declaration n,
                                Creator c,
                                Support s,
                                AliasVar av)
Create a alias annotation. Used instead of a constructor. The annotation is added the node representing a declaration.

Parameters:
n - is the node to which the annotation will be attached
c - the tool which creates the annotation
s - the support values for the annotation (belief/combination)
av - the alias variable representing the declaration.
Returns:
the new annotation

equivalent

public boolean equivalent(Annotation a)
Description copied from class: Annotation
Return true if the annotations are equivalent. Note - the Creator and the Support are not used in equivalence testing.

Specified by:
equivalent in class Annotation
Parameters:
a - the other annotation
Returns:
true if the annotations are equivalent

getAliasVar

public final AliasVar getAliasVar()
Get the alias variable.

Returns:
the alias variable

isUnique

public boolean isUnique()
Indicates that a node is only allowed one instance of this annotation.

Specified by:
isUnique in class Annotation
Returns:
true

annotationKey

public static java.lang.Object annotationKey()
Define a unique key for the annotation which is used for comparisons.

Returns:
the unique key.

getKey

public java.lang.Object getKey()
Return the key for the alias annotation.

Specified by:
getKey in class Annotation
Returns:
the key for the alias annotation.

toStringSpecial

public java.lang.String toStringSpecial()
Return a string representation of the alias annotation.

Specified by:
toStringSpecial in class Annotation

getDisplayLabel

public java.lang.String getDisplayLabel()
Return a String suitable for labeling this node in a graphical display.

Specified by:
getDisplayLabel in interface DisplayNode
Overrides:
getDisplayLabel in class Annotation