When a Fact is created from a Template and is retracted
before being asserted, the results are unpredictable
and can cause a segmentation fault: apparently a Fact
is put in the intenal fact list (thus Exists == True)
as soon as it is created - which doesn't imply
asserted, so that it results eligible for (and is not
prevented from) retraction.
An example of this follows:
t0 = clips.BuildTemplate("t0", "(slot s1)")
f0 = t0.BuildFact()
This bug should not prevent usability, as a Fact should
only be retracted after assertion. However the code
should be corrected in order to fail with an exception.
Log in to post a comment.