Up Next

6.1  Summary

The ECLiPSe compiler compiles ECLiPSe source (or Prolog source in various dialects) into the instructions of an abstract machine, which are then executed by an emulator.

Program source can either be read in text form from files, console, strings and general input streams. Alternatively, it can be provided in the form of a data structure (list of clause terms).

The smallest program unit the compiler can meaningfully process is a predicate. In practice it is best to compile modules as a whole, since this allows for better consistency checks.

Usually, the generated code is immediately loaded into main memory and ready for execution. This method is the most convenient during program development. In addition, compiled code can be output to a file (ECLiPSe object format, or eco), from which it can later be loaded more quickly.

Compiled code optionally contains debugging information, allowing a source-oriented trace of program execution.


Up Next