Check out the "view" command and the "matches" command.
On Sep 30, 2009, at 11:21 AM, jo wrote:
Is there a way to coax some statistics out of jess to see the impact
of asserted facts/rules ? or a kind of dump of the built network...
Tx
J
----- Original Message ----
From: Ernest Friedman-Hill <[email protected]>
To: jess-users <[email protected]>
Sent: Wednesday, September 30, 2009 4:42:46 PM
Subject: Re: JESS: assertion - exception out of memory
Pattern-matching happens while facts are being asserted, not while
rules are firing, in the same way that the index of a database is
built when the data is inserted, not while a query is running.
That's the essence of the Rete algorithm used by Jess. Read the
chapter on "How Jess Works" in the manual to learn more.
On Sep 30, 2009, at 7:54 AM, Lucia Masola wrote:
thank you very much for your answer! I´m gonna make the changes
that you
mention. I do not have the program right here, and i came up with
another
issue regarding this problem. I encountered the out of memory
exception when
I asserted the facts, not when i want to run the rules. Do you
think that
this will solve the problem too?, or do i have to make another
changes?. I
was surprise that I couldn´t assert the facts, i thought that the
rules
didn´t matter at all until you tried to run them.
On Wed, Sep 30, 2009 at 1:18 AM, Friedman-Hill, Ernest
<[email protected]>wrote:
Hi,
I don't know why your code isn't in the message that went out to the
mailing list, but I saw it when I approved the message for the list.
Basically you're seeing exactly the issue discussed in the FAQ here:
http://www.jessrules.com/jess/FAQ.shtml#Q12
You've got a couple of rules with patterns like
(Method ?m1)
(Method ?m2)
(Call (something ?m1) (something-else ?m2))
(some-other-test ?m1 ?m2)
These patterns first construct partial matches for all pairs of
Method
facts -- i.e., n^2 pairs, so this uses memory proportional to the
square of
the number of facts. If you just rearrange it like
(Call (something ?m1) (something-else ?m2))
(Method ?m1)
(Method ?m2)
(some-other-test ?m1 ?m2)
then only the relevant pairs will be formed -- presumably a much
smaller
number. And if you can do something like
(Call (something ?m1) (something-else ?m2))
(some-other-test ?m1 ?m2)
(Method ?m1)
(Method ?m2)
then the memory usage will be smaller still.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lucia Masola
Sent: Tuesday, September 29, 2009 10:59 PM
To: jess-users
Subject: JESS: assertion - exception out of memory
Hi, I'm working in a java applications that has Jess
embedded. I had some
trouble in the assertions of facts. I'm asserting the facts
from java and i
received the exception "out of memory". I realized that the
problem is in
the archive clp because when i tried to do the same assertion
with another
clp i didn't encounter the problem. I also tried to take out
some rules from
the clp in order to check which rule were having the problem
and i found
them, but i don't know how to solve it (the trouble rules are
callerMethods,
calleeMethods ). if anyone can help me with this issue i will
appreciate it
--------------------------------------------------------------------
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
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
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]
.
--------------------------------------------------------------------
--------------------------------------------------------------------
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
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012 [email protected]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
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].
--------------------------------------------------------------------