Home / Glossary / Forward inference

Forward inference refers to a mode of inference in which rules fire as soon as their antecedents become true.

“Forward” is also one of the possible values for direction that an assertion may have. If an assertion is :forward, it may participate in both forward and backward inference.

Forward inference example: Suppose the KB already knows

(isa Leaf0037 Leaf)

Suppose a user or application program asserts the following as a forward rule:

(implies 
  (isa ?LEAF Leaf)
  (colorOfObject ?LEAF GreenColor))

As soon as that axiom is asserted, Cyc will detect that its antecedent is satisfied by #$Leaf0037, fire the rule, and add the conclusion:

(colorOfObject Leaf0037 GreenColor)

to the KB. Unlike backward inference, this happens automatically without needing to be triggered by asking a query. Also note that the addition of the new conclusion might itself trigger further forward inference, e.g., if there are rules that have a #$colorOfObject literal in their antecedent.

All else equal, the results of forward inference should not depend on the order in which the assertions are added to the KB: If the forward rule was added first, and it was later asserted that #$Leaf0037 was an instance of #$Leaf, the rule would fire at that time (but note that pragmatic meta-knowledge about the rule might cause certain antecedent literals not to trigger the rule — see forward non-trigger literal and Logical Warrant vs. Pragmas).