Implementation of the Rete-OO algorithm.