Tutorial by Examples

For efficiency, Prolog code is typically compiled to abstract machine code before it is run. Many different abstract machine architectures and variants have been proposed for efficient execution of Prolog programs. These include: WAM, the Warren Abstract Machine TOAM, an abstract machine used i...
All widely used Prolog interpreters use argument indexing to efficiently select suitable clauses. Users can typically rely on at least first argument indexing, meaning that clauses can be efficiently told apart by the functor and arity of the outermost term of the first argument. In calls where tha...
Virtually all Prolog systems implement tail call optimization (TCO). This means that predicate calls that are in a tail position can be executed in constant stack space if the predicate is deterministic. Tail recursion optimization (TRO) is a special case of tail call optimization.

Page 1 of 1