
This package contains the support code for the project.  The
configuration file sources.cm contains a brief explanation of the
purposes of the support files, and a listing of the signatures and/or
modules that each file provides.

The relevant sources for the elaborator are in the elaborate
directory.  Included are several utilities you will find useful:

 * Identifier resolution.
   
   Resolve : RESOLVE

 * Signature ascription.

   Ascribe : ASCRIBE

 * Elaboration of types, datatypes, specs, and signatures.

   ElaborateType : ELABORATE_TYPE

 * Elaboration of primitives.

   ElaboratePrim : ELABORATE_PRIM

 * A glue functor that combines your elaborator with the parser.

   MiniFrontEndFun (structure Elaborate : ELABORATE) : FRONT_END

In the parse directory you will find a parser, which you may find
useful for testing:

 * Parser : PARSER

You'll find an explanation of how to elaborate recursive functions in
RECURSION.

-----

To invoke the SML/NJ heap image, run SML/NJ with the SMLload option:

   /path/to/sml @SMLload=<heap image name>

The heap image contains the support code for the project pre-loaded.
Also, a backend that compiles from IL-Module to C is provided:

signature COMPILE =
   sig
      val backend : ILModule.sg -> ILModule.module -> string -> unit
   end

structure Compile : COMPILE

Compile.backend takes an IL-Module program and the name of an output
file.  The program is compiled and the resulting C code is written to
the output file.

Notes:

 - The compiler is not particularly efficient, and will not likely be
   able to compile large files.

 - When using the heap image, you should NOT load the support code
   from source.  Since datatypes are generative, doing so will create
   a second copy of the support code that is incompatible with the
   pre-loaded copy.  The second copy will shadow the first, making the
   Compile structure unusable.

 - If the heap image is incompatible with your version of the SML/NJ
   runtime, you can download a compatible copy of the runtime from the
   course web page.
