Rete Implementation for Ruby