You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be handy to match on "explanation". We do not currently allow this. For one, ":a" must be a keyword. It might get too crazy even for us if we endeavored to support a function in this slot, though it would allow dynamic type matching. That may not be possible without rewriting the rule using a macro, as I'm not sure Clara supports this directly.
We could match on attribute namespace within a rule with the syntax explanation/* by adding the necessary logic to our default fact-type function.
The text was updated successfully, but these errors were encountered:
Might be easier to implement (depends on how much we're using the ancestry data structure vs. the ancestors function, which allows an arbitrary predicate like ":explanation.*")
Might be more performant than converting keywords to strings etc
Disadvantages:
Not as much of a visual indication that a hierarchical match is taking place, though Clojure's idiom of "leaf" namespaced attributes containing / does provide this information
With either approach we would match on something like explanation.rule.condtions/constraint that could have 1000x more facts than the ancestors at the depth level above. If we wanted to support direct descendant matching only, a variant on the keyword + * syntax could be provided. Not clear how we could represent something like first descendants with a namespaced keyword hierarchy.
When we have attributes that share the same namespace, e.g.:
it would be handy to match on "explanation". We do not currently allow this. For one, ":a" must be a keyword. It might get too crazy even for us if we endeavored to support a function in this slot, though it would allow dynamic type matching. That may not be possible without rewriting the rule using a macro, as I'm not sure Clara supports this directly.
We could match on attribute namespace within a rule with the syntax
explanation/*
by adding the necessary logic to our default fact-type function.The text was updated successfully, but these errors were encountered: