Fork me on GitHub

Yeah, to expand some on @wparker’s point: truth maintenance (aks tms) is one of the more emphasized practice in Clara. It’s optional, but when you abandon it you introduce order-of-evaluation-dependencies within the rules. It can be easy to get in inconsistence states when managing it all unconditionally. Typically, ideally, you’d be able to run the rules with full truth maintenance as somewhat of a “pure fn”. You’d then use a query on some derived facts to drive external processes and side effects. To “update” the rules after, you could call some external extract on the rulebase and re fire-rules, then rerun the query and do it all again.


In this way, you could have the rules be fully consistent with respect to truth maintenance within a single fire-rules (final state result) cycle.