SWI vs ECLiPSE for beginner in CLP?

I’d like to learn about logic programming, mainly for solving constraint problems. ECLiPSE has a couple of books for beginners, but there doesn’t seem to be much of a community and the release cycle is very slow. I would prefer SWI for the better community and integration with other languages.

  • Is there a key comparing the difference between the two systems and the libraries to use on each one?
  • I have worked through a couple of examples from the ECLiPSE documentation, and it seems that most constraint problems, including CHR, translate nearly 1:1 to SWI. Is this a correct assumption?
  • I didn’t find a SWI equivalent for Propia. Is this an important library?
  • I found a five year old post https://www.reddit.com/r/prolog/comments/5l4qbz/eclipse_prolog_vs_swi_prolog_pros_and_cons_of/ that states that “Eclipse has a much faster finite domain constraint solver”. Is that still the case today? How much of a difference are we talking about?
  • Most of the ECLiPSE libraries are quite old, are the solvers even competitive compared to e.g. Google’s OR-Tools or geocode?

Where the primary focus of ECLiPSe is constraint handling, this is not the case for SWI-Prolog. Some of the constraint libraries such as CHR and clp(qr) have a single origin and have been ported to several systems. You can expect similar behavior and performance, though some have evolved further on some systems.

Systems that entered the constraint domain early typically implemented the finite domain solver in low-level code. SWI-Prolog’s is the work of Markus Triska and is a pure Prolog implementation. In many cases it will be a lot slower than ECLiPSe. It also comes with some advantages, such as support for unbounded integers.

I guess you need concrete experiments to figure out whether SWI-Prolog’s constraint handling is “good emough” for you. If you do not depend too much on SWI-Prolog’s extensions that are not supported by ECLiPSE, switching at some point should not be too hard. Given time and money, SWI-Prolog’s constraint handling can also be improved :slight_smile:

2 Likes