JESS: Facts modification

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

JESS: Facts modification

Nicolas Fortin
Hi everybody,

My question is mainly an abstract one. I am wondering how the Rete algorithm
handles the facts modifications ? In "Jess In Action" (8.3.2 Handling
retract), it is said that Jess uses four tags to perform different kind of
actions : ADD (assert), REMOVE (retract), UPDATE (populates join nodes for a
new rules added to a preexisting Rete network), CLEAR (reset). But what
about facts modifications, since it can activate or deactivate a rule in the
Rete network ?

Best regards,

Nicolas

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Facts modification

friedman_hill ernest j
I think Nicolas Fortin wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi everybody,
>
> My question is mainly an abstract one. I am wondering how the Rete algorithm
> handles the facts modifications ?

As it says in the manual
(http://herzberg.ca.sandia.gov/jess/docs/70/functions.html#modify) ,
"modify" basically retracts a fact, changes it, and then reasserts
it. Recent versions of Jess use special tags for this, though, so that
the Rete network can avoid some of the unnecessary work this would
entail.


---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [hidden email]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Facts modification

Nicolas Fortin
Thank you for your prompt answer,

> As it says in the manual
> (http://herzberg.ca.sandia.gov/jess/docs/70/functions.html#modify) ,

Ok sorry I didn't see.

> "modify" basically retracts a fact, changes it, and then reasserts
> it.

Is it specific to Jess or is it generally how works a shell that implements
the Rete algorithm ?

> Recent versions of Jess use special tags for this, though, so that
> the Rete network can avoid some of the unnecessary work this would
> entail.

So I guess that this new tag is specific to Jess, is it not ?

Thanks again,

Nicolas

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Facts modification

friedman_hill ernest j
I think Nicolas Fortin wrote:

> > "modify" basically retracts a fact, changes it, and then reasserts
> > it.
>
> Is it specific to Jess or is it generally how works a shell that implements
> the Rete algorithm ?

The original description of Rete didn't include a "modify" operation,
IIRC, but that's how all the rule engines I'm familiar with implement
it.

>
> > Recent versions of Jess use special tags for this, though, so that
> > the Rete network can avoid some of the unnecessary work this would
> > entail.
>
> So I guess that this new tag is specific to Jess, is it not ?

Lots of things about how Rete is implemented in Jess are specific to
Jess. The original description of the Rete algorithm left lots of room
for improvement.


---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [hidden email]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Rete network view

Nicolas Fortin
Thanks again for your answer but I have an other question :

Did you plan to improve the "Rete network view" in JessDE ? I mean it does
not have the nice feature of (view) command, which allows to see what are
the facts in the memories of a join node, by double-clicking on it.

Best regards,

Nicolas

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Rete network view

friedman_hill ernest j
I think Nicolas Fortin wrote:
>
> Did you plan to improve the "Rete network view" in JessDE ? I mean it does
> not have the nice feature of (view) command, which allows to see what are
> the facts in the memories of a join node, by double-clicking on it.

Yes, I do. Note that the existing Rete network view (RNV) works in
conjunction with the editor, not the debugger, so it doesn't have any
information about memory contents. The RNV will eventually be
connected to the debugger, too.

I'm personally very happy with the way the new RNV is laid out,
though. It uses the Eclipse GEF to decide how to lay out the nodes
without the lines crossing eachother, and I think the graphs it
creates are *much* nicer than the ones from the view command.

---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [hidden email]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: Rete network view

Nicolas Fortin
Hello,

> I'm personally very happy with the way the new RNV is laid out,
> though. It uses the Eclipse GEF to decide how to lay out the nodes
> without the lines crossing eachother, and I think the graphs it
> creates are *much* nicer than the ones from the view command.

Yes I agree, those lines crossing are a bit annoying with the view command.
The Rete network view is a useful enhancement !

Nicolas

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

JESS: A question on Jess's support for functional languages

E. Katsiri
Dear all,

I have one more question, this time concerning Jess's support for
functional language semantics. How much does Jess support functional
language semantics? (I noticed there is a lamda function in the function
list). Does Jess support map(), reduce() and fold()? Is there any example
code/ reference to any literature I could look into, please?

Thank you very much,

Eli Katsiri

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: A question on Jess's support for functional languages

friedman_hill ernest j
I think E. Katsiri wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Dear all,
>
> I have one more question, this time concerning Jess's support for
> functional language semantics. How much does Jess support functional
> language semantics? (I noticed there is a lamda function in the function
> list). Does Jess support map(), reduce() and fold()? Is there any example
> code/ reference to any literature I could look into, please?
>

Jess's support for functional programming is spotty. You've always
been able to do an "eval", and so there are functions that accept a
function name and do things with that -- for example, there's an
"apply" that's basically "map." There's no "reduce" but it would be
very easy to write the version that accepted a function name -- it's
easy to extend the Jess language with functions (and functionals)
written in Java.

(lambda) is brand-new and not well integrated yet, but the plan is
that in general, anything that now takes a function name will also
accept a lambda expression.

---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [hidden email]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------