public final class TypeComparisonCondition extends VariableConditionAdapter
Modifier and Type | Class and Description |
---|---|
static class |
TypeComparisonCondition.Mode |
Modifier and Type | Field and Description |
---|---|
private TypeResolver |
fst |
private TypeComparisonCondition.Mode |
mode |
private TypeResolver |
snd |
Constructor and Description |
---|
TypeComparisonCondition(TypeResolver fst,
TypeResolver snd,
TypeComparisonCondition.Mode mode)
creates a condition that checks if the declaration types of the
schemavariable's instantiations are unequal
|
Modifier and Type | Method and Description |
---|---|
boolean |
check(SchemaVariable var,
SVSubstitute subst,
SVInstantiations svInst,
Services services)
checks if the condition for a correct instantiation is fulfilled
|
private boolean |
checkDisjointness(Sort fstSort,
Sort sndSort,
Services services)
Checks for disjointness modulo "null".
|
private boolean |
checkSorts(Sort fstSort,
Sort sndSort,
Services services) |
TypeResolver |
getFirstResolver() |
TypeComparisonCondition.Mode |
getMode() |
TypeResolver |
getSecondResolver() |
private static java.lang.Boolean |
lookupInCache(Sort s1,
Sort s2,
ServiceCaches caches) |
private static void |
putIntoCache(Sort s1,
Sort s2,
boolean b,
ServiceCaches caches) |
java.lang.String |
toString() |
check
private final TypeComparisonCondition.Mode mode
private final TypeResolver fst
private final TypeResolver snd
public TypeComparisonCondition(TypeResolver fst, TypeResolver snd, TypeComparisonCondition.Mode mode)
fst
- one of the SchemaVariable whose type is checkedsnd
- one of the SchemaVariable whose type is checkedmode
- an int encoding if testing of not same or not compatiblepublic TypeResolver getFirstResolver()
public TypeResolver getSecondResolver()
public TypeComparisonCondition.Mode getMode()
public boolean check(SchemaVariable var, SVSubstitute subst, SVInstantiations svInst, Services services)
VariableConditionAdapter
check
in class VariableConditionAdapter
var
- the template Variable to be instantiatedsvInst
- the MatchCondition with the current matching state and in particular
the SVInstantiations that are already known to be neededservices
- the program information objectprivate static java.lang.Boolean lookupInCache(Sort s1, Sort s2, ServiceCaches caches)
private static void putIntoCache(Sort s1, Sort s2, boolean b, ServiceCaches caches)
private boolean checkDisjointness(Sort fstSort, Sort sndSort, Services services)
public java.lang.String toString()
toString
in class java.lang.Object