There are two ways of loading programs into Prolog—loading source files and loading pre-compiled PO files. Source files can be compiled into virtual machine code, as well as consulted for interpretation. Dynamic predicates are always stored in interpreted form, however.
Virtual machine code runs about 8 times faster than interpreted code, and requires less runtime storage. Compiled code is fully debuggable, except certain constructs compile in-line and cannot be traced.
The compiler operates in three different modes, controlled by the
compiling
Prolog flag. The possible
states of the flag are:
compactcode
profiledcode
debugcode
This section contains references to the use of the module system. These can be ignored if the module system is not being used (see ref-mod for information on the module system).