You can slightly augment my "forall" version to fire once for each good set,
given that bag-of-items has some kind of identifier; I'll assume a slot named
"id". It doesn't matter what the contents are:
(defrule check-bag-valid
(bag-of-items (id ?id) ))
(forall
(bag-of-items (id ?
On 30/07/2013, Aurelien Mazurie wrote:
> Thank you very much for this answer. It seems like 'forall' will fire the
> rule only if all the 'bag-of-items' facts are validated (i.e., if all of
> them have 'item' facts with the names listed in their 'names' slot). Is that
> correct?
Yes.
>
> If yes,
Thank you for this tip. It is not what I am trying to achieve, however. I must
apologize if my original email was misunderstood.
My goal is to write a rule that would fire for any 'bag-of-items' fact whose
item names, as listed in a multislot, are all represented by 'item' facts. The
rule shoul