I want to implement a CSP with the variables’ domain being non-numeric (something like [lisa ann mary joanna] ). Is there a way to achieve this in Mozart/Oz?
I want to implement a CSP with the variables’ domain being non-numeric (something like
Share
It might be possible to implement such a thing as a language extension in C++, but within the language itself, it is not possible.
The only built-in types of constraints are finite domain constraints (non-negative integers), finite set constraints (constraints on the domain of sets of non-negative ints) and record constraints.
Maybe you can use integer constants to model your problem, e.g.
If you don’t want to work with finite domains, there is the more general idea of logic programming. You can create choice points for different possible values of a variable, e.g.:
It is also possible to do that with a not statically known number of values, using Combinators.