[ library(chr) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]
Remove a constraint in which the variable Variable occurs and which unifies
with Constraint from the constraint store.
- A free variable.
- A constraint (callable term) defined by constraint handling rules.
Removes a constraint in which the variable Variable occurs and which
unifies with Constraint from the constraint store. Note that if the
unification with Constraint binds variables occurring also in other
constraints in the constraint store, these constraints may be simplified
(see last examples). Thus it is recommended to use either a free
variable or a term with variable arguments for Constraint. Used by
advanced constraint handling rules users to manipulate themselves the
constraints defined by constraint handling rules. See also
chr_get_constraint/1 for more examples.
Fails if Variable is not a free variable or if there is no constraint
(defined by constraint handling rules) in the constraint store that
unifies with Constraint and in which the variable Variable occurs.
Example using the constraint handler for Booleans bool.chr:
[eclipse]: and(X,Y,Z), or(A,B,C), chr_get_constraint(Y,Cstr).
X = X
Z = Z
A = A
B = B
Y = Y
Cstr = X * Y = Z
(2) A + B = C % pretty print for or/3 - constraint
no (more) solution.
The following predicate labeling(+Varlist) labels the variables in the
chr_labeling / 0, chr_label_with / 1, chr_resolve / 1, chr_get_constraint / 2