Fork me on GitHub
#clara
<
2017-02-13
>
mikerod21:02:38

@mike1452 @apbleonard the 2nd variant could actually cause an infinite loop since Clara’s insert! will do some automatic truth-maintenance which can hang indefinitely if you have a “logical loop"

mikerod21:02:29

However, the 1st variant sounds to be more of what you were asking. You have to deal with duplicated inserts yourself. You could have rules all insert some fact like B there, then have some “final”/”outcome" rule(s) or query(s) that use an accumulator that you can make decide which facts are the most relevant or correct when you get into a situation of “contradictions"

mikerod21:02:16

However, I think you were also wanting the engine to tell you about these rules so you could remove them perhaps? That would be something you’d probably have to workout yourself. Sounds domain-specific.

mikerod21:02:50

It isn’t really clear what a “contradicting” rule means from the rules engine’s perspective. With the exception of logical contradictions, but those also aren’t even clear in the engine right now since the RHS can insert basically anthing

mikerod21:02:17

and the LHS can test constraints that aren’t simple to statically analyze.