scale.score.dependence.omega.omegaLib
Class VarDecl

java.lang.Object
  extended by scale.score.dependence.omega.omegaLib.VarDecl

public final class VarDecl
extends java.lang.Object

Variable declaration.

$Id: VarDecl.java,v 1.12 2005-02-07 21:28:41 burrill Exp $

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

This version of the Omega Libray is a translation from C++ to Java of the Omega Library developed at the University of Maryland.

Copyright (C) 1994-1996 by the Omega Project

All rights reserved.

NOTICE: This software is provided ``as is'', without any warranty, including any implied warranty for merchantability or fitness for a particular purpose. Under no circumstances shall the Omega Project or its agents be liable for any use of, misuse of, or inability to use this software, including incidental and consequential damages.

License is hereby given to use, modify, and redistribute this software, in whole or in part, for any purpose, commercial or non-commercial, provided that the user agrees to the terms of this copyright notice, including disclaimer of warranty, and provided that this copyright notice, including disclaimer of warranty, is preserved in the source code and documentation of anything derived from this software. Any redistributor of this software or anything derived from this software assumes responsibility for ensuring that any parties to whom such a redistribution is made are fully aware of the terms of this license and disclaimer.

The Omega project can be contacted at omega@cs.umd.edu or http://www.cs.umd.edu/projects/omega

Variables are free or quantified. Free variables are classified as input, output and global. Quantified variables are classified as forall, exists and wildcard. All global variables are functions symbols of (possibly 0) arguments Local variables that correspond to >0-ary functions are identified as functions of a prefix of the input, output, or both tuples


Field Summary
static java.lang.String[] argNames
           
static int EXISTS_VAR
           
static int FORALL_VAR
           
static int GLOBAL_VAR
           
static java.lang.String[] greekLetters
           
 int id
           
static int INPUT_TUPLE
           
static int INPUT_VAR
           
static int OUTPUT_TUPLE
           
static int OUTPUT_VAR
           
static int SET_TUPLE
           
static int SET_VAR
           
static java.lang.String[] tupleTypes
           
static int UNKNOWN_TUPLE
           
static java.lang.String[] varTypes
           
static int WILDCARD_VAR
           
 
Constructor Summary
VarDecl(int vkind, int pos)
           
VarDecl(java.lang.String name, GlobalVarDecl v)
           
VarDecl(java.lang.String name, GlobalVarDecl v, int functionOf)
           
VarDecl(java.lang.String name, int vkind, int pos)
           
VarDecl(VarDecl v)
           
 
Method Summary
 java.lang.String baseName()
           
 void changeKind(int newKind)
           
static Vector<VarDecl> copyVarDecls(Vector<VarDecl> vl)
           
static int created()
           
 java.lang.String displayName(OmegaLib omegaLib)
           
 int functionOf()
           
 GlobalVarDecl getGlobalVar()
           
 int getInstance()
           
 int getPosition()
           
 VarDecl getRemap()
           
 boolean hasName()
           
 int kind()
           
 java.lang.String name(OmegaLib omegaLib)
           
 void nameVariable(java.lang.String newName)
           
 void printVarAddrs(java.lang.StringBuffer s)
           
 CoefVarDecl reallyCoefVar()
           
 void resetRemapField(VarDecl v)
           
static void resetRemapField(Vector<VarDecl> c)
           
static void resetRemapField(Vector<VarDecl> c, int nVars)
           
 void setInstance(int instance)
           
 void setKind(int var_kind)
           
 java.lang.String toString()
           
 VarDecl UFOwner()
          Operation to allow the remap field to be used for union-find operations on variables.
 void UFUnion(VarDecl b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INPUT_VAR

public static final int INPUT_VAR
See Also:
Constant Field Values

OUTPUT_VAR

public static final int OUTPUT_VAR
See Also:
Constant Field Values

SET_VAR

public static final int SET_VAR
See Also:
Constant Field Values

GLOBAL_VAR

public static final int GLOBAL_VAR
See Also:
Constant Field Values

FORALL_VAR

public static final int FORALL_VAR
See Also:
Constant Field Values

EXISTS_VAR

public static final int EXISTS_VAR
See Also:
Constant Field Values

WILDCARD_VAR

public static final int WILDCARD_VAR
See Also:
Constant Field Values

varTypes

public static final java.lang.String[] varTypes

UNKNOWN_TUPLE

public static final int UNKNOWN_TUPLE
See Also:
Constant Field Values

INPUT_TUPLE

public static final int INPUT_TUPLE
See Also:
Constant Field Values

OUTPUT_TUPLE

public static final int OUTPUT_TUPLE
See Also:
Constant Field Values

SET_TUPLE

public static final int SET_TUPLE
See Also:
Constant Field Values

tupleTypes

public static final java.lang.String[] tupleTypes

greekLetters

public static final java.lang.String[] greekLetters

argNames

public static final java.lang.String[] argNames

id

public int id
Constructor Detail

VarDecl

public VarDecl(java.lang.String name,
               int vkind,
               int pos)

VarDecl

public VarDecl(int vkind,
               int pos)

VarDecl

public VarDecl(VarDecl v)

VarDecl

public VarDecl(java.lang.String name,
               GlobalVarDecl v)

VarDecl

public VarDecl(java.lang.String name,
               GlobalVarDecl v,
               int functionOf)
Method Detail

created

public static int created()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setInstance

public void setInstance(int instance)

getInstance

public int getInstance()

getRemap

public VarDecl getRemap()

changeKind

public void changeKind(int newKind)

kind

public int kind()

getPosition

public int getPosition()

getGlobalVar

public GlobalVarDecl getGlobalVar()

functionOf

public int functionOf()

reallyCoefVar

public CoefVarDecl reallyCoefVar()

name

public java.lang.String name(OmegaLib omegaLib)

baseName

public java.lang.String baseName()

nameVariable

public void nameVariable(java.lang.String newName)

setKind

public void setKind(int var_kind)

resetRemapField

public void resetRemapField(VarDecl v)

UFOwner

public VarDecl UFOwner()
Operation to allow the remap field to be used for union-find operations on variables. Be sure to reset the remap fields afterward.


UFUnion

public void UFUnion(VarDecl b)

hasName

public boolean hasName()

displayName

public java.lang.String displayName(OmegaLib omegaLib)

printVarAddrs

public void printVarAddrs(java.lang.StringBuffer s)

copyVarDecls

public static Vector<VarDecl> copyVarDecls(Vector<VarDecl> vl)

resetRemapField

public static void resetRemapField(Vector<VarDecl> c)

resetRemapField

public static void resetRemapField(Vector<VarDecl> c,
                                   int nVars)