ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

escjava.ast
Class Utils

java.lang.Object
  extended byescjava.ast.Utils

public final class Utils
extends java.lang.Object


Nested Class Summary
static class Utils.BooleanDecoration
           
 
Field Summary
private static Utils.BooleanDecoration allocatesDecoration
           
static ASTDecoration allSpecs
           
static ASTDecoration axiomDecoration
           
static Utils.BooleanDecoration ensuresDecoration
           
static ASTDecoration exceptionDecoration
           
private static Utils.BooleanDecoration functionDecoration
           
private static Utils.BooleanDecoration immutableDecoration
           
static ASTDecoration inheritedSpecs
           
static ASTDecoration owningDecl
           
private static Utils.BooleanDecoration pureDecoration
           
static ASTDecoration representsDecoration
           
 
Constructor Summary
Utils()
           
 
Method Summary
static ModifierPragmaVec addInheritedSpecs(RoutineDecl rd, ModifierPragmaVec mp)
           
static ModifierPragma findModifierPragma(GenericVarDecl vdecl, int tag)
          Finds and returns the first modifier pragma of vdecl that has the tag tag, if any.
static ModifierPragma findModifierPragma(ModifierPragmaVec mp, int tag)
           
static ModifierPragma findPurePragma(RoutineDecl rd)
           
static ModifierPragmaVec getAllSpecs(RoutineDecl rd)
           
static ModifierPragmaVec getInheritedSpecs(RoutineDecl rd)
           
static boolean isAllocates(RoutineDecl rd)
           
static boolean isFunction(RoutineDecl rd)
           
static boolean isImmutable(TypeDecl cd)
           
static boolean isModel(Expr e)
           
static boolean isModel(FieldDecl fd)
           
static boolean isModel(ModifierPragmaVec m)
           
static boolean isPure(RoutineDecl rd)
           
static void removeModifierPragma(GenericVarDecl vdecl, int tag)
           
static void removeModifierPragma(ModifierPragmaVec p, int tag)
           
static void setPure(RoutineDecl rd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pureDecoration

private static Utils.BooleanDecoration pureDecoration

immutableDecoration

private static final Utils.BooleanDecoration immutableDecoration

ensuresDecoration

public static final Utils.BooleanDecoration ensuresDecoration

allocatesDecoration

private static final Utils.BooleanDecoration allocatesDecoration

functionDecoration

private static final Utils.BooleanDecoration functionDecoration

exceptionDecoration

public static final ASTDecoration exceptionDecoration

axiomDecoration

public static final ASTDecoration axiomDecoration

representsDecoration

public static final ASTDecoration representsDecoration

owningDecl

public static final ASTDecoration owningDecl

allSpecs

public static final ASTDecoration allSpecs

inheritedSpecs

public static final ASTDecoration inheritedSpecs
Constructor Detail

Utils

public Utils()
Method Detail

findModifierPragma

public static ModifierPragma findModifierPragma(GenericVarDecl vdecl,
                                                int tag)
Finds and returns the first modifier pragma of vdecl that has the tag tag, if any. If none, returns null.

Note, if you want to know whether a variable is non_null, use method NonNullPragma instead, for it properly handles inheritance of non_null pragmas.


findModifierPragma

public static ModifierPragma findModifierPragma(ModifierPragmaVec mp,
                                                int tag)

removeModifierPragma

public static void removeModifierPragma(GenericVarDecl vdecl,
                                        int tag)

removeModifierPragma

public static void removeModifierPragma(ModifierPragmaVec p,
                                        int tag)

isModel

public static boolean isModel(FieldDecl fd)

isModel

public static boolean isModel(ModifierPragmaVec m)

isModel

public static boolean isModel(Expr e)

isPure

public static boolean isPure(RoutineDecl rd)

setPure

public static void setPure(RoutineDecl rd)

findPurePragma

public static ModifierPragma findPurePragma(RoutineDecl rd)

isImmutable

public static boolean isImmutable(TypeDecl cd)

isAllocates

public static boolean isAllocates(RoutineDecl rd)

isFunction

public static boolean isFunction(RoutineDecl rd)

getAllSpecs

public static ModifierPragmaVec getAllSpecs(RoutineDecl rd)

getInheritedSpecs

public static ModifierPragmaVec getInheritedSpecs(RoutineDecl rd)

addInheritedSpecs

public static ModifierPragmaVec addInheritedSpecs(RoutineDecl rd,
                                                  ModifierPragmaVec mp)

ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage