
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.

-----

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 compiler from Standard ML to C (except for phase splitting) is
provided:

signature COMPILE =
   sig
      val frontend : string -> (ILModule.sg * ILModule.module) option
      val backend : ILDirect.con -> ILDirect.term -> string -> unit
   end

structure Compile : COMPILE
structure MiniCompile : COMPILE

Compile.frontend takes the name of a file containing SML source, and
returns SOME (sg, m) if it compiles, and NONE if it does not.
Compile.backend takes an IL-Direct program and the name of an output
file.  The program is compiled and the resulting C code is written to
the output file.

MiniCompile works the same way, but its front end operates on a
fragment of SML.  Since that fragment provides a much smaller basis,
it produces much smaller IL-Module programs.

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.
