I'm still battling with the RuleCompiler but I think I've found a way forward now. Part of the problem is that I have no way of handling expressions in the LHS. I think it's possible to add an expression node or similar to the network. I'm spending most of this weekend going through Sumatra, JBoss Rules and CLIPS source code to look for pointers.

Also, to take my mind of the RuleCompiler issue I've implemented an interactive console for pyRete.

>>> import pyRete
>>> pyRete.interact()
pyRete> @Rule
....... def foo(a = int):
....... if a == 2:
....... print a
pyRete> assert_fact(2)
pyRete> run()
pyRete> ^Z
It's not much and it's not too pretty but it only took a couple of hours to make and it will do for now.

Inga kommentarer: