next up previous contents
Next: How Does a CLP Up: What is Constraint (Logic) Previous: An Example: SEND +

Use Prolog as Host Language?

The last example shows that Prolog syntax (and semantics) and finite domains go quite well together. Actually, it is more than that: due to the incremental nature of constraint programming (prototyping and building an application incrementally is easy and natural), the availability of interactive interpreters for CLP languages (inherited from Prolog) is a plus, as experimentation and debugging are parts inherent to the development of a program.

Also, the built-in backtracking of logic programming allows the easy customization of search procedures for the cases in which standard CLP procedures are not good enough: this may happen when there are hints as to what is the best direction to search in. Small examples might not show that, due to small search times, but large examples often make the difference apparent.

Some interesting characteristics from Prolog are also inherited, which are not found in other languages:

Of course, there are some disadvantages in using Prolog as host language, mainly concerned with the difference of the logic programming paradigm with respect to other paradigms:

Last, but not least, there are different products which implement the CLP paradigm. Depending on the problem some of them might be more adequate than others. But very probably the final application in an industrial environment will have to interact with other programs, so the possibility of having an interface (other than a raw text file) is a point to take into account. Fortunately this is the case for all commercially available Prolog and CLP systems.


next up previous contents
Next: How Does a CLP Up: What is Constraint (Logic) Previous: An Example: SEND +
MCL
1998-12-03