A subset of Prolog written in Ruby