Fork me on GitHub
#clara
<
2017-12-20
>
mikerod14:12:37

@amarjeet thatnks for sharing more there

mikerod14:12:53

So the first level of discrimination in the rules network is going always “fact type”

mikerod14:12:08

However, the combination of :fact-type-fn and :ancestors-fn give you flexibility into what that means

mikerod14:12:19

The default :fact-type-fn is Clojure’s clojure.core/type, which is just (or (get (meta x) :type) (class x))

mikerod14:12:40

The default :ancestors-fn is clojure.core/ancestors which respects the “global hierarchy” in Clj which can be altered via things like derive

mikerod14:12:05

:ancestors-fn is just for making the supertype subtype relationships that factor into the fact type dispatch

mikerod14:12:35

You don’t necessarily have to have a “fact type” if you really don’t want, or you can make it something that is based on the data of the map entities you have

mikerod14:12:53

(def session-one (mk-session 'modelxt.absmodel :fact-type :name)) for example, although that isn’t very suitable for the rule add-entity that you have

amarjeet16:12:20

hmm, understood

amarjeet16:12:57

Will re-look at the fact-type-fn/ancestors-fn

mikerod16:12:55

No problem