Fork me on GitHub
#clara
<
2017-02-12
>
mike_ananev18:02:38

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

apbleonard20:02:57

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.

apbleonard21:02:47

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

mike_ananev22:02:23

@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.