4 ms·
Learning Prolog was very challenging for me too! I was extremely lucky though in that I had one of the world's greatest Prolog experts as instructor, using the
by triska 8y ago
Learning Prolog was very challenging for me too! I was extremely lucky though in that I had one of the world's greatest Prolog experts as instructor, using the world's most sophisticated Prolog teaching environment:
https://www.complang.tuwien.ac.at/ulrich/gupu/ https://www.complang.tuwien.ac.at/ulrich/gupu/
You can take a short pictorial tour of GUPU:
https://www.complang.tuwien.ac.at/ulrich/gupu/d-2-europastadt-dax https://www.complang.tuwien.ac.at/ulrich/gupu/d-2-europastad...
However, these pictures can at best give a small glimpse of what GUPU actually is, so I also recommend a longer paper:
https://www.complang.tuwien.ac.at/ulrich/papers/PDF/gupu-wlpe2002.pdf https://www.complang.tuwien.ac.at/ulrich/papers/PDF/gupu-wlp...
For me, a major attraction of Prolog is the balance it strikes between readability, versatility and convenience. I know languages that sometimes admit shorter programs, but they then are - at least in my experience - not as readable as a Prolog version, or not as versatile.
I am using Prolog for many different tasks, such as hosting web pages, prototyping showcases, and solving combinatorial optimization problems.
- 3rdAccount 8y agoI have to make extensive use of Linear Programming & Mixed-Integer Linear Programming in my day job. This all runs on CPLEX. It would be really cool to do that sort of thing in Prolog, but I doubt it could handle massive models. Anyway you could explain what combinatorial optimization is for and how it differs from the things commonly seen in operations research?
- triska 8y agoFor solving linear programs and mixed-integer linear programs with Prolog, I recommend the CLP(Q) and CLP(R) libraries of SICStus Prolog. See for example: https://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_32.html https://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_32.h... For discrete optimization tasks, also check out the integer constraint solver that ships with SICStus Prolog. See especially the combinatorial constraints: https://sicstus.sics.se/sicstus/docs/4.1.0/html/sicstus/Combinatorial-Constraints.html#Combinatorial-Constraints https://sicstus.sics.se/sicstus/docs/4.1.0/html/sicstus/Comb... As to the relation between Prolog and operations research: Prolog systems internally use methods from operations research to efficiently solve optimization tasks; in addition to that, you can of course also implement every OR algorithm in Prolog. For many commercial users of SICStus Prolog, the efficiency of its constraint solvers are an important reason for buying a licence.