I think Gang Liu wrote:
> hi,
> 
> thanks for any help in advance!
> 
> I have several questions:
> 
> Q1:multiple threads or users:
> 
> I only create one Rete instance. It is shared by multiple
> threads. Are there any potencial issues I want to consider during a
> design phase besides using an unique id to keep all fact distinct?

Just the normal Java threading issues regarding any Java code you use
outside of Jess.


> Q2: scope of variables in rules:
> 
> If we use the same variable names in different rules, does it matter? Those 
> variables are not global. For example,
> (defrule rule1 (xxx ?id) =>)
> (defrule rule2  (yyy ?id) =>)
> I hope ?id's scope is within that rule.

Yes, LHS variable names don't interfere across rules. 

> 
> If we use the same variable name in a LHS of a rule, it does matter. For 
> example,
> (defrule test1 (xx ?n) (yy ?n) =>)
> 
> Only if 2 facts exist : (xx ?a), (yy ?b) and ?a equals to ?b, RHS is fired.
> 
> Right?
> 

Yes.




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