|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectVarComparability
public abstract class VarComparability
Represents the comparability of variables, including methods to determine if two VarComparabilities are comparable. VarComparability types have two formats: implicit and none.
A VarComparabilityImplicit is an arbitrary string, and comparisons succeed exactly if the two VarComparabilitys are identical.
VarComparabilityNone means no comparability information was provided.
| Field Summary | |
|---|---|
static Logger |
debug
Debug tracer. |
static int |
IMPLICIT
|
static int |
NONE
|
| Constructor Summary | |
|---|---|
VarComparability()
|
|
| Method Summary | |
|---|---|
abstract boolean |
alwaysComparable()
Returns true if this is comparable to everything else. |
static boolean |
comparable(VarComparability type1,
VarComparability type2)
Returns whether two comparabilities are comparable. |
static boolean |
comparable(VarInfo v1,
VarInfo v2)
Returns whether two variables are comparable. |
abstract VarComparability |
elementType()
|
boolean |
equality_set_ok(VarComparability other)
In general, if two items are comparable, they can be placed in the same equality set. |
abstract VarComparability |
indexType(int dim)
|
abstract VarComparability |
makeAlias()
|
static VarComparability |
makeAlias(VarInfo vi)
|
static VarComparability |
makeComparabilitySameIndices(String elemTypeName,
VarComparability old)
Create a VarComparability based on comparabilities of indices. |
static VarComparability |
parse(int format,
String rep,
ProglangType vartype)
Create a VarComparability representing the given arguments with respect to a variable. |
abstract VarComparability |
string_length_type()
Return the comparability for the length of this string |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Logger debug
public static final int NONE
public static final int IMPLICIT
| Constructor Detail |
|---|
public VarComparability()
| Method Detail |
|---|
public static VarComparability parse(int format,
String rep,
ProglangType vartype)
format - the type of comparability, either NONE or IMPLICITrep - a regular expression indicating
how to match. The form is "(a)[b][c]..." where each variable is
string (or number) that is a UID for a basic type. a is the type
of the element, b is the type of the first index, c the type of
the second, etc. Index variables only apply if this is an array.vartype - the declared type of the variable
public static VarComparability makeComparabilitySameIndices(String elemTypeName,
VarComparability old)
elemTypeName - the new type of the elements of return value.old - the varcomparability that this is derived from; has
the same indices as this.
public static VarComparability makeAlias(VarInfo vi)
public abstract VarComparability makeAlias()
public abstract VarComparability elementType()
public abstract VarComparability indexType(int dim)
public abstract VarComparability string_length_type()
public abstract boolean alwaysComparable()
public static boolean comparable(VarInfo v1,
VarInfo v2)
public static boolean comparable(VarComparability type1,
VarComparability type2)
public boolean equality_set_ok(VarComparability other)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||