Loading Byte Code Files

Byte code files may be loaded into the simulator using the predicate load:
| ?- load(ByteCode_File).

where ByteCode_File is a Prolog atom (see Section [*]) that is the name of a byte code file. load/1 (B)

The load predicate invokes the dynamic loader, which carries out a search according to the sequence specified by the environment variable SIMPATH (see Section [*]). It is therefore not necessary to always specify the full path name to the file to be loaded.

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

cat foo1 foo2 > foo
is a byte code file as well, and may be loaded and executed. In this case, loading and executing the file foo would give the same result as loading foo1 and foo2 separately, which in turn would be the same as concatenating the original source files and compiling this larger file. This makes it easier to compile large programs: one need only break them into smaller pieces, compile the individual pieces, and concatenate the resulting byte code files together.