I think Lakshmi Vempati wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Ernest,
>
> I had assumed that the underlying functionality whether using
> Rete.reset or (reset) (likewise for Rete.clear() and (clear), Rete.run()
> and (run) ) was the same.
>
It is. The implementation of the Jess language function for "reset"
looks like (effectively)
public Value call(ValueVector args, Context c) {
c.getEngine().reset();
return Funcall.TRUE;
}
But advice is something that is applied by the Jess language
interpreter to Jess language code; adding advice to a function means
wrapping the Userfunction object that implements that function in
another Userfunction that implements the advice. Then when a Jess
language call to (reset) is made, the call goes through that outer
Userfunction first, and then is passed along to the Userfunction shown
above.
By calling reset() from Java, you're doing an end run around all of
that. Adding advice to a Userfunction has no effect whatsoever on the
individual methods that are used in the implementation of that
Userfunction, even is, as in this case, there is just one of them, and
the names are the same.
> Are there any other subtle differences that would impact behavior in the
> jess environment? That is between using programmatic calls (methods
> defined in the Rete class) or equivalent command line syntax?
This is a faulty question, really. You're assuming that there's a
direct, one-to-one mapping between Jess functions and Java methods. In
general, there isn't.
---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov
--------------------------------------------------------------------
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]
--------------------------------------------------------------------