I didn't take consideration of Q12 yet. I will look at it. But for my case, I just tried to load facts and didn't try to fire the rules. Do you have other advices for me? Thank you.
On 6/27/07, Ernest Friedman-Hill <[EMAIL PROTECTED]> wrote:
On Jun 27, 2007, at 1:47 PM, fan yang wrote: > I have tried Jess Version 7.1a1 to load the same aforementioned > facts file, I still got the following error without any luck. > Ernest, you said that 7.1 parser would detect duplicate symbols and > share them, how can I know this new function work? Need I give some > commands to Jess and ask Jess parser detect duplicate and share them? > > If 7.1 parser will not be a solution for my problem, is there > another way to fix or alleviate my problem? thank you. Well, since there was a relevant new feature, that's the first thing I mentioned; but there is a lot of old-school advice I can give, too. The most important one is understanding and minimizing partial-match count. For example, in the FAQ there is a question dedicated to this: http://herzberg.ca.sandia.gov/jess/FAQ.shtml#Q12 . Have you taken this into consideration yet? If not, that's where you go next. > > Fan > > > > Jess> Exception in thread "main" java.lang.OutOfMemoryError : Java > heap space > at jess.factory.FactoryImpl.newToken(FactoryImpl.java:27) > at jess.Node2.tokenMatchesLeft(Node2.java:328) > at jess.Node2.tokenMatchesRight(Node2.java:344) > at jess.Node2.doRunTestsVaryLeft (Node2.java:381) > at jess.Node2.runTestsVaryLeft(Node2.java:354) > at jess.Node2.callNodeRight(Node2.java:234) > at jess.Node1.passAlong(Node1.java:49) > at jess.Node1TECT.callNodeRight (Node1TECT.java:40) > at jess.NodeRoot.passAlong(NodeRoot.java:34) > at jess.NodeRoot.callNodeRight(NodeRoot.java:14) > at jess.FactList.processToken(FactList.java:31) > at jess.FactList._assert (FactList.java:204) > at jess.FactList.assertFact(FactList.java:178) > at jess.Rete.assertFact(Rete.java:495) > at jess.Jesp.loadFacts(Jesp.java:351) > at jess.LoadFacts.call(IOFunctions.java :314) > at jess.FunctionHolder.call(FunctionHolder.java:35) > at jess.Funcall.execute(Funcall.java:325) > at jess.Jesp.parseAndExecuteFuncall(Jesp.java:2190) > at jess.Jesp.parseExpression (Jesp.java:453) > at jess.Jesp.promptAndParseOneExpression(Jesp.java:303) > at jess.Main.execute(Main.java:177) > at jess.Main.main(Main.java:35) > > > On 6/27/07, Ernest Friedman-Hill <[EMAIL PROTECTED]> wrote: 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 owner-jess- > [EMAIL PROTECTED] . > -------------------------------------------------------------------- > > --------------------------------------------------------- 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] --------------------------------------------------------------------
