Dear Raphael,
I see, thank you very much.
Nevertheless, one last question: when I use the OPI to translate X
\=: Y into the core syntax, then I get something like
{FD.sumC 1#~1 X#Y '\=:' 0}
Does this propagation behave the same as the following (for both, the
documentation says "For the relation symbol '\\=:', the propagator
waits until at most one non-determined variable is left.")? This
latter is more easy for me to read...
{FD.sum [X] '\=:' Y}
Best
Torsten
On Mar 26, 2009, at 8:26 AM, Raphael Collet wrote:
Dear Torsten,
2009/3/25 Torsten Anders <[email protected]>
On 23 Mar 2009, at 18:32, Raphael Collet wrote:
The nice equation syntax does not work with distributed programs :-(
In order to replace all occurances of these operators I tried to
come up with a list of their corresponding plain procedures.
However, I was unable to find the procedures for =: and \=:
Here is what I can up with. Any problem here? Did I perhaps miss
any convenience notation? What are the procedures for =: and \=:?
:: / ::: - FD.int, FD.decl
Addition etc - FD.sum, FD.plus, FD.minus
<: etc. - FD.less, FD.lesseq, FD.greater, FD.greatereq
=: / \=: - ??
In fact, all equations and inequations are translated to calls to
FD.sum, FD.sumC, and FD.sumCN, depending on the respective
complexity of the polynomial involved. This holds for all the
relational operators '=:', '\=:', '<:', '=<:', '>:', and '>=:'.
For instance,
A+B+C =: 10 => {FD.sum [A B C] '=:' 10}
A+2*B <: C => {FD.sumC [1 2 ~1] [A B C] '<:' 0}
A+B*C >=: D => {FD.sumCN [1 1 ~1] [[A] [B C] [D]] '>=:' 0}
I think you can observe the translation if you compile a statement
to its "core" syntax. Just be careful, because the core syntax
expansion makes direct reference to some builtins that are behind
FD.sum*. You should not use those builtin references directly in
your program.
Cheers,
raph
--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office: +44-1752-586219
Private: +44-1752-558917
http://strasheela.sourceforge.net
http://www.torsten-anders.de
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users