I think Guoli Li wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > sorry not to describe my problem clearly. Thanks in advace for your help. I > try to explain it here.
Most partial matches -- those from rules that do any useful work, really -- involve unification between slots of multiple facts. Therefore, you don't actually know whether any one fact can ever activate a rule until a partner comes along for it. Now, it's true that there are some facts that can't, by definition, ever match any of your rules, in and of themselves. You can either (a) don't assert these in the first place -- i.e., include a sort of "filter" on the asserted facts (perhaps you could use defadvice to build this into the 'assert' function), or (b) write a rule to match these orphan facts, and immediately delete them. Another thing you might do is to implement timestamps. Each fact can have a timestamp slot, and you can have one or more rules like (defrule remove-old-e1 ?e1 <- (e1 (timestamp ?ts)) (timestamp ?t&:(> 10 (- ?t ?ts))) => (retract ?e1)) You'd need a timestamp fact that was updated periodically; there's a description of something like this in the FAQ at the Jess web site. That way facts that have hung around for some period of time are automatically discarded. But in any case, no, there's no capability in Jess to find out whether a single asserted fact was stored in any beta memory of the Rete network, and there's no easy way to add something like that in. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs 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] --------------------------------------------------------------------
