Ah, I see what's happening. Thanks!
I think a better fix (same idea, but covers all possibilities) is to
move copies of the new line to two different places in the same
routine: one at about line 522, right after
slot.set(val, test.m_subIdx);
+ val = Funcall.NIL;
and another at about line 536, right after
vv.set(val, i);
+ val = Funcall.NIL;
These lines numbers refer to the file -after- the previous patch has
been applied. Together, these two should prevent similar problems in
other circumstances.
I think Ashraf Afifi wrote:
>
>
>
> I have added one line to the patch that you sent me. When I run the test in the
> forwarded message, the asserted fact is (need-foo a b nil)
>
> Binding b =
> (Binding)
> m_defrule.getBindings().get(test.m_slotValue.variableValue(null));
> + val = Funcall.NIL;
> if (b.m_factIndex < token.size())
> //val = token.fact(b.m_factIndex).get(b.m_slotIndex);
> {
> val = token.fact(b.m_factIndex).get(b.m_slotIndex);
> if (b.m_subIndex != -1)
> val = val.listValue(null).get(b.m_subIndex);
> }
>
> Ashraf Afifi
> ---------------------- Forwarded by Ashraf Afifi/Bsg/MetLife/US on 02/03/2000
> 05:38 PM ---------------------------
>
>
> Ashraf Afifi
> 02/03/2000 12:09 PM
>
> To: [EMAIL PROTECTED]
> cc:
> Subject: 2nd backward chaining bug after batch for release 5
>
> Thanks for your fast reply yesterday. I applied it and further tested the
> system.
>
> (do-backward-chaining foo)
>
> (defrule x
> (xyz ?a ?b )
> (foo ?a ?b $?c)
> =>)
> (assert(xyz a b))
>
> this causes the system to assert (need-foo a b b)
> when I print it. It is (a b b).
> I was expecting (need-foo a b nil) or (need-foo a b )
>
> regards
>
> Ashraf
>
>
>
>
>
>
---------------------------------------------------------
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]
---------------------------------------------------------------------