01: /**************************************************************************/
02: /* B O S S A */
03: /* A simple imperative object-oriented research language */
04: /* (c) Daniel Bonniot 1999 */
05: /* */
06: /* This program is free software; you can redistribute it and/or modify */
07: /* it under the terms of the GNU General Public License as published by */
08: /* the Free Software Foundation; either version 2 of the License, or */
09: /* (at your option) any later version. */
10: /* */
11: /**************************************************************************/package mlsub.compilation;
12:
13: import java.util.*;
14:
15: /**
16: * The smallest unit that can be compiled independantly.
17: *
18: * @author Daniel Bonniot
19: */
20:
21: public interface Module {
22: /** Returns the list of Modules this modules depends on. */
23: List getRequirements();
24:
25: /** Creates the scope. */
26: void scope();
27:
28: /** Resolve scoping and load the constants in the context. */
29: void load();
30:
31: /** Resolve scoping for entities that need the global context. */
32: void typedResolve();
33:
34: /** Resolve local entities, that might increase the global context. */
35: void localResolve();
36:
37: /** Check types. */
38: void typecheck();
39:
40: /** Compile the module.
41:
42: This may involve:
43: - code generation
44: - saving the interface of the module
45: */
46: void compile();
47:
48: void link();
49:
50: /** Returns the name of this module. */
51: String getName();
52:
53: /** The date of the last modification of this module. */
54: long lastModification();
55:
56: // should be "static"
57: void freezeGlobalContext();
58:
59: void unfreezeGlobalContext();
60: }
|