The XSB compiler translates XSB source files into byte-code object files. It is written entirely in Prolog. Both the sources and the byte code for the compiler can be found in the XSB system directory cmplib.
Prior to compiling, XSB filters the programs through GPP, a
preprocessor written by Denis Auroux (email@example.com).
This preprocessor maintains high degree of compatibility with the C
preprocessor, but is more suitable for processing Prolog programs.
The preprocessor is invoked with the compiler option
as described below. The various features of GPP are described in
XSB also allows the programmer to use preprocessors other than GPP.
However, the modules that come with XSB distribution require GPP.
This is explained below (see
xpp_on compiler option).
The following sections describe the various aspects of the compiler in more detail.