[ library(ic) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

ic:(?ExprX =:= ?ExprY)

ExprX is equal to ExprY.
ExprX
Arithmetic expression
ExprY
Arithmetic expression

Description

Constrains ExprX and ExprY to be equal. NOTE: Terms in either Expression may be user defined predicates which will be treated in the same manner as 'is/2'. i.e. An extra argument will be appended and inserted into the expression.

The logical connectives 'and', 'or' and '=>'(implication) can be used to combine the truth values of logicaly reified constraints. For example.

[eclipse 3]: ic:(T =:= ((X>3.0) and (X<8.0))).

T = T{[0, 1]}
X = X{-1.0Inf .. 1.0Inf}


Delayed goals:
        ic : (-(Aux{[0, 1]}) + T{[0, 1]} =:= 0)
        ic : =:=(_811{[0, 1]} + _826{[0, 1]}, 2, Aux{[0, 1]})
        ic : <(-(X{-1.0Inf .. 1.0Inf}), -3.0__-3.0, _826{[0, 1]})
        ic : <(X{-1.0Inf .. 1.0Inf}, 8.0__8.0, _811{[0, 1]})
Yes (0.00s cpu)
[eclipse 4]: ic:(T =:= ((X>3.0) and (X<8.0))), X = 5.0.

T = 1
X = 5.0
Yes (0.00s cpu)
[eclipse 5]: ic:(T =:= ((X>3.0) and (X<8.0))), X = 2.0.

T = 0
X = 2.0
Yes (0.00s cpu)
   

The logical operator 'neg' can be used to negate thetruth of a reified expression. For example.

[eclipse 6]: ic:(T =:= (neg ((X>3.0) and (X<8.0)))), X = 5.0.

T = 0
X = 5.0
Yes (0.00s cpu)

[eclipse 7]: ic:(T =:= (neg ((X>3.0) and (X<8.0)))), X = 2.0.

T = 1
X = 2.0
Yes (0.00s cpu)
   

See Also

>= / 2, =< / 2, =\= / 2, #= / 2, =:= / 2, suspend : =:= / 2, eplex : =:= / 2, ria : =:= / 2