The compiler translates Prolog source files into byte-code object files. It is written entirely in Prolog. The byte code for the compiler can be found in the SB-Prolog system directory cmplib, with the source code resident in cmplib/src.
Byte code files may be concatenated together to produce other byte code files. Thus, for example, if foo1 and foo2 are byte code files resulting from the compilation of two Prolog source programs, then the file foo, obtained by executing the shell command
The following sections describe the various aspects of the compiler in more detail.