Hi Abel,

You're right - there's a bug here. It affects 4.4 but not the 5.x
series.

The problem occurs because in Jess versions before 5.0, definstance is
in a separate package because the Jess 4.4 core code wants to remain
Java 1.0 compatible. As a result, the code for Rete.clear() needs to do
something special to allow for definstance, but it does not.

The easiest fix is simply to do a (load-package
jess.reflect.ReflectFunctions) after a (clear) (after all, (clear) is
only used during development, right?) This will reinitialize
definstance and everything will work correctly again.

The behaviour of (reset) when (clear) hasn't been called is correct -
definstances are not suposed to be removed by (reset).

I'm fairly sure now that when 5.0 goes final, 4.4 will become
"unsupported," although I will probably leave it up for download.

I think Abel Martinez wrote:
> 
> Hi Jess users,
> 
>     I discovered the following strange behaviour while I was working
> with Jess 4.4:
> 
>     I tried to remove all the definstances using a (reset) command but
> it didn't work. Then I realized that if I type a (clear) command before
> loading the facts then later the definstances can be well-removed using
> the (reset) command.
> 
> In other words the two scenarios are the following...
> 
> The original sequence was:
> 
> 1. load the facts
> 2. perform the task
> 3. do a (reset) command
> 
> and the definstances were not deleted.
> 
> -----------------------------------------
> 
> But if the sequence is :
> 
> 1. first at all, do a (clear) command
> 2. load the facts
> 3. perform the task
> 4. do a (reset) command
> 
> then the definstances are deleted.
> 
> Is this a properly behaviour? or
> Is any 'interference' between (clear) and (reset)?
> 
> Can you help me to understand this?
> 
> Thank you for your attention,
> Abel.
> 
> --
>  Abel Mart�nez
>  Dept. Teoria del Senyal i Comunicacions - U.P.C.
>  tel: (+34 93) 401 56 23
>  e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> 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 9214                  [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