Many rules programmers prefer splitting an OR rule into multiple rules, in
order to minimize the complexity of the rules, standardize the format, and
make rules understandable and maintainable long-term. Splitting a rule
provides an implicit OR mechanism because of how rules are activated anyway.
So, you don't lose expressive power by not being able to OR explicitly on
the LHS.

> -----Original Message-----
> From: Ernest Friedman-Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 19, 1999 6:30 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: JESS: OR and AND in rules
> 
> 
> The "or" conditional element is something I'm promised to add for a
> while. It requires some structural changes that are trickier than
> you'd think (at least, so far, trickier than I've been able to clearly
> lay out.) Until then, as a user suggested, multiple rules are the only
> way to alternate patterns; alternatives within a single slot can use
> the "or" function or the '|' predicate constraint (see 5.0a6 Manual
> section 2.8.1).
> 
> I think Message UK wrote:
> > 
> > Hi all. I would like to be able to use an OR in a rule, 
> like "if this is the 
> > case" OR "this is the case" then fire rule X.
> > 
> > In some rules I have listed several conditions, which I 
> have assumed works 
> > as an AND:
> > 
> > (defrule worried_AIDS
> >  >>  ?u <- (user(hiv_status "pos"))
> >  >>  ?e <- (enquiry (type G3)(value "done"))
> >     =>
> > 
> >     ...etc...
> > 
> > is that right? is it ANDed? How do I do an OR? (if it's 
> possible)? And if 
> > the above is in fact an OR, how do I do an AND??!!
> > 
> > Tres thanks. Debbie Lampon
> > 
> > 
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.com
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users 
> [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > list (use your own address!) List problems? Notify 
> [EMAIL PROTECTED]
> > 
> ---------------------------------------------------------------------
> > 
> > 
> 
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill  
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9214                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users 
> [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify 
> [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to