| java.lang.Object mlsub.typing.lowlevel.Engine
Engine | abstract public class Engine (Code) | | Public interface to the lowlevel constraint implication checker.
All accesses are done through this Engine.
author: bonniot |
Inner Class :final public static class Constraint implements Kind | |
Method Summary | |
public static void | backtrack(boolean tentative, boolean commit) | public static Element | canonify(Element e) Return the element e is equivalent to after simplification. | public static void | createInitialContext() | public static void | enter(boolean tentative) Enters a new typing context. | public static void | forceKind(Element element, Kind k) Doesn't check kinding. | public static Engine.Constraint | getConstraint(Kind kind) | public static void | implies() Rigidify the current constraint. | static boolean | isFreeUpwards(Element e) | public static boolean | isInRigidContext() | public static boolean | isRigid(Element e) | public static void | leave(boolean tentative, boolean commit) Returns to the state we had before the last 'enter'. | public static void | leq(Element[] e1, Element[] e2) Iterates leq on two collections of Element. | final public static void | leq(Element e1, Element e2) | final public static void | leq(Element e1, Element e2, boolean initial) Asserts that elements have some ordering relation. | public static Iterator | listConstraints() | public static void | register(Element e) Prepare a new Element to be used. | public static void | releaseInitialContext() | public static void | reset() Return to the initial virgin state. | public static void | satisfy() Used in Polytype.simplify(). | public static void | setKind(Element element, Kind k) | public static void | setTop(Element top) | public static void | simplify(ArrayList binders, ArrayList atoms) Return the simplified constraint. | public static void | startSimplify() | public static void | stopSimplify() | public static void | tag(Element e, int variance) |
INVALID | final public static int INVALID(Code) | | |
dbg | public static boolean dbg(Code) | | |
backtrack | public static void backtrack(boolean tentative, boolean commit)(Code) | | |
canonify | public static Element canonify(Element e)(Code) | | Return the element e is equivalent to after simplification.
|
enter | public static void enter(boolean tentative)(Code) | | Enters a new typing context.
If an enter() completed successfully,
a matching leave() MUST be issued some time later by the caller.
|
implies | public static void implies() throws Unsatisfiable(Code) | | Rigidify the current constraint.
This means that no further assumptions will be made on it.
exception: Unsatisfiable - if the current context was not well kinded. |
isInRigidContext | public static boolean isInRigidContext()(Code) | | |
leave | public static void leave(boolean tentative, boolean commit) throws Unsatisfiable(Code) | | Returns to the state we had before the last 'enter'.
exception: Unsatisfiable - if the constraint was not satisfiable. |
leq | final public static void leq(Element e1, Element e2, boolean initial) throws Unsatisfiable(Code) | | Asserts that elements have some ordering relation.
Parameters: e1 - a value of type 'Element' Parameters: e2 - a value of type 'Element' exception: Unsatisfiable - if the constraint is not satisfiable.However this fact may also be discovered later. |
register | public static void register(Element e)(Code) | | Prepare a new Element to be used.
|
releaseInitialContext | public static void releaseInitialContext()(Code) | | |
reset | public static void reset()(Code) | | Return to the initial virgin state.
|
simplify | public static void simplify(ArrayList binders, ArrayList atoms)(Code) | | Return the simplified constraint.
Must be surrounded by startSimplify and stopSimplify.
|
startSimplify | public static void startSimplify()(Code) | | |
stopSimplify | public static void stopSimplify()(Code) | | |
tag | public static void tag(Element e, int variance)(Code) | | Simplification
|
|
|