Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: mlsub/typing/lowlevel/Kind.java


1   /**************************************************************************/
2   /*                           B O S S A                                    */
3   /*        A simple imperative object-oriented research language           */
4   /*                   (c)  Daniel Bonniot 1999                             */
5   /*                                                                        */
6   /*  This program is free software; you can redistribute it and/or modify  */
7   /*  it under the terms of the GNU General Public License as published by  */
8   /*  the Free Software Foundation; either version 2 of the License, or     */
9   /*  (at your option) any later version.                                   */
10  /*                                                                        */
11  /**************************************************************************/
12  
13  // File    : Kind.java
14  // Created : Wed Jul 28 14:53:22 1999 by bonniot
15  //$Modified: Wed Aug 02 16:51:36 2000 by Daniel Bonniot $
16  
17  package mlsub.typing.lowlevel;
18  
19  /** Something that knows how to assert constraints on objects of this "Kind"
20   * 
21   * (implemented by Variance, Low level constraints... )
22   * 
23   * @author bonniot
24   */
25  public interface Kind
26  {
27    /** Asserts that two elements are in a certain order
28     * 
29     * @exception Unsatisfiable 
30     * @param e1 The smaller element
31     * @param e2 The greater element
32     */
33    void leq(Element e1, Element e2) throws Unsatisfiable;
34    void leq(Element e1, Element e2, boolean initial) throws Unsatisfiable;
35  
36    /** Introduce a new Element of this kind
37     * 
38     * @param e 
39     */
40    void register(Element e);
41  
42    /**
43       Return a fresh monotype of this kind, or null if that does not make sense.
44  
45       This makes a dependancy from mlsub.typing.lowlevel to mlsub.typing,
46       but they are likely to be used together anyway.
47    */
48    mlsub.typing.Monotype freshMonotype();
49  }