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

Reply via email to