Forward Chaining Inference

Forward chaining inference rules are required when reasoning is based on complex inter-linked conditions. We use RETE-based inference forward chain business rule to implement complex rule-based, decision making for production or expert systems using .Net framework. Forward chaining starts with the available data and uses inference rules to extract more data (from an end user, for example) until a goal is reached.

Our rule engine uses RETE algorithm, which is an efficient pattern-matching algorithm for implementing production rule systems.

Your application needs a forward chain inference engine if:

  • It needs to implement a pattern-matching algorithm.
  • It requires a data-driven reasoning mechanism.
  • It needs a runtime and on-the-fly decision based on the facts and rules.
  • It is a rule-based, decision making or expert system implemented in .Net framework.
FlexRule Forward Chaining Inference

Whenever new facts are asserted into a system, many rules may need to be re-evaluated to determine which are satisfied by these facts. A brute-force implementation could simply re-evaluate all existing rules against the newly introduced facts. This approach would achieve a result but would exhibit a very poor performance, as the number of rules and facts being considered have increased. Dr. Charles L. Forgy developed an algorithm that constructs a sophisticated network of nodes to represent the conditions associated with each rule and the dependencies between those conditions.

The forward chain engine allows an on-the-fly change of facts in the dependency network. What it means is that in inserting and removing facts in and out of the system, the forward chain engine knows how to affect the agenda without re-executing all the rules. Also, the forward chain engine knows how to share the evaluated result of the conditions between different rules. The forward chain engine allows changing of the value of a fact inside the system. The engine automatically triggers related conditions and rules.

Our RETE network supports:

  • Dynamic addition of working element memory
  • Dynamic deletion of working element memory
  • Modification of  working element memory

During execution, the engine allows the changing of the condition and rules. What it means is that there would be a capability to change the condition and dependency network as an action executes a rule.

We support:

  • Dynamic addition of productions to network
  • Dynamic deletion of productions from network
The assertion of facts will cause an evaluation of the network of conditions that are dependent on the asserted facts. If the conditions are satisfied, the facts will be sent down the stream until they reach the agenda.


Afterwards, the activation of that node will be executed. When multiple facts reach the agenda, the conflict resolution strategy will help to prioritize the activation mechanism.

Two types of mechanism exist to use the forward chain engine. One uses XML to create a procedural rule and use the related commands of the inference engine. Alternatively, if the application requires more control over the forward chain engine, our business rules engine framework provides an API level of communication to the forward chain engine.


All of this means that your application itself will be managing the facts, conditions, productions, agenda, and activation and will work with these things directly.

Don’t Miss Your 30 Days Free Trial Licence With Free Support