@wparker for large-ish rule sets, visualization is an extremely tricky problem in my experience
Once it gets past 25-30 fact types and 100+ rules it’s a mess
The graph I’ve produced, even with distinct edges is huge and mostly incomprehensible.
Imagine this scenario: you walk up to a system like this, and you know nothing about the “steps” that exist within the maze of fact types and rules that operate over them. Assume that 99% of rules produce a fact on the RHS.
What you want, is to try and tease out the clusters of logic.
There are so many variables that make this problem difficult to generalize.
For instance, whether people write fat or skinny rules, whether they have a few types with a lot of fields or a number of facts with variants, etc
@wparker to your point though about code organization. yeah, that's really important.
we have ~28 files containing rules
I’ve made some devtools for Precept. There could be some reuse for Clara if there’s interest
@alex-dixon interested in taking a look!
@alex-dixon where should i look for that code?
or is there a simple example around that i could use to see what's there?
The visual part is in a private repo I need to make public. The code that gets the data from the session is here https://github.com/CoNarrative/precept/pull/113
cool!
The basic approach is to attach a listener and put what it gives you onto a core async channel
sequential rule operation log, state history over time, etc. are all interesting to me
@alex-dixon this is exciting. thanks for your work.
Thanks 😊. That means a lot
@alex-dixon lazy clara user writes: please do this for clara too? 🙂
Lol
What would be helpful?
explanations and sequential rule operation log stick out
fact history, also
@alex-dixon uploaded a file: https://clojurians.slack.com/files/U27USQ50Q/FAP0Z8M88/image_uploaded_from_ios.jpg
does that slider at the bottom let you time travel?
and scrub through firings?
Yeah
that's slick!
There’s also fact tracking and rule tracking outside of that
History of a fact, history of a rule
super cool. gimme gimme gimme
😄
Lol. Thanks. I’m curious about your use case. Not sure how to approach the same with Clara when sessions can be used a lot differently than with ui
@alex-dixon one obvious one would be for development/debugging. i want to scrub through what is matching and where.
it might also be helpful for finding any nasty cases where we walk down a big branch of logic only to undo all of it due to truth maintenance. perhaps we missed a constraint.