Russ Abbott wrote:
It is extraordinarily frustrating for Oz to suspend silently when it runs into a choice statement outside a search.
This behavior it is exactly what its semantics prescribes. Maybe a warning in the program's output could help...
because Append is defined using choice. I know there are other ways to write this to make it work. But my point is that this way should either work or some diagnostic should tell you that the program is ill-structured. One way to make it work is to launch an implicit SearchAll and raise an exception if you get more than one answer.
Implicit search is a mistake as well. You don't usually use stateful data inside search, but state is all around in the "toplevel" space! Oz programs are stateful concurrent, perform I/O, and the language is distributed. Search simply cannot be considered in this situation.
Computations spaces provide exactly what a search process needs: the program to be explored must be in a closed world, it cannot interact with the "external" world.
Alternatively, a way to produce a diagnostic is to trace paths outside the SearchAll and produce an error message if a path leads to a choice statement. As it is, it produces great frustration to make what seems to be an innocent program transformation and find that the resulting program seems to do nothing.
Such a program transformation is innocent only in Prolog. In Oz, this is explicitly a programming model shift!
Never use "choice" unless you really intend to use search. Cheers, raph _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
