Fork me on GitHub

In terms of Clara having truth maintenance by default, note that whether truth maintenance is used determined by whether insert! or insertion-unconditional! is used, either of which the user opts into. Since we generally feel that using truth maintenance is a better starting point, that is what examples in docs etc. tend to use. In terms of logic on entering a state or leaving it, do you mean within a rules session fire-rules call or between calls? In the case of the former, note that the guarantees from Clara concern the final state after fire-rules complete, not intermediate states. It tries to avoid creating states during fire-rules that will need to be retracted before returning for performance reasons, but this is expected behaviour in some cases. So something like (defrule yourrule …. (state-change-when-activated!)) may not behave as you expect. Otherwise perhaps between fire-rules calls you could run a query and store the result?

👍 3