Fork me on GitHub

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


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"


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.


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


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