I think portalguy wrote:

> (defrule changeAncestorJohnTitle
> "Need to change Bart's ancestor John title to Dr"
> ?bart<- (Person (Name Bart)(Ancestors $?ancestors))
> ?p <- (Person (Name John))
> (test (member$ ?p ?ancestors))
> =>
> (modify ?p (Title Dr))
> (printout t ?p crlf))

The reason this goes into an endless loop is that you're modifying one
of the facts the rule depends on, but the modified fact stillo matches
the rule. Just change the rule so that the modified fact won't match
-- i.e.,

 (defrule changeAncestorJohnTitle
   "Need to change Bart's ancestor John title to Dr"
   ?bart <- (Person (Name Bart)(Ancestors $?ancestors))
   ?p <- (Person (Name John) (Title ~Dr))
   ...


---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software 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