[rules-users] Non short circuit ANDing

Wolfgang Laun wolfgang.laun at gmail.com
Wed Jan 30 13:47:18 EST 2013


A lively discussion, which just emphasizes that this is a hot topic.

[Before I discuss the technicalities: I'll really put the draft
version of the White Paper on my private home page around 10pm UTC
unless I receive information that Red Hat has published it.]

When a rule depends on n simple constraints, full information requires
n individual evaluations (rules) while recording the results. You
could generate these rules automatically from a set of attributes and
related constraints (like a single row in a spreadsheet), provided
that you don't need any cross-references between facts. (It might be
possible to have a common subset of patterns for these n rules;
"extends" could be used.) But, to support the evaluation of the n
results, you need some infrastructure for identifying them, and for
collecting them, together with a reference to the pertaining fact(s).

This information could be collected automatically "behind the scenes"
from the rules that do fire, out of the set of n rules. But the user
would have to provide the logic for the final evaluation, using the
automatically generated identifiers for the n truth values, which
could be implemented as two low-salience rules - one for all n true,
the other one for all other cases.

Note that n conditions partition the n-dimensional value space of a
fact into n^2 cubicles, out of which one is the hot-spot for success.
Out of the remainder, any number of their combinations might be of
interest for an application. For instance, there are n "near misses",
where only one constraints is false. (In internet shopping, for
instance, this might be the situation where you might propose an
alternative...)

I'm not sure whether there is enough common ground for an
out-of-the-box solution that could be added to Drools. Providing a
demo solution for the case I have outlined here is another matter...

Cheers
Wolfgang


More information about the rules-users mailing list