Hi all,

Under what conditions could the addition of an (exists <pattern>) around
a <pattern> cause a rule NOT to fire?

Background:

I have a rule that looks like this:

(defrule rule1
    ....
    <pattern>
    ...
=>
    ...
)

I run a set of test facts against it and rule1 fires as expected.

Now, I make a single modification to the rule:

(defrule rule1a
    ....
  (exists  <pattern>)
    ...
=>
    ...
)

Run the same set of test facts, and the rule does not fire!  I would
have expected that any set of facts that cause rule1 to fire, would
cause rule1a to fire at least once?

Then, rather than changing the rule, I added two rules with each of the
above LHS variants, and only a print on the RHS (ie no fact
modification).
Most surprisingly, the rule1 variant fired, the rule1a variant did not.

I tried to duplicate this effect in a simple example, but could not. I
know that would imply the problem is elsewhere, but I have constrained
all variables to only the change above. It would seem to me that under
any circumstance two rules with the above variations would either not
fire at all, or both fire at least once - correct?

Is it possible that the addition of an (exists) changes the net in some
potentially significant way?

Jack

PS  Tested in 5.2
PPS:  Ernest,  the documentation section 2.8.1.7. (5.2)  indicates that
(exists) is implemented as (not (not))
         when in fact it appears to be implemented as (not (not
(unique))). I don't know if that is salient to this problem or 'not' ;-)






--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to