alice
manual.


Alice Project

batch
compiler


________ Overview ____________________________________________________

The standalone batch compiler is used to produce components from source files.

________ Synopsis ____________________________________________________

alicec [<options>] [-c] <input file> [-o <output file>]
alicec --print-component-extension

________ Description _________________________________________________

The <input file> is compiled as an Alice source program and a corresponding component is written as output. If <output file> is given, it is used as the output file name, else the basename of <input file> is used with .ozf as extension. Compiled components can be executed by invoking the virtual machine.

<input file> may be a URL. See below for notes on how it is interpreted. <output file> may only be omitted if <input file> represents a local file.

To compile a component, the compiler requires access to all imported component files. If one 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. If a component does exist, the compiler does not perform any check to verify whether it is up-to-date. External tools like make have to be used, in conjunction with the dependency analyzer, to ensure proper recompilation if necessary.

It is possible to import Mozart components (Mozart "functors"), as long as they are augmented with an Alice signature file. See the interop section for details.

The second form just causes the compiler to print the standard extension for components (currently ozf) and exit immediately.


________ Options _____________________________________________________

--version

Print compiler version.

--assert <level>

Set assertion level (0 by default).

--(no-)dump-phases

Trace compilation phases.

--(no-)dump-elaboration-sig

Output component's export signature.

--(no-)warn-conventions

Warn about violations of standard naming conventions (on by default).

--(no-)warn-shadowing

Warn about shadowing of identifiers (off by default, gives a lot of spurious warnings).

--dependency-file <dependency file>

Use dependency file to automatically derive import announcements.


________ Import management ___________________________________________

The Alice employs a compilation model that is quite different from other Standard ML systems. In particular, Alice ML requires putting explicit import announcements into source files to enable separate compilation.

In order to allow for easier migration or sharing of SML source code with other SML systems, the Alice compiler supports two methods for inserting import announcements automatically:

The first of these options essentially requires creating a separate import file for each individual SML file. The second option allows gathering all the necessary information into a single dependency file.

Please note that these methods are provided solely for better compatibility with other SML systems. Using them for native Alice components is strongly discouraged.


________ Environment variables _______________________________________

The batch compiler is parameterized by the same environment variables as the virtual machine, plus:

ALICE_SOURCE_PATH

specifies how source file URLs are interpreted. If set, the value of this environment variable is parsed by the parse method of the Resolver.Handler structure. If not set, uses only the default identity method.



last modified 2004/04/13 11:29