next up previous contents
Next: New Models Up: Sequential Efficiency Previous: Sequential Efficiency

Compile-time Analysis

Most of the complexity of executing Prolog programs comes from the lack of a-priori knowledge regarding the development of the execution. This forces the engine to either

For example, during compilation, the lack of knowledge regarding the instantiation state of the arguments of a subgoal obliges the compiler to generate code capable of handling all the different situations (e.g., arguments are unbound variables, arguments are ground terms, etc.). The selection of the proper sequence of instructions will be done at run-time--with the cost of checking the status of each argument.

A great deal of improvement could be obtained by increasing the amount of knowledge available during program compilation. This knowledge can be either supplied by the programmer, through declarations and pragmas in the source code (e.g. Mercury [122]), or automatically extracted using abstract interpretation and other compile-time techniques [22, 77, 12].

The natural question at this point is the following: ``which kind of information are useful to improve program compilation and execution ?'' A wide variety of information may actually turn out to be useful during program translation, but the main sources of improvement may be represented by having a good knowledge about the following features of the execution:


next up previous contents
Next: New Models Up: Sequential Efficiency Previous: Sequential Efficiency

'Enrico
Tue Mar 19 14:37:09 MST 1996