Hi Alex,

there are some flaws in the docs here I think.

Try executing

   {Browse
    {SearchAll
     proc {$ Root}
        X
     in
        {Append [a b c] [1 2 3] X}
        Root=X
     end
    }
   }

instead. The 12.7 chapter main text is correct, but the problem is that 12.7.1 does not provide a search strategy to be used (this is probably the purpose of 12.7.4, but it is not clear at all).

You might also try executing

   {Browse
    {SearchAll
     proc {$ Root}
        X Y
     in
        {Append X Y [a b c 1 2 3]}
        Root=X#Y
     end
    }
   }

to have some fun.

I suggest that you take a look at the "Search Engines" chapter of the Reference Manual, Part II, and maybe also at the tutorial called "Finite Domain Constraint Programming in Oz".

Cheers,
Filip

12.7.1, however, appears to do nothing.
|declare Append in|
|proc {Append Xs Ys Zs}
dis Xs = nil Ys = Zs [] X Xr Zr in Xs = X|Xr Zs = X|Zr then {Append Xr Ys Zr} end end| || |followed by:| || |local X in {Append [1 2 3] [a b c] X}
   {Browse X}
end|
|| |Shows nothing in the Browser. However, speculating, I changed it to:| || |local X in thread {Append [1 2 3] [a b c] X} end
   thread {Browse X} end
end|
|| |and I get the expected [1 2 3 a b c]| || |Now trying:| || | |local X Y in {Append X Y [1 2 3 a b c]} {Browse X#Y} end| || |Nothing happens, and speculating on:| || | |local X Y in thread {Append X Y [1 2 3 a b c]} end
  thread {Browse X#Y} end
end|
|| |I get _#_| || |For a novice, it sure would help if the examples actually worked, and some explanation was given.| || |Finally, trying 12.7.4, and speculatively adding thread...end here and there, my computer runs out of memory.| || |Any help on this?| || |Thanks| || |Alex| || || ||

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

Reply via email to