When CLIPS is compiled as a 64-bit application using the -m64 option with gcc, reset does not work properly:
CLIPS>
(deftemplate as_score
(slot segment_id)
(slot score))
CLIPS>
(deffacts as_score_info
(as_score (segment_id 11)(score 5))
(as_score (segment_id 12)(score 9)))
CLIPS> (reset)
CLIPS> (facts)
f-0 (initial-fact)
f-1 (as_score (segment_id 11) (score 5))
f-2 (as_score (segment_id 12) (score 9))
For a total of 3 facts.
CLIPS> (reset)
CLIPS> (facts)
f-0 (initial-fact)
For a total of 1 fact.
CLIPS>
Anonymous
Logged In: YES
user_id=1987834
Originator: YES
In the file facthsh.c, locate the RemoveHashedFact function. Change the line
int hashValue;
to
unsigned long hashValue;