[ library(chr) | Reference Manual | Alphabetic Index ]
chr_label_with(+Constraint)
Checks the label_with declarations of Constraint.
- +Constraint
- A chr constraint.
Description
Checks the label_with declarations of Constraint. Used by advanced
constraint handling rules users to write their own labeling procedure
for the constraints defined by constraint handling rules.
Fail Conditions
Fails if Constraint is a variable or if Constraint does not have a
label_with declaration or if the guard of all unifying label_with
declarations fail.
Resatisfiable
Yes.
Examples
Given the following label_with declaration (from the example
constraint handler in file time-pc.chr:
label_with path(N, X, Y, L, T, I) if N>1.
[eclipse]: chr_label_with(path(N,X,Y,L,T,I)).
no (more) solution.
[eclipse]: chr_label_with(path(1,X,Y,L,T,I)).
no (more) solution.
[eclipse]: chr_label_with(path(2,X,Y,L,T,I)).
X = X
Y = Y
L = L
T = T
I = I More? (;)
no (more) solution.
See Also
chr_labeling / 0, chr_resolve / 1, chr_get_constraint / 1, chr_get_constraint / 2