Say I have this simple program:
pyDatalog.create_terms('aa,cc,Y,Z')
+ aa(11)
+ aa(40)
+ aa(112)
cc(Z) <= aa(Z) & (Z > 50)
cc(Z) <= aa(Z) & (Z < 20)
print pyDatalog.ask('cc(Y)')
I get:
(Which is what I expect to get).
My question is, can I combine the two lines:
cc(Z) <= aa(Z) & (Z > 50)
cc(Z) <= aa(Z) & (Z < 20)
Into a single line, something like:
cc(Z) <= aa(Z) & ((Z > 50) or ( Z < 20 ))
I get an error:
pyDatalog.util.DatalogError: Error: left hand side of comparison must be bound: >/2
Am I trying to achieve the impossible or am I missing something obvious? I know that in Prolog it's possible to do something like that using the ';' syntax...
Thanks!