One Rule Firing Multiple Times
- We said that if the LHS matches, then the rule is put into the
conflict set.
- It's unusual for the RHS to change the LHS so most rules should
remain in the conflict set. (Did you follow that?)
- They don't.
- If a rule has been applied, it won't be applied again unless
one of the things the LHS depends on changes, or if there
are mutliple ways of it applying.
- The simplest way to get a rule to fire twice is that it applies
on multiple pieces of data:
- if (isdog ?x)=>(assert (issmelly ?x)))
with the two facts (isdog lassie) (isdog SantasLittleHelper)
- The other way is to change the value the LHS depends on.