News for hackers. Stuff that matters.
Re:Constraint Programming by rad_gruchalski on Monday September 12, 2022 @05:22AM (#32807735)
In Prolog, the predicate order matters. So, if I understand your question correctly, no. It's up to the dev to order predicates in such a way that the amount of backtracking is kept to minimal.
Re:Constraint Programming by hakank on Monday September 12, 2022 @05:53AM (#32807890)
Well, most Prolog support clp(fd) (Constraint Logic Programming, Finite Domain) which mostly include support for minimizing/maximizing objectives.
Re:Constraint Programming by rad_gruchalski on Monday September 12, 2022 @07:14AM (#32808423)
By unification, which will only match the arity, not the rules inside of a predicate. I could be wrong, though. Still learning all ins and outs.