lets say the rule fired, but sometime later one of the facts that triggered it is retracted (aka removed). As mark said, the rule can't "unfire" since it already executed. If some times passes and a new fact is asserted, which satisfies all the conditions of the rule, it will fire again. Strictly speaking, the second time the same rule fires is because a new set of facts triggered it.
in practice it gets a little bit more complicated that than. If a reasoning cycle asserts and retracts facts, it could be that several rules match. When the application calls fire() to execute the consequences of the rule, it could retract or modify facts. In that case, some of the activations in the agenda that haven't executed could be removed as a result of modify or retract. If any change to the facts in the workingMemory causes a rule to no longer match fully, and the activation hasn't beed executed, it will be removed and will never fire. peter On 3/24/06, Peter Van Weert <[EMAIL PROTECTED]> wrote: > > Mark Proctor wrote: > > Rules cannot "unfire". However activations can be cancelled. When there > > are no honest politicians an Activation will be created, and potentially > > fired, if an honest politician is later asserted any activations > > dependenant on this will be cancelled. So the truth is maintained, with > > regards to Activations. > > Ok, I see. I suspected as much. First: thanks for the immediate anwer, > but that was not really what I was wondering about. I was wondering > about what would happen if the rule fired, became unapplicable and later > applicable again (because a fact got removed e.g.): would it fire again? > As I said in a previous reply, I could of course check it myself, but I > am lazy ;-) > > Yours, > Peter > >
