Hey, What I am trying to do is this:
(deftemplate person (slot name) (multislot friend) ) Now lets say I assert a fact like (assert (person (name julia) (friend mary))) However, mary is not liked so (assert (dislike mary)) I would like to add a rule that says, do not allow julia because she is friends with mary who is disliked. I wasn't able to find out how to do this. Any help would be greatly appreciated. Thanks, Neha. Wolfgang Laun-2 wrote: > > Well, it's not quite clear to me what you actually want to do, > and so I refrain from replying with a blunt rewrite of your > rule. Consult sections 6.4, Matching in Multislots, and 6.10, > The 'not' CE, of the Jess manual. I have a gut feeling that > the solution to your problem is among and along those lines. > -W > > On Sat, Mar 7, 2009 at 9:12 AM, NehaP <[email protected]> wrote: > >> >> Hi, >> >> I'll first describe what I wish to do. >> >> I have a template of the form >> (deftemplate person >> (slot name) >> (multislot friend) >> ) >> >> And I have a rule of the form >> (defrule allow >> (person (slot ?name) (friend $?friend)) >> ; No friend among $?friend should be asserted as (dislike ?friend) >> ; For example, lets say I have asserted (dislike jojo), no person who >> has >> jojo as friend should be allowed >> => >> (assert (allow ?name)) >> ) >> >> How do I do this? >> I hope I have made my problem clear. >> >> Thank you. >> Neha. >> -- >> View this message in context: >> http://www.nabble.com/Check-assertion-of-multi-slot-values-in-LHS-of-rule-tp22385397p22385397.html >> Sent from the Jess mailing list archive at Nabble.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]. >> -------------------------------------------------------------------- >> >> > > -- View this message in context: http://www.nabble.com/JESS%3A-Check-assertion-of-multi-slot-values-in-LHS-of-rule-tp22388880p22391193.html Sent from the Jess mailing list archive at Nabble.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]. --------------------------------------------------------------------
