daikon
Class VarComparabilityImplicit

Object
  extended by VarComparability
      extended by VarComparabilityImplicit
All Implemented Interfaces:
Serializable

public final class VarComparabilityImplicit
extends VarComparability
implements Serializable

A VarComparabilityImplicit is an arbitrary integer, and comparisons succeed exactly if the two integers are equal, except that negative integers compare equal to everything. Alternately, for an array variable, a VarComparabilityImplicit may separately indicate comparabilities for the elements and indices.

 VarComparabilityImplicit ::= int
                            | VarComparabilityImplicit "[" int "]"
 

This is called "implicit" because the comparability objects do not refer to one another or refer directly to variables; whether two variables are comparable depends on their comparability objects. Implicit comparability has the flavor of types in programming languages.

Soon, this will probably be modified to permit the group identifiers to be arbitrary strings (not containing square brackets) instead of arbitrary integers.

See Also:
Serialized Form

Field Summary
static VarComparabilityImplicit unknown
           
 
Fields inherited from class VarComparability
debug, IMPLICIT, NONE
 
Method Summary
 boolean alwaysComparable()
          Returns true if this is comparable to everything else.
 boolean baseAlwayscomparable()
           
 VarComparability elementType()
           
 boolean equality_set_ok(VarComparability other)
          Same as comparable, except that variables that are comparable to everything (negative comparability value) can't be included in the same equality set as those with positive values.
 boolean equals(Object o)
           
 boolean equals(VarComparabilityImplicit o)
           
 int hashCode()
           
 VarComparability indexType(int dim)
           
 VarComparability makeAlias()
           
 VarComparability string_length_type()
          Determines the comparability of the length of this string.
 String toString()
           
 
Methods inherited from class VarComparability
comparable, comparable, makeAlias, makeComparabilitySameIndices, parse
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

unknown

public static final VarComparabilityImplicit unknown
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

equals

public boolean equals(VarComparabilityImplicit o)

baseAlwayscomparable

public boolean baseAlwayscomparable()

alwaysComparable

public boolean alwaysComparable()
Description copied from class: VarComparability
Returns true if this is comparable to everything else.

Specified by:
alwaysComparable in class VarComparability

makeAlias

public VarComparability makeAlias()
Specified by:
makeAlias in class VarComparability

elementType

public VarComparability elementType()
Specified by:
elementType in class VarComparability

string_length_type

public VarComparability string_length_type()
Determines the comparability of the length of this string. Currently always returns unknown, but it would be best if string lengths were only comparable with other string lengths (or perhaps nothing)

Specified by:
string_length_type in class VarComparability

indexType

public VarComparability indexType(int dim)
Specified by:
indexType in class VarComparability

equality_set_ok

public boolean equality_set_ok(VarComparability other)
Same as comparable, except that variables that are comparable to everything (negative comparability value) can't be included in the same equality set as those with positive values.

Overrides:
equality_set_ok in class VarComparability

toString

public String toString()
Overrides:
toString in class Object