The KnowledgeWorks forward chaining engine is based on the RETE algorithm (see Rete: A Fast Algorithm for the Many Pattern/Many Object Pattern Match Problem by Forgy in Artificial Intelligence 19 , September 1982). A data flow network representing the conditions of the forward chaining rules (a RETE network) is maintained and this keeps lists of the instantiations and partial instantiations of rules. This structure is modified at runtime as objects change. The RETE algorithm relies on the tacit assumption that during the forward chaining cycle relatively few objects change (hence there are relatively few changes to be made to the network each cycle), and in these cases gives a huge increase in performance speed.
KnowledgeWorks and Prolog User Guide (Unix version) - 6 Dec 2011