next up previous index
Next: Name clashes with Up: Using the compatibility Previous: Using the compatibility

Compiler versus Interpreter

If your program was written for an interpreter, e.g. C-Prolog, you have to be aware that ECLiPSe is a compiling system. There is a distinction between static and dynamic predicates. By default, a predicate is static. This means that its clauses have to be be compiled as a whole (they must not be spread over multiple files), its source code is not stored in the system, and it can not be modified (only recompiled as a whole). In contrast, a dynamic predicate may be modified by compiling or asserting new clauses and by retracting clauses. Its source code can be accessed using clause/1,2 or listing/0,1 A predicate is dynamic when it is explicitly declared as such or when it was created using assert/1. Porting programs from an interpreter usually requires the addition of some dynamic declarations. In the worst case, when (almost) all procedures have to be dynamic, the flag all_dynamic can be set instead.



Micha Meier
Mon Mar 4 12:11:45 MET 1996