Example using the constraint handler for Booleans bool.chr: [eclipse]: chr_get_constraint(C). no (more) solution. [eclipse]: and(X,Y,Z), or(X,Y,Z). Constraints: (1) X_g745 * Y_g777 = Z_g809 % pretty print of and/3 constraint (2) X_g745 + Y_g777 = Z_g809 % pretty print of or/3 constraint yes. [eclipse]: and(X,Y,Z), or(X,Y,Z), chr_get_constraint(C). C = X * Y = Z Constraints: (2) X_g765 + Y_g797 = Z_g829 More? (;) C = X + Y = Z Constraints: (1) X_g765 * Y_g797 = Z_g829 More? (;) no (more) solution. [eclipse]: and(X,Y,Z), or(X,Y,Z), chr_get_constraint(and(1,A,B)). % or/3 - constraint is solved when X is bound to 1 X = 1 Y = A Z = 1 A = A B = 1 [eclipse]: and(X,Y,Z), or(X,Y,Z), chr_get_constraint(and(1,1,0)). no (more) solution. % or/3 - constraint fails [eclipse]: and(X,Y,Z), chr_get_constraint(and(1,1,0)). X = 1 Y = 1 Z = 0 The predicate chr_labeling/0 can be defined as: labeling :- chr_get_constraint(C), chr_label_with(C), !, chr_resolve(C), labeling. labeling.