I can't reproduce the problem with a simple program, so it's more complex than just what we can see here. There have been a few patches to "accumulate" over the last few releases, but none of them dealing with anything like this. What this looks like to me is working memory corruption due to out-of-band data changes -- for example, setting slots value in a Fact directly rather than using "modify", or using instances of a class with a mutable hashCode as slot data without using set-nonvalue-class.
In the next release, by the way, the "value class" default is going to be reversed, so that the slow, safe mode is the default, and the fast but breakable mode is an option you must turn on explicitly. I think Felix Bachmann wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > I have a little problem with the accumulate CE. I try to collect a slot > value of a set of facts in a list with the following accumulate > statement (produced with (ppdefrule). The interesting slot is the > "owner" slot. I provided a list of facts (Fact-246 - Fact-259) that > match the CE of the accumulate. As a result of this rule a fact is > inserted (MAIN::AskQuestion), which should contain the collected list in > slot (affectedFacts ?rr). The resulting fact Fact-466 contains > duplicates and values that are not even in the matching facts. > > Is this a bug, or what am I doing wrong here? > > Kind regards > > Felix Bachmann > > --------------------------------- rule ----------------------- > (defrule ImpactAnalysis::__AskcostOfChangeQuestion__ > (declare (salience 500)) > (MAIN::initial-fact) > ?rr <- (accumulate > (bind ?res (create$)) > (bind ?res (insert$ ?res 1 ?_20_own)) > ?res > (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner ?_20_own) (source ArchE))) > (test (> (length$ ?rr) 0)) > (not (MAIN::AskQuestion (questionId costOfChange) (answerAvailable > nil))) > => > (bind ?def (create$)) > (foreach ?r ?rr (bind ?def (insert$ ?def 1 \"0.0\"))) > (assert (MAIN::AskQuestion (questionId costOfChange) (questionGroup > nil) (parent nil) (affectedFacts ?rr) (parameters ) (options ?rr) > (default ?def) (answer ) (answerAvailable nil) (log nil)))) > ------------------ rule fires --------------------- > Jess> FIRE 1 ImpactAnalysis::__AskcostOfChangeQuestion__ f-0, f--2,, > ------------------ facts immediately after this rule ----------------- > f-246 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-106>) (source ArchE) (status nil)) > f-247 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-105>) (source ArchE) (status nil)) > f-249 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-103>) (source ArchE) (status nil)) > f-251 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-101>) (source ArchE) (status nil)) > f-252 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-100>) (source ArchE) (status nil)) > f-253 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-99>) (source ArchE) (status nil)) > f-254 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-98>) (source ArchE) (status nil)) > f-255 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-97>) (source ArchE) (status nil)) > f-256 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-96>) (source ArchE) (status nil)) > f-257 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-95>) (source ArchE) (status nil)) > f-259 (ModifiabilityReasoningFrameworks::P_CostOfChange (value 0.0) > (owner <Fact-93>) (source ArchE) (status nil)) > .... > f-466 (MAIN::AskQuestion (questionId costOfChange) (questionGroup nil) > (parent nil) (affectedFacts <Fact-93> <Fact-106> <Fact-94> <Fact-94> > <Fact-95> <Fact-96> <Fact-97> <Fact-98> <Fact-99> <Fact-100> <Fact-101> > <Fact-102> <Fact-102> <Fact-103> <Fact-104> <Fact-91> <Fact-91> > <Fact-104> <Fact-92> <Fact-92> <Fact-105>) (parameters ) (options > <Fact-93> <Fact-106> <Fact-94> <Fact-94> <Fact-95> <Fact-96> <Fact-97> > <Fact-98> <Fact-99> <Fact-100> <Fact-101> <Fact-102> <Fact-102> > <Fact-103> <Fact-104> <Fact-91> <Fact-91> <Fact-104> <Fact-92> <Fact-92> > <Fact-105>) (default "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" > "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" "0.0" > "0.0") (answer ) (answerAvailable nil) (log nil)) > > [Attachment, skipping...] --------------------------------------------------------- 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://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
