Fork me on GitHub
#clara
<
2018-06-16
>
sparkofreason15:06:53

Just a quick brain-bubble on this topic: I wonder if there could be a sort of "debug mode" where during fire-rules a graph is built for the causal relationships, e.g. Fact A -> Rule B -> Fact C -> Rule D... That graph could be analyzed for cycles. Haven't thought this through at all, and would guess it isn't perfect, but perhaps better than nothing?

alex-dixon16:06:22

I think for Clojure :no-loop true can be provided in the properties map. I’ve heard it mentioned a couple times

mikerod17:06:01

@dave.dixon the thing is that it isn’t clear it is actually looping just because it goes through the same rule path a few times. RHS can do arbitrary logic. Including have different paths they may take via conditionals.

mikerod17:06:44

Some sort of general warnings could be nice perhaps that suggest that “maybe” there is a loop though

mikerod17:06:09

@alex-dixon yep. It exists. Don’t generally recommend it unless the use case really makes sense to use it.

mikerod17:06:33

Typically it’s best to solve the problems just purely via the logical TMS if practical.

sparkofreason17:06:49

Yeah, it's another version of the halting problem. But it might be a nice way to get some visibility on the causal structure, and highlight loops that are unexpected.

mikerod18:06:10

Yes indeed