clara

http://www.clara-rules.org/
devn 2018-05-14T06:18:27.000079Z

@wparker for large-ish rule sets, visualization is an extremely tricky problem in my experience

devn 2018-05-14T06:19:39.000084Z

Once it gets past 25-30 fact types and 100+ rules it’s a mess

devn 2018-05-14T06:22:11.000283Z

The graph I’ve produced, even with distinct edges is huge and mostly incomprehensible.

devn 2018-05-14T06:25:10.000276Z

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.

devn 2018-05-14T06:26:56.000024Z

What you want, is to try and tease out the clusters of logic.

devn 2018-05-14T06:32:58.000276Z

There are so many variables that make this problem difficult to generalize.

devn 2018-05-14T06:45:00.000121Z

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

devn 2018-05-14T23:04:15.000066Z

@wparker to your point though about code organization. yeah, that's really important.

devn 2018-05-14T23:07:48.000062Z

we have ~28 files containing rules

alex-dixon 2018-05-14T23:08:18.000362Z

I’ve made some devtools for Precept. There could be some reuse for Clara if there’s interest

➕ 1
devn 2018-05-14T23:09:34.000193Z

@alex-dixon interested in taking a look!

devn 2018-05-14T23:10:28.000240Z

@alex-dixon where should i look for that code?

devn 2018-05-14T23:10:44.000341Z

or is there a simple example around that i could use to see what's there?

alex-dixon 2018-05-14T23:14:34.000032Z

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

devn 2018-05-14T23:15:07.000185Z

cool!

alex-dixon 2018-05-14T23:15:56.000335Z

The basic approach is to attach a listener and put what it gives you onto a core async channel

devn 2018-05-14T23:16:20.000155Z

sequential rule operation log, state history over time, etc. are all interesting to me

devn 2018-05-14T23:17:21.000072Z

@alex-dixon this is exciting. thanks for your work.

alex-dixon 2018-05-14T23:19:02.000359Z

Thanks 😊. That means a lot

devn 2018-05-14T23:20:50.000255Z

@alex-dixon lazy clara user writes: please do this for clara too? 🙂

alex-dixon 2018-05-14T23:21:08.000004Z

Lol

alex-dixon 2018-05-14T23:21:26.000241Z

What would be helpful?

devn 2018-05-14T23:24:18.000328Z

explanations and sequential rule operation log stick out

devn 2018-05-14T23:24:54.000063Z

fact history, also

devn 2018-05-14T23:27:18.000361Z

does that slider at the bottom let you time travel?

devn 2018-05-14T23:27:35.000001Z

and scrub through firings?

alex-dixon 2018-05-14T23:27:38.000003Z

Yeah

devn 2018-05-14T23:27:42.000172Z

that's slick!

alex-dixon 2018-05-14T23:28:07.000258Z

There’s also fact tracking and rule tracking outside of that

alex-dixon 2018-05-14T23:28:54.000010Z

History of a fact, history of a rule

devn 2018-05-14T23:30:15.000105Z

super cool. gimme gimme gimme

devn 2018-05-14T23:30:18.000410Z

😄

alex-dixon 2018-05-14T23:31:50.000105Z

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

devn 2018-05-14T23:34:14.000030Z

@alex-dixon one obvious one would be for development/debugging. i want to scrub through what is matching and where.

devn 2018-05-14T23:37:47.000108Z

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.

👍 1