Fork me on GitHub
#clara
<
2020-10-01
>
mikerod15:10:13

@petr I guess it isn’t really documented that well - but this relates http://www.clara-rules.org/docs/fact_type_customization/

mikerod15:10:23

but is more specific than the general case you probably care about.

mikerod15:10:45

In general though, the type matching dispatch for rules is done via clojure.core/type

mikerod15:10:14

but you can customize that dispatch via :fact-type-fn and :ancestors-fn if you have “hierarchical relationship”

mikerod15:10:31

my gist I shared mentions this stuff briefly and references the source doc

bmaddy15:10:01

I'm potentially going to be using clara for a situation where end users will be writing their own rules. I'm concerned that the rules will get really complex with non-developers writing them. Are there any techniques to automatically find candidates for new rules that would simplify multiple other rules (like abstracting common clauses out)? One idea I had when I noticed clara converts expressions to disjunctive normal form was to use that along with karnaugh maps to simplify expressions. Has anyone heard of something like that being done before? Is this a crazy idea?