Rete algorithms