Oz and Mozart Users Mailing List

Re: "or" statement


From: Luis Quesada (luque@info.ucl.ac.be)
Date: Wed Sep 19 2001 - 10:12:54 CEST


jorgemp@icmc.sc.usp.br wrote:

> What _really_ happens if (at least) one of the child spaces of an "or"
> statement becomes entailed?
>
> I already know the statement blocks "forever" and will never fail. What I'd
> like to know is whether there is any optimization for such a case, like
> implicitly killing the so-made-redundant sibling spaces.

I think you can get this effect with conditionals + a control variable if your
clauses are pairwise excluding.

cond Constraint_0 then C=0 end
cond Constraint_1 then C=1 end
.
.
.
cond Constraint_n then C=n end

or
    c=0 Constraint_0
[]
    c=1 Constraint_1
[]
.
.
.
[]
    c=n Constraint_n
end

The idea is that once a constraint is entailed, the respective conditional
restricts the control variable to the respective value, causing the other local
spaces to fail.

Luis

--
Catholic University of Louvain
Department of Computing Science and Engineering
Place Sainte Barbe, 2
B-1348 Louvain-la-Neuve, Belgium
Phone: (++32) (10) 47 90 13
Fax: (++32) (10) 45 03 45
E-mail: luque@info.ucl.ac.be

- Please send submissions to users@mozart-oz.org and administriva mail to users-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.



This archive was generated by hypermail 2b29.