3.5 Watching Propagators

It is illuminating to watch the effect of one or several propagators with the Browser. Enter the following statements line by line and observe in the Browser the shrinking domains of the variables X, Y, and Z:

declare X Y Z  
{Browse [X Y Z]}         % [X Y Z]
:: 1#13                % [X[1#13] Y Z]
:: 0#27                % [X[1#13] Y[0#27] Z]
:: 1#12                % [X[1#13] Y[0#27] Z[1#12]]
2*=: Z                 % [X[1#13] Y[1#6]  Z[2#12]]
<: Y                   % [X[1#5]  Y[2#6]  Z[4#12]]
<: 7                   % [X[1#2]  Y[2#3]  Z[4#6]]
\=: 1                  % [2 3 6]

The comments say what you will see in the Browser. Note that the statement 2*Y=:Z creates a propagator that performs interval rather than domain propagation.


Christian Schulte and Gert Smolka
Version 1.4.0 (20080702)