Fork me on GitHub
#clara
<
2019-05-19
>
Drew Verlee02:05:18

Whats the difference from a query and a rule in rules engines in general. As i understand it. a rule is propositional logic "if X then Y" / X :- Y. But is query something else or is it just a rule where X is some direct match lookup?

Drew Verlee02:05:44

It seems in clara that rules can have arguments, is that right?

mikerod02:05:08

@drewverlee queries gives you an external hook to pull data from the session. It has no RHS. When you “call” the query you get the matches as a result. The match’s have all the variable bindings of the rule bound by those keys for you to access.

👍 4
mikerod02:05:39

You can parameterize a query. When you call it, you bind those parameters.

👍 4
mikerod02:05:04

Normal rules can’t be parameterized like this because you don’t “call” into rules directly.