Hi Bob,

I think Bob Orchard wrote:

> TRUE
> Jess> (facts)
> f-0   (initial-fact)
> For a total of 1 facts.
> TRUE
> 
>    ;;;;;;;;;;;;;; what happened to the definstance fact? It was not retracted and 
>reset
>    ;;;;;;;;;;;;;; is supposed to preserve it.


Well, these are alpha versions of 5.0, after all - there -are- known
problems. This is one of them; things should improve in the next
release. 

> 
> 
> On this same topic is the question ... Why does a reset NOT retract definstance 
>facts?
> I expect that one can argue for both sides of this. Certainly if I write a simple 
>jess
> program that has a 'startup' rule (as in the example pumps.clp) which creates some
> definstance facts and then execute the program via (reset) and (run) and then
> try to execute it again via (reset) and (run) it will (may) not behave as I expect 
>it to.
> The leftover definstance facts will be created again with new objects. This would 
>lead
> me to want the reset to clear the definstance facts. Presumably the objects created 
>by
> in the definstance calls will no longer have a reference and they will be gc'd at 
>some
> point by Java. Any comments on this or clarifications to my understanding of this?
> 
> Thanks, Bob.
> 

This was a deliberate choice on my part. In CLIPS, having all the
instances go away on reset makes sense, because COOL objects have no
'reality' outside of the CLIPS language. But in Jess, instances are
regular old Java objects that have observable effects on the outside world:
i.e., they might be GUI components, for example. So if reset removes
the instances, they might -not- be GC'd - they might just be
annoyingly unreachable from Jess. Also, in Jess, the objects might not
have been created by the Jess language- they might have been created
from Java code and passed to Jess, and there's no way for Jess to run
that code again, so it'd better not be cavalier about tossing objects
aside. 

Anyhow, it's what made sense to me. Does anyone else have any thoughts
on the subject?

---------------------------------------------------------
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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to