scale.clef
Class PureFunctionAnnotation

java.lang.Object
  extended by scale.annot.Annotation
      extended by scale.clef.PureFunctionAnnotation
All Implemented Interfaces:
DisplayNode

public class PureFunctionAnnotation
extends Annotation

This annotation is used to mark routines as being "pure functions".

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

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

There are various types of "purity". The function

The type of purity is specified as an integer where each bit specifies a type of purity.

This class no longer creates an annotation. It simply sets the information in the declaration of the routine.

See Also:
RoutineDecl

Field Summary
 
Fields inherited from class scale.annot.Annotation
knownAnnotations
 
Method Summary
static java.lang.Object annotationKey()
           
static Annotation create(RoutineDecl declaration, Creator creator, Support support, java.lang.String slevel)
           
 boolean equivalent(Annotation da)
          Return true if the annotations are equivalent.
 java.lang.Object getKey()
          Return the key for this annotation class.
 boolean isUnique()
          Returns a flag indicating if a node is permitted to have multiple instances of this annotation type.
static int pfal0()
          Return the count of functions marked as not pure.
static int pfal1()
          Return the count of functions marked as PUREARGS.
static int pfal2()
          Return the count of functions marked as PUREGV.
static int pfal3()
          Return the count of functions marked as PUREGV & PUREARGS.
static int pfal4()
          Return the count of functions marked as PURESE.
static int pfal5()
          Return the count of functions marked as PURESE & PUREARGS.
static int pfal6()
          Return the count of functions marked as PURESE & PUREGV.
static int pfal7()
          Return the count of functions marked as PURE.
 java.lang.String toStringSpecial()
          Return a string representation of the additioanl internal state of the annotation.
 
Methods inherited from class scale.annot.Annotation
addNode, allAnnotations, allMatchingAnnotations, annotationName, equals, getAnnotation, getCreator, getDisplayColorHint, getDisplayLabel, 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

pfal0

public static int pfal0()
Return the count of functions marked as not pure.


pfal1

public static int pfal1()
Return the count of functions marked as PUREARGS.


pfal2

public static int pfal2()
Return the count of functions marked as PUREGV.


pfal3

public static int pfal3()
Return the count of functions marked as PUREGV & PUREARGS.


pfal4

public static int pfal4()
Return the count of functions marked as PURESE.


pfal5

public static int pfal5()
Return the count of functions marked as PURESE & PUREARGS.


pfal6

public static int pfal6()
Return the count of functions marked as PURESE & PUREGV.


pfal7

public static int pfal7()
Return the count of functions marked as PURE.


create

public static Annotation create(RoutineDecl declaration,
                                Creator creator,
                                Support support,
                                java.lang.String slevel)
                         throws InvalidException
Throws:
InvalidException

equivalent

public boolean equivalent(Annotation da)
Return true if the annotations are equivalent.

Specified by:
equivalent in class Annotation
Parameters:
da - the other annotation

isUnique

public boolean isUnique()
Description copied from class: Annotation
Returns a flag indicating if a node is permitted to have multiple instances of this annotation type.

Specified by:
isUnique in class Annotation
Returns:
true when a node may not have multiple instances of this annotation type

annotationKey

public static java.lang.Object annotationKey()

getKey

public java.lang.Object getKey()
Description copied from class: Annotation
Return the key for this annotation class. Since
    this.annotationKey()
 
returns the wrong key when used in a parent class method, each sub-class must implement a method to return its key.
   public Object getKey()
   {
     return ThisClass.annotationKey();
   }
 

Specified by:
getKey in class Annotation

toStringSpecial

public java.lang.String toStringSpecial()
Description copied from class: Annotation
Return a string representation of the additioanl internal state of the annotation.

Specified by:
toStringSpecial in class Annotation