... solver.1.1
Although some CLP systems allow the user to define their own constraint domains and solvers.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... created1.2
As we will see later, these choice points are created every time there is an alternative in the program, and these alternatives appear almost inevitably even if the program do not explicitly create them.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... lengths1.3
We will use nodes to represent tasks; the problem is the same where nodes or edges are used to that end.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... (re)started2.1
There are also special all-solutions predicates which encapsulate a search in a single objective and return all possible solutions for a given query.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... them2.2
In fact, the kind of fatal errors which are raised in some languages because of the dereferencing of uninitialized pointers, or because or arithmetical operations with numbers holding senseless values, cannot appear in CLP systems (and, if they do, it is the system's, not the programmer's, fault) and, at most, a runtime error is returned, which usually can be caught and recovered from. This results in an easier construction and management of complex data structures, as we will see.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... attention3.1
This can be assumed at this moment. Later we will see that a better knowledge of how the system actually works is needed for writing certain programs.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... amount3.2
Mathematically speaking, this is not a good idea: the error of the approximation in a series is, in general, an expression which is to be calculated separately, and usually working out this expression is not as straightforward as testing the value of an element of that series.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...Y;3.3
We are obviously abusing the notation for variables: each variable is different in different iterations.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... always4.1
Not always: most Prolog and some CLP systems have means to declare predicates to be concurrent: calls to them are delayed until some conditions are met, and they are resumed when these conditions hold.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... problem.7.1
All the times reported in this section will refer to the finding of the first solution, not to traversal of the whole search tree. Also, all programs were run in a SUN Sparc 10 with SunOS 4.1.3 and Prolog IV v1.0.1.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
MCL
1998-12-03