rmk216 wrote:
Sorry if this question has come up before, but how can the Oz constraint
system be used to model constraints over variables whose domains are
tuples? For example, I've written some 3-D puzzle solving algorithms
using JCL, and all of my work uses tuples to represent the game pieces.
This works fine for me, but I'd like to investigate doing something
similar under Oz. Do I have to somehow redo my tuple-domain algorithms
to work with integer domains instead, or is there some sort of built-in
support for making fancy constraints?

Mozart has constraints over records, which extend tuples. Here are a few examples of such constraints:

   %% R is a record with label 'foo'
   R = foo(...)

   %% R is a record with label 'name', and at least a field 'name'
   R = person(name:N ...)

   %% R is a record with a field 'name' whose value is N
   R^name = N

   %% R is a record of width 3
   {RecordC.width R 3}

Consult the documentation of module RecordC. The document http://www.mozart-oz.org/papers/abstracts/oznlp.html also mentions "feature" constraints, and their use for language processing.

Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to