I discovered a problem (inconsistency) in BLOADing the previously BSAVEd
image. This occurs under quite a specific conditions, however it shows some internal inconsistency.
I have the following CLIPS code (extremely simplified):
(Doklad KodDokladu ?V163_TV9040)
(Doklad KodDokladu ?V163_TV9043)
(test (eq ?V163_TV9040 "36"))
(test (eq ?V163_TV9043 "37"))
(defrule x_ba8 ; FIRST OCCURRENCE OF A RULE
(defrule x_ba8 ; SECOND OCCURRENCE – in a reality created by a mistake but may exist
For CLIPS 6.30 x86, when performing load – bsave – clear – bload , the bload hangs in an infinite loop trying to read definitions of rules. If the rules are reordered, the condition of the first rule is changed (e.g. only one expression in OR, changing OR to AND, etc.) the bload is performed without problems. Please try to investigate this as it may manifest some internal inconsistency which can be difficult to discover.
I've checked in a fix.
Thanks a lot - You fixed it very quickly. What was the problem? I did some testing and all my existing tests completed OK. Thanks again.
Rules with or conditional elements create several rules (one disjunct for each possible combination of the or CEs). There's a list of rules, but for each rule there's also a list of the disjuncts for each rule. When a rule was being deleted, the preceding rule had its pointer to the next rule updated, but if that rule had any disjuncts, the next pointer for these was not updated. Bsave has to traverse the entire rule network to generate the output, so the incorrect pointers were preventing the correct amount of information to be written out to the binary file. The error will not occur for any deleted rule, just one where the preceding rule used an or conditional element.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.