I think Hotmail wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 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?

Thanks very much for the feedback. You're probing some of the dark
corners of backwards-chaining behaviour; see comments below.

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

That's right. Jess behaves this way mostly because it never occurred
to me that it could behave any other way; it could, though, I
see. Does anybody else have an opinion one way or the other?


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

I guess I don't understand what it is you want to do  here -- I'd be
interested in details.

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

This one is a very interesting bug. Basically what's happening is that
the object ?rf that gets passed isn't the Fact reference, but a kind
of a handle to a fact. THat handle is only valid within the context of
the activation that generated it. It's erroneously being passed out of
that context into the need-foo fact. I will see about fixing this.


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

This one is quite subtle, and I'm gladd you brought it to my
attention. I will fix this for the next release.



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



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