ECLiPSe: Variables with non-continous domains

From: Rory Dowd (rpd100_at_york.ac.uk)
Date: 01/06/04


Date: Tue, 06 Jan 2004 13:04:54 +0000

Is there any way of applying a non-continous domain to a variable,
through some higher level structure like an array or a list.

E.g. from "L is [1,3,7,9]"
is there anyway you can substitute L in for:
"X :: L"?

The aim is to end up with a statement equivalent to:
"X :: [1,3,7,9]"

'X' is a variable which will be iterated over, that is I want to apply
this domain to many variables.

I can see that you can do it by repetadly calling "X #\= n" where n is
a member of those numbers not in the desired domain (2,4,5,6,8,10,etc.
for this example). But this is inefficient in some cases.

Is there a way to append to a domain? So one could repetadly append to a
domain with new desired values.

Any ideas?

Regards,

-Rory