It looks like your facts include a mostly symbols, with a lot of
duplication. This is good news, because the parser in Jess 7.1
(there's an alpha version available on the web site) will detect
duplicate symbols and share them, which in your case could save a
*lot* of memory. Try it out and see what happens!
On Jun 27, 2007, at 9:34 AM, fan yang wrote:
Hi,
I'm trying to use Jess to detect source code defects. The tool
first parse source code and generate facts which represent design
information such as classes, functions, attributes, inheritances
and invocations etc., then apply Jess rule to detect flaws. The
tools works on small size of source code. but It got OutOfMemory
error when it dealt with bigger projects such as JHotDraw
(SourceForge project).
I have read Jess manual, mailing list and Jess in Action book, I
didn't get solution. Would you please tell me how to apply Jess on
large facts set. What is the best practice or procedure to make
Jess application use less memory. Or Is there a way to know how
many memory the different facts occupy?
Here shows a little bit more details of my test case, can you
point me right way to avoid out of memory problem?
JHotDraw project's facts file is about 4M bytes. My computer has 2G
RAM. I set maximum java heap size to 1G through JVM's -Xmx1024M, I
got OutOfMemory exception when I just tried to load facts using the
following code:
(clear)
(batch "C:/output/project.clp")
(reset)
(load-facts "C:/output/project.facts")
Partial facts file:
(package
(packageName org.jhotdraw.util)
(parentName nil))
(classifier
(unqualifiedName StorableInput)
(package org.jhotdraw.util)
(classifierName org.jhotdraw.util.StorableInput)
(type class)(isAbstract concrete)
(isLeaf leaf)(isRoot root))
(visibilityInPackage
(unqualifiedName StorableInput)
(package org.jhotdraw.util)
(classifier org.jhotdraw.util.StorableInput)
(visibility public))
(access
(operation org.jhotdraw.util.StorableInput.retrieve)
(attribute org.jhotdraw.util.StorableInput.retrieve.ref)
(accessType nil))
(operation
(unqualifiedName retrieve)
(classifier org.jhotdraw.util.StorableInput)
(operationName org.jhotdraw.util.StorableInput.retrieve)
(scope instance)(visibility private)
(polymorphism nil)(abstractOrConcrete concrete)
(constOrNonConst nonconst)(numberParameters 1))
(parameter
(unqualifiedName nil)
(operationName org.jhotdraw.util.StorableInput.retrieve)
(parameterName nil)(order nil)
(direction return)
(parameterType org.jhotdraw.util.Storable))
Thank you.
Fan
---------------------------------------------------------
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://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]
--------------------------------------------------------------------