Interesting.. I definately am finding cases where I have rules that have all their conditions met on the LHS.. there is NOTHING for the accumulate part to match on.. and the rule doesn't fire heh.

I'll try to find a concrete example with some facts I can display etc.  Basically if I add 'junk' to the LHS, it fires.. if I leave it slimmed down.. it doesn't.. but the 'junk' I add, doesn't match/touch the pattern that is in place (and isn't working).

Thanks
Roger


On 12/2/05, Tromm, Martijn <[EMAIL PROTECTED]> wrote:

Yes, that's how you can sweep a lot of data of different type together in one rule. The rule still fires of some types are not present.

 

Martijn

 


From: Roger Studner [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 2 december 2005 13:19
To: jess-users@sandia.gov
Subject: JESS: Accumulate Function - LHS

 

Are there situations or usages of (accumulate) that would actually prevent a rule from firing?

    ?c <- (accumulate (bind ?count 0)                        ;; initializer
            (bind ?count (+ ?count 1))                    ;; action
            ?count
            (pattern to look for.. single fact, not even complex)
            )

If there are *no matches* to this pattern, should it always fire and have ?c bound to zero?

Thanks,
Roger


Reply via email to