Hi all,
I encountered the following problems when using backward chaining. Maybe I
did something wrong?
If the problems are real, are there better workarounds?
Assuming:
(do-backward-chaining foo)
1) 'not' CE implies 'explicit':
Example:
(not (foo)) interpreted as: (not (explicit (foo)), that is no 'need-foo'
fact is generated
It might seem ok to assume 'not need-foo' means: "I don't need foo", but
what I really need
here is a way to check that the need-foo rule does not fire.
(Workaround: another rule without the 'not' CE, that does initialization of
need-foo)
2) references passed corrupted
Example:
(defrule r1
?rf <-(ref-foo)
(foo ?rf)
...
(defrule need-foo
(need-foo ?rf) ;rf here is corrupt
?rf <-(ref-foo) ;does not succeed
(Workaround: match on 'id' fields instead on references - like Jess 5.x)
3) multi-fields passed corrupted
(deftemplate foo (multislot mf))
(defrule r1
(ref-foo (mf $?mf))
(foo (mf $?mf))
...
(defrule need-foo
(need-foo $? ?x $?) ;?x gets bound to the whole multi-field !?
What happens here that the source multi-field is bound to a single
variable within the target multi-field.
(Workaround: assert helper fact with multi-field and match in another rule)
Thanks in advance for your help,
Marc.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------