The interface to the Alice system features:
The Alice compiler can be invoked in one of the following ways:
Compile <input file> as an Alice source and write a pickled component as output. If <output file> is given, use it as the pickle file name, else use the basename of <input file> with .ozf as extension.
Compile <input file> as an Alice source and write an executable component as output. If <output file> is given, use it as the executable file name, else use the basename of <input file> without extension.
Compile the <signature source>. Save a compiled component to <output file> that contains the component from <input url> with the newly compiled signature as export signature.
<signature source> must export exactly one signature. Its name is irrevelant.
If an imported component does not exist, but a source file for it (i.e., a file with same name but ending in .aml, .sml, or .sig) can be located, the compiler first invokes itself recursively to compile the imported component. Note: file modification times are not checked.
Per default, the SML Standard Basis top-level environment is available for compiling source files.
The following extra options may be given:
Do not make the SML Standard Basis top-level environment available to source files. This option is necessary for bootstrapping the top-level environment itself.
Write a file <output file>.ozm containing the assembly code for the compiled component.
Omit output of component signatures.
Any compiled component can be invoked as an Alice application. When loading a component, its body is executed; the work of an application is performed by its body's side-effects.
An application is executed either by starting an executable component produced by stoc from the command line or by invoking the Virtual Machine directly thus:
Loads and executes the application given by <application url>, denoting a compiled or executable component.
To terminate an application, the OS.Process.terminate function must be invoked.