next up previous index
Next: Writing Higher Level Constraints Up: RANGE: A Basis For Previous: Library Predicates   Index

Attribute Structure

Ranged variables are implemented as attributed variables. The attribute contains the following fields:
type
specifies the variable type, either integer or real.
lo
the smallest value the variable can assume
hi
the largest value the variable can assume
wake_lo
list of goals to be woken on lower bound change
wake_hi
list of goals to be woken on upper bound change
Type and bounds are accessed through the predicates described above. Goals can be delayed on the waking lists using the suspend/3 predicate, for example:
[eclipse 13]: X::0.0..5.5, suspend(writeln(change), 3, X->wake_lo), lwb(X,1).
change
X = X{1.0 .. 5.5}
yes.



Warwick Harvey
2004-08-07