I think roberval.rao wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 
> Hi all,
> I've looked in JESS in Action: not, test and exists, and 
> isn't firing a rule
> that should advise user that an object was not found. In the 
> following code
> ?x is the element I'm looking for. What should I do?
> 
> (defrule object_not_found
> (not (exists (object (is-a vine)(name ?x))))


"(not (exists (..." is equivalent to "(not (not (not (..." which,
being an odd number of "not"s, is precisely equivalent to a single
"(not (..." (except it's less efficient, of course.)


> =>
> (printout t "Not found!!!!!.")
> )

There are plenty of things you could be doing wrong. For instance,
this rule won't work unless you've called (reset) before asserting all
the facts (reset asserts the (initial-fact) which is used by the "not"
conditional element.) Another possibility is the trivial explanation
that there in fact *is* a fact with "(is-a vine)" and so the rule
*shouldn't* fire.



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
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