Special files

A Strawberry Prolog program consists of up to three files and some additional if defined:
 1) a .def -file, where reserved words are defined;
 2) an .add -file, where built-in predicates are declared together with some other definitions;
 3) a .pro or .spj -file, where the 'very' Prolog 'program' is found;
 4) additional files if they are defined in the project.

The .def - and .add -files create the context for the correct understanding of the program by the compiler (just like .h -files in C).

Compilation begins with reading the .def -file, in order to establish correspondence between the numerical identifiers of the reserved words and their string representation. The numerical identifiers of the reserved words actually correspond to line numbers in the .def -file. This way the user can modify any reserved word. It is essential to preserve the order in this file.

The next step of compilation is to read the .add -file which defines some operators and the built-in predicates. This file lets one redefine standard built-in predicates, or define new ones.

After that is the compilation of the 'very program', that is contained in the .pro or .spj -file (the difference is that .spj -file contains some settings, but the .pro -file uses the settings of the default project),

A Strawberry Prolog program must contain a .pro -file (or .spj or .txt -file). If any of the others is missing, a corresponding standard file is used in its place. These files all have the name Standard and the corresponding extensions:

Standard.def The file containing the standard reserved words.

Standard.add The file containing the declarations of the standard built-in predicates.