<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#d8d0c8>
<DIV><FONT color=#000000 size=2>Hi everybody,</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Sorry to push back to an old topic. The 
discussion was about declaring mutually exclusive goals. I'll be straight: I 
don't think it is a good idea yet. We must think about when we have mutual 
exclusion:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>First we have:</FONT></DIV>
<DIV><FONT color=#000000 size=2>(</FONT></DIV>
<DIV><FONT color=#000000 size=2> goal,</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2>;</FONT></DIV>
<DIV><FONT color=#000000 size=2> not (goal),</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2>)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>This is obviously equivalent to </FONT></DIV>
<DIV><FONT color=#000000 size=2>(</FONT></DIV>
<DIV><FONT color=#000000 size=2> if goal then</FONT></DIV>
<DIV><FONT color=#000000 size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT color=#000000 
size=2>else</FONT></DIV>
<DIV><FONT color=#000000 size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>It is supported by Mercury (I didn't tried the 
first way).</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Then we have the switch:</FONT></DIV>
<DIV><FONT color=#000000 size=2>(</FONT></DIV>
<DIV><FONT color=#000000 size=2> A = a,</FONT></DIV>
<DIV><FONT color=#000000 size=2> ...</FONT></DIV>
<DIV><FONT size=2>;</FONT></DIV>
<DIV><FONT size=2> A = b,</FONT></DIV>
<DIV><FONT size=2> ...</FONT></DIV>
<DIV><FONT size=2>;</FONT></DIV>
<DIV><FONT size=2> A = c,</FONT></DIV>
<DIV><FONT size=2> ...</FONT></DIV>
<DIV><FONT size=2>)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>Where a,b and c are constructors of a 
discrimminated union type.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>Finally Rob suggested that A < B and A >= 
B would be mutually exclusive for integers. In that case, the mutual exclusion 
isn't something we say but something we prove... it is a consequence of the fact 
that integers are ordered.</FONT></DIV>
<DIV><FONT color=#000000 size=2>So, if meaning is important, as I agree with 
Richard, then what we should declare is:</FONT></DIV>
<DIV><FONT color=#000000 size=2>if A and B are expressions of an ordered type 
then A < B and A >= B are mutually exclusive goals.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>My suggestion is </FONT><FONT color=#000000 
size=2>to define a typeclass where there are two predicates equality('=') and 
order('<'). Then, the compiler would not interpret</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>(</FONT></DIV>
<DIV><FONT color=#000000 size=2> A < B</FONT></DIV>
<DIV><FONT color=#000000 size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2>;</FONT></DIV>
<DIV><FONT color=#000000 size=2> A > B</FONT></DIV>
<DIV><FONT color=#000000 size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>;</FONT></DIV>
<DIV><FONT size=2> A = B</FONT></DIV>
<DIV><FONT size=2> ...</FONT></DIV>
<DIV><FONT color=#000000 size=2>)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>as nondet (it is even det!). Types such as int 
and float would be instances of that typeclass.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Now, not all mutually exclusive goals are a 
consequence of order. But we should think about what makes them live before 
</FONT><FONT color=#000000 size=2>directly declaring them.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Cordialement,</FONT></DIV>
<DIV><FONT color=#000000 size=2>RB</FONT></DIV></BODY></HTML>