Peter wrote:
Another point about nondeterministic functions: the use of 'dis' is deprecated in Mozart. You should use 'choice' instead. The reason has to do with Prolog-style versus constraint-style programming. Prolog programs basically do generate and test (enumerate and then prune). Constraint programs do pruning before enumeration (using propagators), which is more efficient. 'Dis' is a kind of poor man's way for Prolog programs to do a little bit of pruning, but it is a dead end since it is still in the Prolog style. If you really need nondeterminism (search) in a strong way, you should use the constraint style and not the Prolog style. If you need just a little bit of nondeterminism or if you are just exploring solutions in a simple way, you can use Prolog style. But Prolog style does not scale up to real problems.


Thank you very much for this explanation. I am very happy to know that the solving of constraints differs from prolog enumeration (becouse this enumeration is very painful fact and uneffective). But I have the one question about constraints. Is there some difference between using constraints (and 'choise') in Mozart/Oz and Alice languages? I decided to use Oz because Alice lack of unification that Oz have. Is it this unification boils down to Prolog-style programming (with dis) or there are other mechanism of unification?

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

Reply via email to