forked from JavaTX/JavaCompilerCore
commenting
This commit is contained in:
parent
8b6a4d1746
commit
f8d7a95731
@ -1,22 +1,42 @@
|
|||||||
package de.dhbwstuttgart.typeinference.unify.model;
|
package de.dhbwstuttgart.typeinference.unify.model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Operators of pairs of the unification.
|
||||||
|
* @author Florian Steurer
|
||||||
|
*/
|
||||||
public enum PairOperator {
|
public enum PairOperator {
|
||||||
|
/**
|
||||||
|
* The smaller operator (T < P) is used to express a subtyping relation between
|
||||||
|
* T and P for example in the finite closure. It is necessarily true.
|
||||||
|
*/
|
||||||
SMALLER,
|
SMALLER,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The smallerdot operator (T <. P) is used to express a subtyping relation between
|
||||||
|
* of T and P in a CONSTRAINT during the unification. It is not necessarily true.
|
||||||
|
*/
|
||||||
SMALLERDOT,
|
SMALLERDOT,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The smallerdot operator for arguments (T <.? P) is used to express that
|
||||||
|
* T is an element of smArg(P) (or P is an element of grArg(T)) in a CONSTRAINT
|
||||||
|
* during the unification. It is not necessarily true.
|
||||||
|
*/
|
||||||
SMALLERDOTWC,
|
SMALLERDOTWC,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The equalsdot operator (T =. P) is used to express that two types during the unification
|
||||||
|
* should be equal. It is not necessarily true.
|
||||||
|
*/
|
||||||
EQUALSDOT;
|
EQUALSDOT;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case SMALLER:
|
case SMALLER: return "<";
|
||||||
return "<";
|
case SMALLERDOT: return "<.";
|
||||||
case SMALLERDOT:
|
case SMALLERDOTWC: return "<.?";
|
||||||
return "<.";
|
default: return "=."; // EQUALSDOT
|
||||||
case SMALLERDOTWC:
|
|
||||||
return "<.?";
|
|
||||||
default:
|
|
||||||
return "=.";
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user