
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 is provided:

signature COMPILE =
   sig
      val compile : string -> string -> unit
   end

structure Compile : COMPILE
structure MiniCompile : COMPILE

Compile.compile takes the name of a file containing SML source and the
name of an output file.  If the file compiles, the resulting C code is
written to the output file.

MiniCompile works the same way, but operates on a fragment of SML.
Since that fragment provides a much smaller basis, it produces much
smaller C 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.
