Fork me on GitHub

Hi! Can Clara detect a rule collisions? If rule C contradicts to rule A ?


Fairly new to Clara but ... it probably depends slightly what you mean. If you have a rules like "if A then B = 1" and "if A then B = 2", then when you query the session for values of B (assuming A is true) you'll find two values in the lazy sequence returned by the query function.


If you have rules like "if A then B" and "if B then retract A" ... well, I haven't got that far yet!


@apbleonard yeah, first variant with two answers is correct, i think. second variant is not, cause "if A then B" will insert fact B, but if retract A then B will be retracted automatically. my question about contradiction was about case if some big organization issues new policy about smth, i want to check that rules in new policy are not contradict to older policies. so i want to find collisions before new policy is issued.