[Oz] Help: choice statement ...

Christian Schulte schulte at ps.uni-sb.de
Wed Jan 5 16:27:26 CET 2000


P Ravi Prakash wrote:
> 
> Hi,
> 
> I have a question regarding `choice' statement in distributers. The
> documentation says that the 2 choices (Var = Val and Var \= Val) created
> by this statement could be executed in any order.  Is there any way to
> force the order?

Let me clarify as follows: 

 1. If you have two threads each blocking on a choice statement,
    it is indeterministic which is selected.

 2. If you have a statement: choice ... end ... choice ... end
    the first choice is distributed first, no matter
    which search engine is used.

 3. Given: choice S_1 [] S_2 end
    The order in which S_1 and S_2 are selected dependes on the
    search engine. With normal depth-first search (i.e. Explorer,
    SearchOne etc) S_1 is tried first. Always.

With kind regards
Christian

-- 
Christian Schulte, http://www.ps.uni-sb.de/~schulte/
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list