I think I need to see the actual test program, or otherwise we need to get on the same page somehow. As a counter example, here's a little program with no rules that asserts about 10,000 facts one at a time and then retracts them. It takes 1.9 seconds (including JVM startup) on my Macbook. If I comment out the "retract" part, it takes 1.6 seconds. These would be faster if the facts weren't being parsed out of strings this way, twice, but regardless of that, this doesn't bear out the idea that retractions are pathologically slow.

(foreach ?a (create$ a b c d e f g h i j k l m nn o p q r s t u v w x y z) (foreach ?b (create$ a b c d e f g h i j k l m n o p q r s t u v w x y z) (foreach ?c (create$ a b c d e f g h i j k l m n o p q r s t u v w x y z)
                           (bind ?x (str-cat ?a ?b ?c))
                           (assert-string (str-cat "(" ?x ")")))))

(foreach ?a (create$ a b c d e f g h i j k l m nn o p q r s t u v w x y z) (foreach ?b (create$ a b c d e f g h i j k l m n o p q r s t u v w x y z) (foreach ?c (create$ a b c d e f g h i j k l m n o p q r s t u v w x y z)
                           (bind ?x (str-cat ?a ?b ?c))
                           (retract-string (str-cat "(" ?x ")")))))




On Jun 9, 2011, at 11:41 AM, Md Oliya wrote:

Thank you Ernest.

I am experimenting with the Lehigh university benchmark, where i transfer OWL TBox into their equivalent rules in Jess, with the logical construct. Specifically, I am using the dataset and transformations, as used in the OpenRuleBench.

As for the runtimes, I missed a point about the retractions. The fact is, even if the session does not contain any rules (no defrules, just assertions), loading the same set of retractions takes a considerable time. This indicates that the high runtime is mostly incurred by jess internal operations. but still, when the number of changes grows high (say more than 10%) the runtime is not acceptable, and rerunning with the retracted kb would be faster.

I have another question as well: what type of truth maintenance method is implemented in jess? Do you solely rely on the Rete memory nodes and tokens for this purpose?


--Oli.


On Mon, Jun 6, 2011 at 7:37 PM, Ernest Friedman-Hill <[email protected] > wrote: I don't think there's a particular reason in general. Retracting a fact takes only a little longer than asserting one, on average. But if we assume liberal use of "logical", retracting a single fact could result in a sort of "cascade effect" whereby retracting a single fact would result in many other facts, and many activations, being removed also due to dependencies. All of that would take time. Still, your case seems extreme. Maybe there's something pathological about this particular case.



On Jun 5, 2011, at 3:18 PM, Md Oliya wrote:

Hi,

I am doing some experiments with a set of rules which contain the "logical" CE. I intend to see the performance of Jess on a set of assertions as well as retractions.

After some experiments, I found that the runtime for assertions is much less than that of retractions. In fact, the performance on retractions is so bad that I would rather re (run) jess on a retracted kb.


A sample test case:
The KB size, number of assertions, number of retractions, and number of rules are 100K, 50K, 1k, and 100, respectively. runtimes are >> initial run: 860ms, assertions:320ms -- retractions: 4s.


Would you please give some hints on the reason?


Thanks in advance.
--Oli.

---------------------------------------------------------
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] .
--------------------------------------------------------------------



---------------------------------------------------------
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].
--------------------------------------------------------------------

Reply via email to