next up previous contents
Next: Compiling Programs Up: Compiling ALE Programs Previous: Compiling ALE Programs   Contents

File Management

After starting up Prolog, the following command should be used to load the ALE system:

| ?- compile(AleFile).
where AleFile is an atom specifying the file name in which ALE resides. For instance, in Unix, you might need to use something like: compile('/users/carp/Prolog/ALE/ale.pl')., or a local abbreviation for it like compile(ale). if the system is in a file named ale.pl in the local directory (SICStus and SWI can fill in the ``.pl'' suffix). With SWI Prolog, the command:
| ?- consult(AleFile).
must be used instead. Note that the argument to compile must be an atom, which means it should be single-quoted if it is not otherwise an atom. After the system has compiled, you should see another Prolog prompt. It is necessary to have write permission in the directory from which Prolog is invoked, because ALE creates files during compilation. But note that neither the grammar nor ALE need to be locally defined; it is only necessary to have local write permission.

ALE source code, being a kind of Prolog code, must be organized so that predicate definitions are not spread across files, unless the appropriate multifile declarations are made. For instance, the sub/intro clauses specifying the type hierarchy must all be in one file. Similarly, the definite clauses must all be in one file, as must the grammar rules and macros.


next up previous contents
Next: Compiling Programs Up: Compiling ALE Programs Previous: Compiling ALE Programs   Contents
TRALE User's Manual