scale.alias.shapirohorowitz
Class LocationTypeCat

java.lang.Object
  extended by scale.alias.steensgaard.AliasType
      extended by scale.alias.shapirohorowitz.LocationTypeCat

public class LocationTypeCat
extends AliasType

This class extends the superclass AliasType.

$Id: LocationTypeCat.java,v 1.11 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.

It is very similar to the class LocationType. The principal difference between the two classes is the vector of ECRs that it points off to , as opposed to a single location/function type. In theory, this class contains a vector of ECRs representing ValueTypes. In practice, instead of maintaining a field with the ValueType, we expose the location and function fields of the ValueType in this class in order to improve efficiency.

See Also:
LocationType, ValueTypeCat, FunctionTypeCat

Field Summary
 
Fields inherited from class scale.alias.steensgaard.AliasType
BOT
 
Constructor Summary
LocationTypeCat(int categories)
          Create a new location type.
LocationTypeCat(Vector<ECR> l, Vector<ECR> f)
          Create a location type with an initial value.
 
Method Summary
 void cleanup()
          Remove any un-needed stuff after analysis has been performed.
 ECR getFunction(int index)
          Return the ECR that represents the pointed-to function at specified index
 Vector<ECR> getFunctions()
          return the function vector
 ECR getLocation(int index)
          Return the ECR that represents the pointed-to location at specified index.
 Vector<ECR> getLocations()
          return the location vector
 Vector<ECR> pointsTo()
          Return the list of ECRs that this location type represents.
 java.lang.String toStringSpecial()
          Return a string representing of a location type.
 void unify(AliasType t)
          Recursively join two location types.
 
Methods inherited from class scale.alias.steensgaard.AliasType
getNodeID, pointsToSize, toString, toStringClass, toStringShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationTypeCat

public LocationTypeCat(int categories)
Create a new location type. The initial values of the location and function types are ECRs that represent the BOTTOM type.


LocationTypeCat

public LocationTypeCat(Vector<ECR> l,
                       Vector<ECR> f)
Create a location type with an initial value.

Parameters:
l - the vector of ECRs representing locations.
f - the vector of ECRs representing functions.
Method Detail

getLocation

public final ECR getLocation(int index)
Return the ECR that represents the pointed-to location at specified index.

Returns:
the ECR that represents the pointed-to location at specified index.

getFunction

public final ECR getFunction(int index)
Return the ECR that represents the pointed-to function at specified index

Returns:
the ECR that represents the pointed-to function at specified index

unify

public final void unify(AliasType t)
Recursively join two location types.

Overrides:
unify in class AliasType
Parameters:
t - a location type.

pointsTo

public Vector<ECR> pointsTo()
Return the list of ECRs that this location type represents.

Overrides:
pointsTo in class AliasType
Returns:
the list of ECRs that this location type represents.

getLocations

public Vector<ECR> getLocations()
return the location vector


getFunctions

public Vector<ECR> getFunctions()
return the function vector


toStringSpecial

public java.lang.String toStringSpecial()
Return a string representing of a location type.

Overrides:
toStringSpecial in class AliasType
Returns:
a string representing of a location type.

cleanup

public void cleanup()
Remove any un-needed stuff after analysis has been performed.

Overrides:
cleanup in class AliasType