[Oz] Filtering of values of constraint variables
Benko Tamas
benko at iqsoft.hu
Tue Jan 2 17:05:29 CET 2001
Dear Mozart users,
I'm from the Prolog world, and I'm interested in solving constraint
problems. There is a technique called filtering which I use quite often,
but I don't see how I could implement it in Mozart.
Filtering is used in (or before) the labeling phase and it means that
before committing to a possible value we try to exclude values by
tentatively instantiating it to a value and watching if it fails.
In Prolog it looks like this:
% Try to filter out value V from variable X.
filter(X, V) :-
( \+ X = V -> X #\= V
; true
).
This kind of filtering is useful if the constraint system is unable infer
that X can't have the value V, but it can detect the inconsistency if X is
instantiated to V.
In Mozart the constraint posting and the search phases are nicely
separated, and I don't know to which phase filtering belongs.
Another (completely unrelated) question: is it possible to program
constraint propagators in Mozart without using the C++ interface? For
prototyping purposes it would be fast enough for me.
Cheers,
Tamás Benkõ
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-users
mailing list