This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-06
Channels
- # adventofcode (112)
- # announcements (6)
- # beginners (197)
- # boot (3)
- # calva (52)
- # cider (25)
- # clara (14)
- # cljdoc (6)
- # clojure (147)
- # clojure-austin (6)
- # clojure-berlin (7)
- # clojure-brasil (2)
- # clojure-europe (3)
- # clojure-india (4)
- # clojure-italy (8)
- # clojure-new-zealand (2)
- # clojure-nl (7)
- # clojure-russia (7)
- # clojure-spec (29)
- # clojure-uk (63)
- # clojurescript (103)
- # core-async (5)
- # cursive (11)
- # datomic (16)
- # devcards (1)
- # emacs (28)
- # figwheel-main (3)
- # fulcro (97)
- # graphql (4)
- # hyperfiddle (1)
- # jobs (1)
- # kaocha (3)
- # lumo (9)
- # nrepl (4)
- # off-topic (29)
- # onyx (1)
- # pathom (4)
- # pedestal (8)
- # re-frame (24)
- # reagent (1)
- # reitit (13)
- # ring-swagger (7)
- # rum (11)
- # shadow-cljs (79)
- # sql (46)
- # tools-deps (67)
- # yada (8)
Hello! I'm trying to get some explanations for my rules, but clara.tools.inspect/explain-activations
doesn't print anything at all. With clara.tools.inspect/inspect
I get a map but :fact->explanations
is nil:
{:rule-matches
{{:ns-name validator.typing,
:lhs
[[:not {:type validator.typing.LowCardinality, :constraints []}]],
:rhs (do (c/insert! (->ColType :t))),
:props {:salience -100},
:name "validator.typing/text",
:doc "The column is textual when cardinality is not low"}
(),
...
:query-matches ...
:condition-matches
{{:type validator.typing.ColInfo, :constraints [(= 1 non-num-vals)]}
(),
{:type validator.typing.LowCardinality, :constraints []} (),
...
:insertions
{{:ns-name validator.typing,
:lhs
[[:not {:type validator.typing.LowCardinality, :constraints []}]],
:rhs (do (c/insert! (->ColType :t))),
:props {:salience -100},
:name "validator.typing/text",
:doc "The column is textual when cardinality is not low"}
(),
...},
:fact->explanations nil}
OK, I re-read the docs, and I can't understand what is meant by 'logical insertions". Isn't this inserting a fact on the RHS of a rule? The one above is inserted in the RHS of a rule, but there's no explanation for it...
it is referring to insertions that are managed by the truth maintenance system (TMS) of the engine. If the rule is found to later become unsatisfied in its LHS, the logically inserted fact will be automatically retracted.
I don’t think that is your main question though, you are wondering why :fact->explanations
is nil above
What you have above, if you look at :insertions
, it is saying that the rule :name
validator.typing/text
had no facts inserted as a result of it.
So the result of this is that you have no facts that were inserted from a rule, so there are no :fact->explanations
to show