Tabling avoids recursion issues with backward chaining. Tabling is
surprisingly simple to implement:
http://www.cs.sunysb.edu/~warren/xsbbook/node14.html
http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=80BE871521B0C3B9...
Anyone want to give it a go? Pop onto irc and i'll happily talk you
through it.
http://www.jboss.org/drools/irc.html
Mark