Package daikon
Class VarComparabilityImplicit
- Object
-
- VarComparability
-
- 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
Fields Modifier and Type Field Description static VarComparabilityImplicit
unknown
-
Fields inherited from class VarComparability
debug, IMPLICIT, NONE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
alwaysComparable()
Returns true if this is comparable to everything else.boolean
baseAlwayscomparable()
VarComparability
elementType()
boolean
equality_set_ok(@GuardSatisfied 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(@GuardSatisfied @Nullable Object o)
boolean
equalsVarComparabilityImplicit(@GuardSatisfied 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
-
-
-
-
Field Detail
-
unknown
public static final VarComparabilityImplicit unknown
-
-
Method Detail
-
hashCode
@Pure public int hashCode(@GuardSatisfied @UnknownSignedness VarComparabilityImplicit this)
-
equals
@EnsuresNonNullIf(result=true, expression="#1") @Pure public boolean equals(@GuardSatisfied VarComparabilityImplicit this, @GuardSatisfied @Nullable Object o)
-
equalsVarComparabilityImplicit
@EnsuresNonNullIf(result=true, expression="#1") @Pure public boolean equalsVarComparabilityImplicit(@GuardSatisfied VarComparabilityImplicit this, @GuardSatisfied VarComparabilityImplicit o)
-
baseAlwayscomparable
public boolean baseAlwayscomparable()
-
alwaysComparable
@Pure public boolean alwaysComparable(@GuardSatisfied VarComparabilityImplicit this)
Description copied from class:VarComparability
Returns true if this is comparable to everything else.- Specified by:
alwaysComparable
in classVarComparability
-
makeAlias
public VarComparability makeAlias()
- Specified by:
makeAlias
in classVarComparability
-
elementType
public VarComparability elementType(@GuardSatisfied @UnknownSignedness VarComparabilityImplicit this)
- Specified by:
elementType
in classVarComparability
-
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 classVarComparability
-
indexType
@Pure public VarComparability indexType(@GuardSatisfied @UnknownSignedness VarComparabilityImplicit this, int dim)
- Specified by:
indexType
in classVarComparability
-
equality_set_ok
public boolean equality_set_ok(@GuardSatisfied VarComparabilityImplicit this, @GuardSatisfied 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 classVarComparability
-
-