Prolog isn't a numerical constraint solver.
I once had to write a menu system in Turbo Prolog. Not fun. Totally the wrong tool for the job. Prolog isn't that useful when you have to cause an action, as opposed to computing a result.
Re:Learn Prolog Now
by abathologist on Sunday March 22, 2015 @03:16PM
(#9247875)
Have you used any of the numerical constraint solving libraries available for many Prolog implementations?[1] (It is also worth noting that Turbo Prolog is a rather peculiar—and now rather old—take on Prolog. I believe it has been superseded by Visual Prolog).
[1]: e.g., SWI Prolog's http://www.swi-prolog.org/pldoc/man?section=clpfd, or http://www.swi-prolog.org/pldoc/man?section=clpqr
Another issue for prolog is that many of these "constraint solving" problems will lead to exponential-time algorithms in the worst case, specially if you use a naive implementation. Because of this, its common to use more specialized solvers (linear programming, SAT, ILP, SMT, etc) instead of a general logic-programming one.
Re:Learn Prolog Now
by stephencanon on Sunday March 22, 2015 @01:44PM
(#9247599)
Autolayout (iOS and OS X layout engine) is built on a constraint solver.
Today constraint solving is still confined to a lot of niche applications like physics engines or CAD systems, but I keep hoping for the day that someone will build a more integrated system which makes it easier for anyone to grab constraints and plug them in where it makes sense.