Russ Abbott wrote:
Thanks for the solver. When we get to FDs I'd like to use it in the class. For now, though I don't want my class to think about solvers.

So you want that the students think it's magic, right? ;-)

Also, the fact that you pass Digits as a reference rather than calling it makes things confusing. While talking about Chapter 9 I want to think in terms of calling functions like Digits, which can call other functions with similar constructs.

Maybe that's because it is higher-order. But I don't think it is so complicated. The search engine calls the function, and explores its possible executions until it finds one/all solutions. You have to give it the function explicitly.

So I guess I want a bit more than I said and not just a working version of Digits. Basically, I want to be able to use Oz like straight Prolog--at least while we're doing Chapter 9. So my request is for instructions for translating a simple Prolog program into a running Oz program. I'm not concerned for now about cuts or even about "running the program in two directions". I just want to know how to use Oz to write basic Prolog programs.

The translation Prolog->Oz is explained at the end of Chapter 9.

Another possibility is to program with "choice" in a direct style, i.e., think of your program explicitly as a non-deterministic one. The exploration of all executions of the program is done by a search engine. To me this is less confusing than the "magic" behind prolog, but YMMV.


Cheers,
raph

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

Reply via email to