I need to use the reference counting mechanism in order to implement proper garbage collection.
As I understand I have to count every reference to a term, so for every variable (e.g. bool a) and for every operator combination of variables (e.g. a AND b). Doing so I am experiencing a segmentation fault for bigger models. I created an example that reproducible causes this segmentation fault for more than 2000 reference counted variables:
type_t bool_type = yices_bool_type();
for (int i = 0; i < 2500; ++i) {
term_t t = yices_new_uninterpreted_term(bool_type);
yices_incref_term(t);
}
Hello,
I need to use the reference counting mechanism in order to implement proper garbage collection. As I understand I have to count every reference to a term, so for every variable (e.g. bool a) and for every operator combination of variables (e.g. a AND b). Doing so I am experiencing a segmentation fault for bigger models. I created an example that reproducible causes this segmentation fault for more than 2000 reference counted variables:
Am I doing anything wrong?
Best regards Peter