I think Jess -should- reject an attempt to use ?slot1 on the RHS of
the rule; this kind of static analysis to enforce this isn't being
done yet, though. It's the same as binding a slot to a variable in a
(not) -- you can use the variable inside that same (not), but not in
subsequent patterns or on the rule's RHS.
I do need to do a bit more research on this, however, and I'm fairly
sure there will be some fundamental changes in the way (or) is being
implemented before 6.0 comes out.
I think Gyhra, Norman (Student Assistant) wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi Ernest!
>
> I have the following facts:
> (Fact1 (slot1 Fact1))
> (Fact2 (slot1 Fact2))
> (Fact3 (slot1 Fact3))
>
>
> If I use the (or) CE on the LHS like that:
>
> (or (Fact1 (slot1 ?slot1))
> (Fact2 (slot1 ?slot1))
> (Fact3 (slot1 ?slot1))
> )
>
>
> what will be the value of ?slot1 ?
>
> I would expect Jess to keep the order of the OR conditions.
> ?slot1 would be Fact1 because the first OR conditon matches immediately
> and the other two conditions are not tested anymore.
>
> I did some tests and came to the conclusion, that the current
> behaviour is different. However, I am not sure.
> Can you tell me what_s going on ?
>
> Regards,
> Norman
>
---------------------------------------------------------
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]
---------------------------------------------------------------------