Russ Abbott wrote:
On 10/2/05, *Raphael Collet* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Russ Abbott wrote:
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.
That's exactly what I was originally hoping to do--program with choice
directly. Is that possible without a visible call to a solver? I did
want the solver to be in the background as in prolog (at least while
doing Chapter 9).
-- Russ
Dear Russ,
You can tell your students that Solve is a 'first-class Prolog top
level'. Prolog forces you
to always be inside a top level. In Oz you can have many top levels (=
calls to Solve)
in various stages of execution. Your students can have several examples
in various
stages of execution, all available in the same environment.
If you insist on hiding the solver you can use an idea from chapter 11
(the GUI chapter)
and have the students enter expressions in a text box, which are passed
to the compiler
(see, e.g., the Prototyper application in chapter 11 - the source code
for Prototyper is
available in the Prototyper itself by selecting the right example).
That way, you can hide
the emacs interface as well as the call to Solver!
Peter
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users