On Tue, Jan 13, 2009 at 10:27 AM, mark richardson <[email protected]>wrote:
> Hi,
>
> I'm looking at the knights tour example from the Mozart-Oz website and I'm
> a little confused about something.
>
> proc {$ Solution}
> Pred = {FD.tuple pred NN 1#NN} % field --> field
> Succ = {FD.tuple succ NN 1#NN} % field --> field
> Jump = {FD.tuple jump NN 1#NN} % field --> jump
> = {FD.distinct}
> in.........
>
> In this code sample, what is the significance of the line ' =
> {FD.distinct}' not having a left operand for the '=' symbol?
There *is* a left operand, it is: "Jump = {FD.tuple jump NN 1#NN}". In this
case, the call to FD.distinct will be expanded as the procedure call:
{FD.distinct Jump}
In general, a multiple unification of expressions E1=E2=...=En is expanded
to a multiple unification to a single variable (X is chosen to not occur in
any Ei):
local X in
X=E1 X=E2 ... X=En
end
Cheers,
raph
>
>
> Regards
> Mark Richardson
>
> --
> Mark Richardson
> Final year undergraduate
> University of Teesside
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users