"slot-specific" means that modifications to slots that are not matched in the conditions of a rule won't cause the rule to be activated. But this rule matches the "data" slot, and modifies that same slot, so it's an infinite loop -- and it's supposed to be.
If you want to break this infinite loop specifically, then that's what the "no-loop" declaration in defrules is for. Perhaps that's what you were thinking of in the first place. I think yuping he wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > ** > *Hi, I have the following piece of code* > It just adds two words to the row template > Both are slot-specific TRUE, however, myrule gets reactivated after row > templates being modified (infinite loop) > > *(clear) > (reset) > (watch all) > (deftemplate row (declare (slot-specific TRUE)) (slot y) (multislot data)) > (deftemplate word (declare (slot-specific TRUE)) (slot y) (slot text)) > (assert (row (y 0))) > (assert (word (y 0) (text a))) > (assert (word (y 0) (text b))) > (defrule myrule > ?row <- (row (y ?y) (data $?data)) > ?word <- (word (y ?y) (text ?text)) > => > (bind $?data (insert$ $?data (+ (length$ $?data) 1) ?text)) > (printout t $?data crlf) > (modify ?row (data $?data)) > ) > (run)* > ** > *Thanks. > Yuping* --------------------------------------------------------- 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] --------------------------------------------------------------------
