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

new_domain_var(-Var)

A user hook predicate which is called whenever a variable obtains a default domain from the solver.
-Var
A variable.

Description

This predicate is a simple hook to notify about free variables being converted into domain variables. Whenever the finite domain solver assigns a free variable a domain, it invokes this predicate in the module fd_domain with the variable as argument. To use the mechanism, it is necessary to recompile this predicate in the module fd_domain.

Fail Conditions

None.

Resatisfiable

No.

Examples

   [eclipse 22]: compile(user, fd_domain).
   new_domain_var(X) :- printf("new domain variable created: %mw%n", [X]).
   user       compiled traceable 88 bytes in 0.00 seconds
   yes.
   [eclipse 23]: X+Y #> T.
   new domain variable created: X[-10000000..10000000]
   new domain variable created: Y[-10000000..10000000]
   new domain variable created: T[-10000000..10000000]



See Also

:: / 2, #:: / 2, default_domain / 1