[ library(fd) | Reference Manual | Alphabetic Index ]

#<=>(?X, ?Y, ?B)

The constraint X #<=> Y has the truth value B.
?X
A constraint expression.
?Y
A constraint expression.
?B
A variable with domain 0..1.

Description

This predicate is an evaluation constraint: it succeeds if and only if the truth value of its associated constraint (the constraint with arity one less and the same arguments except for B) is equal to B, where the value 0 means false and 1 true. This constraint can be used both to test the validity of the associated constraint (entailment test) and to impose this constraint or its negation. For the former, B will be instantiated as soon as either the associated constraint or its negation is subsumed by the current state of its domain variables. For the latter, when B is instantiated, then depending on its value, either the associated constraint or its negation will be imposed on its arguments.

Boolean expressions containing arithmetic constraints are converted by the system to a series of evaluation constraints and arithmetic constraints in a way similar to arithmetic evaluation, e.g.

    X #> Y #=> T #> V #/\ E #= F
is transformed into

    #>(X, Y, B1),
    #>(T, V, B2),
    #=(E, F, B3),
    #=(B2 + B3, 2, B4),
    B1 #<= B4.      % i.e.  if B1 then B4

Fail Conditions

Fails if B is not the truth value of the associated constraint.

Resatisfiable

No.

See Also

#\+ / 2, #/\ / 3, #\/ / 3, #=> / 3, isd / 2