Hi Morten,

It should work, but the rule isn't being interpreted correctly; 
one Jess routine is failing to realize that the two occurrences of
"?post" refer to the same value. For the time being, if you need to
match on a fact binding, use an explicit function call to do it:

  (not (postdiction (last ?p&:(eq ?post ?p))))

and your rule will work perfectly. To patch the bug yourself, add the
following two lines to the very end of addDirectlyMatchedVariables()
in jess/Pattern.java :

        if (getBoundName() != null)
            map.put(getBoundName(), getBoundName());

Thanks for the bug report.

I think Morten Vigel wrote:
> 
> (defrule bottom-false "Bottom leaves can be primary if affirmed"
>   ?post <- (postdiction (test-status affirmed) (not-possibly-primary
> nil))
>   (not (postdiction (last ?post)))
>   =>
>   (modify ?post (not-possibly-primary FALSE)))
> 
> I should think that this rule should match [...] but
> it does not.


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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