Problem with constraints
When a constraint ! :- p(X)
is triggered, it simply adds the atom <⊥>()
to the factbase. I did not see any way to test if this atom belongs to the factbase, so I don't know when it is absurd.
from py4graal import *
graal = Graal()
rb = graal.create_rulebase("! :- p(X).")
print(graal.create_factbase("p(a).").saturate(rb))
Output:
p(a), <⊥>().