Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!ira.uka.de!sun.rhrk.uni-kl.de!uklirb!shell From: news@dftsrv.gsfc.nasa.gov Newsgroups: comp.ai.shells Subject: Re: CLIPS problem Message-ID: <8058@uklirb.informatik.uni-kl.de> Date: 11 Jun 91 22:33:12 GMT References: <8023@uklirb.informatik.uni-kl.de> Sender: shell@uklirb.informatik.uni-kl.de Distribution: world Organization: NASA GSFC Lines: 53 Approved: shell@dfki.uni-kl.de Posted-Date: Sun Jun 16 11:48:47 GMT 1991 In article <8023@uklirb.informatik.uni-kl.de>, causse@lifia.imag.fr (Olivier Causse) writes: > Here is the problem, I'd like to express the following LHS condition > > (defrule problem > [(<>)] > (not > (and > (A ?x ?y) > (B ?x ?z&:(neq ?z ?y)) > ) > ) > [(<>)] > => > ... > ) > > I know that AND and OR logic blocks may not be placed inside of a > NOT pattern. > > In fact, I'd like to know > > 1) Why such a restriction ? > 2) How to express the same condition in another (generic) way ? Well the main purpose of the NOT operator is to test for the non-existance of a pattern. One good reason to have such a restriction is the ambiguity of the statement. Does the AND imply that you are testing for the existing of both patterns? If what you want to do is check for multiple patterns that do not exist you can just have multiple not statements as follows: ... (not (A ? ?)) (not (B ? ?)) ... Or in your case are you just using it as a negation operator? If this is true, wouldn't the following be logically equivalent: (defrule problem [(<>)] (A ?x ?y) (B ?x ?z&:(eq ?z ?y)) [(<>)] => ------------- Robert Dominy NASA Goddard Space Flight Center