|Did you know ...||Search Documentation:|
|CLP(B) predicate index|
In the following, each CLP(B) predicate is described in more detail.
We recommend the following link to refer to this manual:
A common form of invocation is
This counts the number of admissible assignments to Vs
without imposing any further constraints.
?- sat(A =< B), Vs = [A,B], sat_count(+[1|Vs], Count). Vs = [A, B], Count = 3, sat(A=:=A*B). ?- length(Vs, 120), sat_count(+Vs, CountOr), sat_count(*(Vs), CountAnd). Vs = [...], CountOr = 1329227995784915872903807060280344575, CountAnd = 1.
sum(Weight_i*V_i)over all admissible assignments. On backtracking, all admissible assignments that attain the optimum are generated.
This predicate can also be used to minimize a linear Boolean program, since negative integers can appear in Weights.
?- sat(A#B), weighted_maximum([1,2,1], [A,B,C], Maximum). A = 0, B = 1, C = 1, Maximum = 3.