Hi!
> Is it possible to have two facts with backwards chaining on the LHS of a
> rule? For example:
>
> (defrule some rule
> (fact (slot1 ?X))
> (database-user (name ?X) (user_id ?Y))
> (database-usercar (user_id ?Y) (car ?Z))
> =>
> (printout t ?X " owns a " ?Z crlf)
> )
Yes, it should be possible. Actually, this should work with any number of facts (it
did in some of my own cases). Did you have a problem?
> When "fact" is asserted the value for ?Y in the second fact is found by
> backward chaining and querying the database table database.user. Then, in
> turn, the value for ?Z in the third fact is found by matching ?Y with the
> second fact and backward chaining again.
>
> Was that clear enough? :-)
Perfectly clear ;-)
> Maybe this isn't an issue just for RDBMS, but for JESS backward chaining as
> a whole. Maybe my approach is totally wrong. Does anyone have any
> suggestions?
Your approach is OK. That's the way to traverse object links: using foreign and
primary keys.
What's happening? Did you try (watch all) to see what's going on?
Thomas
---------------------------------------------------------------------
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]
---------------------------------------------------------------------