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

eq_t(?X, ?Y, +MC)

Tentative value implementation of $=/2 arithmetic equality constraint
X
Expression containing tentative variables
Y
Expression containing tentative variables
MC
A monitored_constraint descriptor

Description

Tentative value implementation of equality constraint.

The violatedness of the constraint is 0 if the equality holds, 1 otherwise.

The following declaration is in effect, meaning that eq_t/3 is used whenever $= /2 is added to a constraint set:

	:- eq_t/3 tent_implements $= /2.
	

Modes and Determinism

Examples

    ?- [X, Y] tent_set [3, 4], CS :~ (X $= Y).
    X = X{3 -> 0}
    Y = Y{4 -> 0}
    CS = constraint_set(TotalVio{1 -> 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)

    ?- [X, Y] tent_set [3, 3], CS :~ (X $= Y).
    X = X{3 -> 0}
    Y = Y{3 -> 0}
    CS = constraint_set(TotalVio{0 -> 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)
    

See Also

alldifferent_t / 2, alldifferent_t / 3, neq_t / 3, tentative : tent_implements / 2