Forward Chaining

The inference engine starts by posting rules, which may exist directly in the INFER block or in rule methods called from the INFER block. Initially, all rules have a state of Ready.

The engine visits the rules in priority order. This is not necessarily the order in which they were posted, but the order specified by their priority keyword.

Then, the engine proceeds to the next Ready rule in the priority order and fires, fails, or pends it.

Whenever a rule fires and its action makes an assignment to an attribute for a pended rule, the engine takes notice. It changes the rule dependent on the attribute from Pended to Ready and, thus, readies the rule for further consideration. The engine then goes back to the top of the posted-rule list and takes another pass at the Ready rules, visiting them in priority order.

Forward chaining can end in three ways. You can:


Copyright © 2009 CA. All rights reserved. Send E-mail to CA about this topic