The fact that "not" patterns don't backward-chain was brought up on
this list recently by someone else. At the time, my response was that
it was a non-feature; it just hadn't occurred to me to implement it,
and that I wasn't sure it was needed. This example shows that it is,
so I will try to get it in for the next release, which I hope will
come within the next two weeks.
I still wouldn't call this a bug, though; it's just an interesting
side-effect!
I think Kami ROUSSEAU wrote:
> Hello jess users,
>
> I use the Fact Storage Provider Framework to connect Jess with a database.
>
> The database contains these tables:
>
> Table "Data"
> ID integer
> PathToImage String
>
> Table "Coord"
> ID integer
> UpperRightX
> UpperRightY
>
> where Data.ID and Coord.ID are the same.
>
> (fsm-do-backward-chaining Coord)
> (defrule Rule1
> ; try to find which images have NO entry in the Coord table
> (Data (ID ?id) (Path ?path) (Media ?mediaID))
> (not (Coord (ID ?id)))
> =>
> (printout t "Pas de coordonnees pour l'image numero " ?id crlf))
>
> Rule1 fires for all images (georefenced or not) in the Data table. It looks
> like the backward chaining is not done when it is inside a (not).
>
> This could be a design choice. But things become inconsistant when Rule2 is
> added.
>
> (defrule Rule2
> ; try to find which images HAVE an entry in the Coord table
> (Data (ID ?id) (Path ?path) (Media ?mediaID))
> (Coord (ID ?id))
> =>
> (printout t "Coordonnees existent pour l'image numero " ?id crlf))
>
> If Rule2 is added, Rule1 fires for non-georeferenced images and Rule2 fires
> for georeferenced images.
>
> Is this a bug?
>
> -Kami
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
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]
---------------------------------------------------------------------